A DBMS is not one single block it is made of many parts (modules), and each part does a specific job.
Broadly, the whole architecture can be divided into 3 main layers:
- Query Processor
- Storage Manager
- Physical Storage
1. Query Processor
The job of the query processor is simple: it takes the high-level query written by the user (like SQL) and converts it into low-level instructions that the system can actually run.
| Part | What it does |
| DDL Interpreter | Handles DDL statements (like CREATE, ALTER). It saves the structure information into the data dictionary. |
| DML Compiler / Parser | Converts the SQL query into low-level instructions that the database engine can understand. It also checks for syntax errors. |
| Query Optimizer | Looks at different ways to run the same query, and picks the best (fastest, most efficient) way to do it. |
| Query Execution Engine | Takes the final optimized plan, runs it by talking to the Storage Manager, and returns the result to the user. |
2. Storage Manager
The storage manager works like a bridge between the data stored on the disk and the queries/programs that need that data.
| Part | What it does |
| Buffer Manager | Manages the RAM (cache memory). It brings the needed data blocks from the hard disk into memory, so operations run faster. |
| File Manager | Manages disk space and decides how data is stored/organized on the physical storage. |
| Transaction Manager | Makes sure transactions run safely and correctly, even if there is a power cut or system crash. |
| Authorization and Integrity Manager | Checks if the user has permission to access the data, and makes sure all the rules (constraints) are followed. |
3. Physical Disk Storage
This is the actual hardware where the data is permanently stored.
| Part | What it does |
| Data Files | Store the actual data all the rows and tables. |
| Indices | Help find data quickly, just like an index page at the back of a book helps you find a topic fast. |
| Data Dictionary (System Catalog) | Stores metadata — information about table structures, columns, constraints, and user access rights (basically, “data about the data”). |