Database System Structure

Subject: Introductory Database

Overview

A database system is divided into different modules that handle various tasks involved in running the system. The storage manager and query processor are two major categories of functional components in a database system. The storage manager is responsible for managing the storage and retrieval of data, including interacting with the file manager and translating data manipulation commands, storing and updating data, and enforcing integrity constraints and user access. It also implements data structures such as data files, the data dictionary, and indices to support data management. The query processor is made up of components that interpret and compile data manipulation and definition language statements, execute low-level instructions, and optimize query evaluation plans. These components work together to process queries and manipulate data in the database.

A database system is divided into modules that handle each of the tasks involved in running the whole thing. The storage manager and the query processor components can be considered the two major categories of a database system's functional components.

Storage Manager

The storage manager is a software component that acts as a bridge between the database's underlying data storage and the application programs and queries that access it. It is responsible for interacting with the file manager and translating high-level data manipulation commands into low-level commands that the file system can understand and execute. The storage manager is also responsible for storing, retrieving, and updating data in the database. It is typically responsible for ensuring that data is stored efficiently and that it can be accessed and modified in a timely manner. 

Following are the components of a storage manager:

  • Authorization and Integrity Manager:
    The authorization and integrity manager is responsible for testing the satisfaction of integrity constraints and checking the authority of users to access data.
  • Transaction Manager:
    The transaction manager is responsible for ensuring the consistency and integrity of the data in the database, even in the face of system failures or concurrent transactions.
  • File Manager:
    The file manager is responsible for managing the allocation of space on disk storage and the data structures used to represent the information stored on disk. This includes tasks such as creating, deleting, and modifying files, as well as managing the allocation of space on the disk to ensure that data is stored efficiently and can be accessed quickly.
  • Buffer Manager:
    The buffer manager is responsible for managing the transfer of data between main memory and disk storage. It is responsible for fetching data from disk storage into main memory as needed, and for deciding what data to cache in main memory to optimize performance. The buffer manager is an important component of the database management system, as it enables the database to handle data sizes that are much larger than the size of main memory. By caching data in main memory, the buffer manager helps to improve the performance of the database by reducing the number of disk accesses that are required to retrieve data. The buffer manager works closely with other components of the database management system, such as the storage manager and the file manager, to ensure that data is stored and retrieved efficiently and effectively.

As part of its responsibilities, the storage manager implements several data structures to support the physical storage and management of data in the database. These structures include:

  1. Data files: These store the actual data in the database.
  2. Data dictionary: This stores metadata about the structure of the database, such as the schema of the database (i.e., the names and types of the tables, columns, and other objects in the database).
  3. Indices: These provide fast access to data items that hold particular values, such as a specific record in a table or a specific value in a column. Indices can be used to speed up the performance of queries and other operations that access data in the database.

These data structures are important components of the database management system, as they help to ensure that data is stored efficiently, can be accessed quickly, and can be managed and maintained effectively. The storage manager is responsible for managing and maintaining these data structures to ensure that the database functions smoothly and efficiently.

The Query Processor

he query processor is made up of several components that work together to process queries and manipulate data in the database:

  1. DDL interpreter: This component interprets data definition language (DDL) statements, which are used to create, modify, or delete database objects such as tables and indices. It records the definitions of these objects in the data dictionary.
  2. DML compiler: This component translates data manipulation language (DML) statements, which are used to insert, update, or delete data in the database, into an evaluation plan consisting of low-level instructions that the query evaluation engine can understand.
  3. Query evaluation engine: This component executes the low-level instructions generated by the DML compiler, performing the actual manipulation of data in the database.

These components work together to process queries and manipulate data in the database, ensuring that data is stored, retrieved, and updated efficiently and effectively.

Things to remember
  • A database system is divided into different modules that handle various tasks involved in running the system.
  • The storage manager is responsible for managing the storage and retrieval of data, including interacting with the file manager and translating data manipulation commands, storing and updating data, and enforcing integrity constraints and user access.
  • The storage manager also implements data structures such as data files, the data dictionary, and indices to support data management.
  • The query processor is made up of components that interpret and compile data manipulation and definition language statements, execute low-level instructions, and optimize query evaluation plans.
  • The query processor works to process queries and manipulate data in the database.
  • The data dictionary stores metadata about the structure of the database, including the schema of the database.

© 2021 Saralmind. All Rights Reserved.