<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: masrur alam</title>
    <description>The latest articles on DEV Community by masrur alam (@masrur_alam_bd4f5329ee37e).</description>
    <link>https://dev.to/masrur_alam_bd4f5329ee37e</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4005416%2F6dfb0658-7b67-4efb-86db-899e285ee12a.PNG</url>
      <title>DEV Community: masrur alam</title>
      <link>https://dev.to/masrur_alam_bd4f5329ee37e</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/masrur_alam_bd4f5329ee37e"/>
    <language>en</language>
    <item>
      <title>How Database Indexing Speeds Up Queries: On the Level of Disk and Blocks</title>
      <dc:creator>masrur alam</dc:creator>
      <pubDate>Tue, 17 Nov 2026 13:52:01 +0000</pubDate>
      <link>https://dev.to/masrur_alam_bd4f5329ee37e/how-database-indexing-speeds-up-queries-on-the-level-of-disk-and-blocks-1il5</link>
      <guid>https://dev.to/masrur_alam_bd4f5329ee37e/how-database-indexing-speeds-up-queries-on-the-level-of-disk-and-blocks-1il5</guid>
      <description>&lt;p&gt;Have you ever wondered how a database retrieves data without scanning the full table so quickly from millions of records? Such a phenomenon can be exemplified by looking for an information location from the index of a book rather than sequentially scanning all the pages until the intended one is reached. Similarly, database indexing is what makes this possible in a database management system. &lt;/p&gt;

&lt;p&gt;We will try to understand the effectiveness of indexing from the perspective of disks and blocks. A disk works as the persistent data storage in a DBMS, which is basically organized into blocks. &lt;/p&gt;

&lt;p&gt;Consider that a single block is of size 1024 bytes. In addition, you have 960 data records to store, each having a size of 256 bytes. Then, each block stores 1024/256= 4 data records, and the total blocks needed for 960 records is= 960/4= 240 blocks, right?&lt;/p&gt;

&lt;p&gt;Now, suppose you want the 960th record. So, you have to access all the blocks from 1 to 240 to get the data. This results in a significant number of expensive disk i/o operations, which can make your query slow. Just think what may happen to the performance overhead when you have a couple of million records, depending on your growing application demand. &lt;/p&gt;

&lt;p&gt;This is where DB indexing comes into play. &lt;/p&gt;

&lt;p&gt;Now, consider that you have used indexing on the ID column, which holds information in the ID and the respective address for data. Say, each record in the index table consumes 32 bytes. Then, each block will contain 1024/32=32 index entries, and for 960 data records, the total required blocks are= 960/32=30.&lt;/p&gt;

&lt;p&gt;Therefore, in the worst case, you have to access 30 blocks for a data record of the ID (selected search key), then 1 block to reach the actual data, totaling 31 blocks. With just one-level indexing, you have reduced disk i/o to a very low amount, making your query faster. This can further be improved via multi-level indexing. &lt;/p&gt;

&lt;p&gt;Here. I have considered that the blocks are sequentially accessed for keeping things simple. In reality, databases use something called B+ Trees, where keys are stored in sorted order, making data lookup have logarithmic complexity. &lt;/p&gt;

&lt;p&gt;However, indexing does not magically do something like this. It has its own set of complexities and trade-offs that you have to consider, since a sequential scan may still be cheaper and effective when you have to get almost all the data records. Thus, depending on the application scenario, you have to decide whether you need to use indexing or not. &lt;/p&gt;

&lt;p&gt;But, at a high level, it is now understandable how database indexing can make queries faster.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fe3xdzocqnf2wzg5211y6.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fe3xdzocqnf2wzg5211y6.PNG" alt=" " width="800" height="433"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>database</category>
      <category>indexing</category>
      <category>disks</category>
    </item>
    <item>
      <title>Headstart to the Internals of a Database</title>
      <dc:creator>masrur alam</dc:creator>
      <pubDate>Fri, 30 Oct 2026 20:34:21 +0000</pubDate>
      <link>https://dev.to/masrur_alam_bd4f5329ee37e/headstart-to-the-internals-of-a-database-olh</link>
      <guid>https://dev.to/masrur_alam_bd4f5329ee37e/headstart-to-the-internals-of-a-database-olh</guid>
      <description>&lt;p&gt;On a general note, a Database Management System (DBMS) is known to us as a structured means for data storage and retrieval. However, if you dive slightly into the internals, you will encounter the fascinating realm of a carefully designed system. Comprising several useful subsystems, it ensures the request and retrieval of data leveraging text-based query languages.&lt;/p&gt;

&lt;p&gt;So, how does a query written in some query language return the intended result? Understanding DBMS architecture would be a great starting point in this regard.&lt;/p&gt;

&lt;p&gt;Database management systems utilize a client-server model, where the application instance is the client and the database system instance takes the role of the server. The four core subsystems of the whole architecture and the overall flow are mentioned as follows:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. Transport Subsystem:&lt;/strong&gt; establishes communication between client and server. Requests come in the form of queries written in a query language.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Query Processor Subsystem:&lt;/strong&gt; The query is handed over to the query processor, which comprises a query parser and query optimizer. The former checks, validates, and interprets the query upon parsing, while the latter creates the most efficient execution path, known as the query plan, possible from the available plans by making use of the parsed query.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Execution Engine:&lt;/strong&gt; Thirdly, the execution engine takes the query plan as input and runs it to request the intended data from the database.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4. Storage Engine:&lt;/strong&gt; Consisting of several necessary components named lock manager, transaction manager, buffer manager, and recovery manager, the storage engine maintains structured storage for data organization and access on disk via heap files or B-trees. In addition, the buffer manager caches data for faster in-memory data access while disk remains the persistent storage. The transaction and lock manager work as the means for concurrency control, while the system state is restored by the recovery manager from the previously maintained logs in case of system crash or failures.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fkxkslcd2tq93nok2lm61.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fkxkslcd2tq93nok2lm61.png" alt=" " width="800" height="840"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Once the data is successfully retrieved, it passes through the reverse direction, all the way to the transport subsystem and finally reaching the client.&lt;/p&gt;

&lt;p&gt;Such enlightenment on the inner workings of a DBMS has shown that every request and response is not merely some query-based operation but an important indication of a data-specific, informed, engineered system.&lt;/p&gt;

</description>
      <category>database</category>
      <category>internals</category>
    </item>
    <item>
      <title>System design: When great solution comes with great problems</title>
      <dc:creator>masrur alam</dc:creator>
      <pubDate>Wed, 28 Oct 2026 09:58:40 +0000</pubDate>
      <link>https://dev.to/masrur_alam_bd4f5329ee37e/system-design-when-great-solution-comes-with-great-problems-22p5</link>
      <guid>https://dev.to/masrur_alam_bd4f5329ee37e/system-design-when-great-solution-comes-with-great-problems-22p5</guid>
      <description>&lt;p&gt;System design is the overall architecture planning of a software system comprising different core components with a prime a focus on ensuring an effective balance between the expected outcome and newly added constraints. Such balance usually leads to systems which we often call reliable, scalable, and maintainable.  &lt;/p&gt;

&lt;p&gt;Before ending up with something like the above, always answer these 5 simple questions first: &lt;/p&gt;

&lt;ol&gt;
&lt;li&gt; What the system does? Who does it serve?&lt;/li&gt;
&lt;li&gt; How many users and the growth rate?&lt;/li&gt;
&lt;li&gt; Read-heavy or write-heavy application?&lt;/li&gt;
&lt;li&gt; What thing/things you can never lost?&lt;/li&gt;
&lt;li&gt; How much latency as well as cost is affordable? &lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;A clarity on the above issues smooths your understanding of the business requirements and start at least with planning. &lt;br&gt;
However, there is no concrete solution to a system design problem since it is influenced by the answers to the mentioned questions which with several other edge cases known as functional and non-functional requirements. This is what makes such problem more interesting where you have some tools to plug and play with while system-level analytical thinking being the most critical factor. &lt;/p&gt;

&lt;p&gt;In addition, a solution to the problem is to add a new problem. For example, adding caching may make rapid retrieval of frequent data but adds to the careful consideration of eviction strategies. Or, you may think that adding several horizontally scaled servers would solve your problem but adding a single more powerful server (vertical scaling) would have solved the problem. So, these are the design choices that comes with thinking and understanding the core requirements. You design a system, you reduce the single point of failure, identify where the system can break, you solve it, all okay but a new complexity, you go again. So, there is never ending aspect to it.  &lt;/p&gt;

&lt;p&gt;This is something that makes software system design fascinating; at least what I have perceived so far exploring it from the high level. &lt;br&gt;
And as far as the 5 above question, the answers will be caught somewhere in the next posts. &lt;/p&gt;

</description>
      <category>softwareengineering</category>
      <category>system</category>
      <category>designsystem</category>
      <category>backend</category>
    </item>
  </channel>
</rss>
