Structure of DBMS

Learn via video course
FREE
View all courses
DBMS Course - Master the Fundamentals and Advanced Concepts
DBMS Course - Master the Fundamentals and Advanced Concepts
by Srikanth Varma
1000
5
Start Learning
DBMS Course - Master the Fundamentals and Advanced Concepts
DBMS Course - Master the Fundamentals and Advanced Concepts
by Srikanth Varma
1000
5
Start Learning
Topics Covered

Overview

The Structure of DBMS is divided into several components that perform specific functions such as Query processing, storage management, etc. Each of these components is subdivided into other components to execute different operations like DDL interpretation, DML compilation, etc. There are three major components of the structure of DBMS Query Processor, Storage Manager, and Disk Storage. Every component more or less depends on the other component for its proper functioning. Let us dive deep into the structure of DBMS.

Introduction to Structure of DBMS

Components of DBMS Structure

The structure of DBMS is divided into three components namely "Query Processor", "Storage Manager", and "Disk Storage". Each of these components plays a very crucial role in Database Management. Hence we will see all three of them with a due concentration on detail. Before moving into details let us have a quick overview of the structure of DBMS. Here we go,

  • Query Processor
    • DML Compiler
    • DDL Interpreter
    • Embedded DML Pre-compiler
    • Query Evaluation Engine
  • Storage Manager
    • Authorization and Integrity Manager
    • Transaction Manager
    • File Manager
    • Buffer Manager
  • Disk Storage
    • Data Files
    • Data Dictionary
    • Indices
    • Statistical Data

Let us now see what is the task of each of these components and their sub-components respectively. We will start with the first one which is the "Query Processor".

1. Query Processor

Query Processor Query processor as the name suggests handles the query processing. In simple words, it processes the query given by the user. This is how the Query Processor helps the database system in simplifying and facilitating access to data. The main function of the query processor is to execute the query without any failure. But how does it work? The Query Processor converts (or interprets) the queries given by the user through the application program into machine-readable instructions. It is also responsible for executing the user requests that are received from the DML compiler. Let us now see the components of query processor and their functions(what tasks they perform). Let us now discuss the components of the Query Processor. DDL Interpreter DDL expands to Data Definition Language. DDL Interpreter as the name suggests interprets the DDL statements such as schema definition statements like create, delete, etc. The result of this interpretation is a set of a table that contains the meta-data which is stored in the data dictionary. The data dictionary is capable of storing the meta-data. It's basically a component of Disk Storage that we will discuss later in this article. DML Compiler DML expands to Data Manipulation Language in DBMS. DML Compiler again as the name suggests compiles(or translates) the DML statements such as select, update, and delete statements into low-level instructions which is nothing but the machine-readable object code to make it executable. The DML compiler is also responsible for query optimization. Why? Usually, there are several evaluation plans in which a single query is translatable. Hence, some optimization is required to pick the lowest cost evaluation plan from all the available plans. This is called query optimization in DBMS which is performed by the DML compiler only. In simple words, the most efficient way of executing a query is determined by Query optimization. Embedded DML Pre-compiler The DML statements in the application program which are embedded(such as SELECT, FROM, etc. in SQL) needs to be pre-compiled into normal procedural calls(program statements that the host language can understand) before the query evaluation. So, an Embedded DML Pre-compiler is responsible for processing the DML statements that are embedded in an application program into procedural calls. Query Evaluation Engine The Query Evaluation Engine is also referred to as the "Query execution engine". First, it takes the query evaluation plan, then executes it, and returns the answer back to the query. In simple words, the Query Evaluation Engine first interprets the SQL commands to access the data from the database and then it returns the answer to that query. In short, it is responsible for evaluating the queries and executing the object code that was generated by DML Compiler. Some of the examples of Query Evaluation Engines are Apache drill, Presto, etc.

2. Storage Manager

Storage Manager Let's assume, there is the data stored in the database and there are some queries received from the end-user. But how these two things would interact with each other? here comes the term "Storage Manager". It is nothing but a program that acts as an interface between the data which is stored in the database and the end-user queries.

It is the Storage Manager which ultimately interacts with the file manager. Storage Manager also executes the DCL statements such as GRANT and REVOKE. Hence we can say that it is the storage Manager that is responsible for storing, retrieving, updating, or deleting the data present in the database, and then the file is updated accordingly.

Apart from this, Storage Manager is also called "Database Control System" as it is also responsible for maintaining the consistency and integrity of the database.

Let us now discuss the components of Storage Manager. Authorization and Integrity Manager There can be some data in the database that needs to be accessed by authorized individuals only and should be hidden from the public users and sometimes integrity constraints are needed to be checked at the time of database modification. This is where Authorization and Integrity Manager come into play. The Authorization and Integrity Manager verifies the authority of the user trying to access the data and it also checks the integrity constraints when the database is modified. The data can be modified only if the result of the constraint comes out to be True, else the data remains unmodified. Hence, integrity constraints are very helpful in preventing any accidental damage to the database.

Transaction Manager A transaction in DBMS is nothing but a very small unit of the program. The Transaction Manager as the name suggests manages all the transaction(program) execution. To be precise, it ensures the consistent state of the database in spite of system failures. It is also responsible for ensuring that the concurrent execution of transactions happens without any conflicts which results in flawless transactions. File Manager The task of the file manager is to manage the space allocation in the disk for storing the information and also the data structures used for representing that information. We will discuss disk storage in detail later in this article in the "Disk Storage" section. Buffer Manager The Buffer Manager allocates the space to the buffer to store data in it. It also fetches the data from the disk storage to the main memory and is responsible for deciding what data to cache in memory. By doing so, Buffer Manager manages the space allocation for buffer using various methods such as Buffer Replacement Strategy(with LRU). This ultimately results in a minimum number of transfers between disk and memory as the buffer stores the data in memory which eventually fulfills the goal of DBMS.

3. Disk Storage

Disk Storage

The Storage Manager* is responsible for implementing the below given data structures as a part of the physical system implementation. This simply means that these data structures are implemented during the physical system implementation. Data Files It is responsible for storing the database. Data Dictionary The Data Dictionary stores the information(or meta-data) about the definition of a database. In simple words, it stores the database structure information(the schema of the database). Indices Indices (plural of an index) help in retrieving the data items in a much faster way. Statistical Data Statistical Data as the word suggests stores the statistical information regarding the data stored in the database. Query processor utilizes this statistical information for selecting a much more efficient way to execute a query.

So this is how the whole structure of DBMS looks like. Hope this article has helped you in some way. Don't forget to read the conclusion of the article.

Conclusion

  • There are three major components of the structure of DBMS.
  • These components are Query Processor, Storage Manager, and Disk Storage.
  • Query Processor helps the database system in simplifying and facilitating access to data.
  • The main function of the query processor is executing the query without any failure.
  • Storage Manager is responsible for storing, retrieving, updating, or deleting the data sitting in the database.
  • Disk Storage contains Data Files, Data Dictionary, Indices, and Statistical Data and helps to access the data stored in the disk.

Read More: