DBMS Architecture | Structure | Components

Sachin maurya
0

DBMS, or Database Management System, is a software application that facilitates the storage, organization, retrieval, and management of data in a database. It acts as a bridge between users and the database, offering tools for data manipulation, ensuring data integrity and security, supporting concurrent access, and providing a query language for data retrieval and modification. DBMS also includes features like data backup and recovery, indexing, and administration tools, making it easier to handle large amounts of data efficiently and systematically.


Architecture of DBMS

DBMS Architecture divided into four parts:

  1. DBMS users
  2. Query processor
  3. Storage processor
  4. Disk Manager

DBMS users

In a DBMS, users refer to individuals or entities who interact with the database system. There are typically three types of users: 1) End users, who are the ultimate consumers of the data and access it through applications or interfaces; 2) Application developers, who design and develop software applications that interact with the database; and 3) Database administrators (DBAs), who manage and maintain the database system, handle user permissions, perform backups and recovery, optimize performance, and ensure data security. Different users have varying levels of access and privileges depending on their roles and responsibilities within the organization.

There are 4 main type of DBMS users:

Naive/End users : 

Naive/End users are the individuals who are the ultimate consumers of the data stored in the database. They interact with the database through various applications or interfaces without having much knowledge about the underlying structure or complexities of the database. Naive/end users primarily focus on retrieving, updating, and analyzing data using predefined queries or forms provided by the DBMS. They may perform tasks such as browsing records, generating reports, or entering data. DBMS shields naive/end users from the complexities of the database system, providing a user-friendly interface that allows them to access and manipulate data without needing specialized technical skills.

Application Programmer : 

An application programmer is an individual responsible for designing, developing, and maintaining software applications that interact with the database. They have a deeper understanding of the database structure and work closely with the DBMS to implement efficient data retrieval, storage, and modification functionalities. Application programmers utilize programming languages and frameworks to create custom applications that access the database, perform complex queries, process data, and handle transactions. They ensure the seamless integration of the application with the DBMS, optimize performance, and implement data validation and security measures. Application programmers bridge the gap between end users and the underlying database system, creating tailored solutions to meet specific business requirements.

Sophisticated users  : 

Sophisticated users in DBMS are individuals who possess advanced knowledge and expertise in utilizing the database system. They have a deep understanding of the database structure, data modeling, and query optimization techniques. Sophisticated users may include database administrators, data analysts, or data scientists. They have the ability to write complex queries, design efficient database schemas, perform advanced data analysis, and optimize database performance. These users have a comprehensive understanding of the DBMS features, advanced query languages, and tools available to leverage the full potential of the database system. They play a crucial role in extracting meaningful insights from the data and making informed decisions based on their expertise.

Database Administrator  : 

A Database Administrator (DBA) is an individual responsible for managing and maintaining the database system. They ensure the smooth operation, security, and performance of the database. DBAs handle tasks such as database installation, configuration, and upgrade, user management, backup and recovery, performance tuning, and data integrity maintenance. They implement security measures to protect the database from unauthorized access and ensure data privacy. DBAs also monitor database performance, resolve issues, and optimize queries for efficient data retrieval. They play a critical role in managing the overall database environment and ensuring its reliability, availability, and integrity.

Query processor  : 

The query processor is a component responsible for executing user queries and retrieving data from the database. It receives queries written in a query language (e.g., SQL) and translates them into an optimized execution plan. The query processor analyzes the query, checks the syntax and semantics, and performs query optimization techniques to determine the most efficient way to access and retrieve data. This involves selecting appropriate indexes, evaluating join strategies, and applying other optimization methods. Once the optimal execution plan is generated, the query processor executes the query by accessing the relevant data from the database and returning the results to the user.

Query processor contains the following components:

DDL Compiler : 

The DDL (Data Definition Language) compiler is a component responsible for processing and executing data definition language statements. DDL statements are used to define the structure of the database, including creating and modifying tables, views, indexes, constraints, and other database objects. The DDL compiler parses and validates the DDL statements, ensuring their syntax and semantics are correct. It then generates the necessary internal data structures and metadata to represent the defined database objects. The DDL compiler works closely with the DBMS to update the system catalog, which stores information about the database schema. It plays a crucial role in managing and maintaining the database's structure and integrity.

DML Pre Compiler and Query processor : 

The DML (Data Manipulation Language) compiler is a component responsible for processing and executing data manipulation language statements. DML statements are used to manipulate the data stored in the database, including inserting, updating, deleting, and retrieving data. The DML compiler parses and validates the DML statements, ensuring their syntax and semantics are correct. It generates an execution plan that outlines how the DBMS should perform the requested data operations efficiently. The DML compiler interacts with the query processor and storage manager to access and modify the data in accordance with the specified DML statements. It plays a crucial role in managing and manipulating the database's actual data content.

The DML components include:

1. Insertion Component: This component handles the insertion of new data into the database. It receives the data to be inserted and verifies that it adheres to the specified data types and constraints. It then interacts with the storage manager to allocate space for the new data and update the relevant data structures.

2. Update Component: The update component is responsible for modifying existing data in the database. It receives the update statements specifying which records or fields need to be changed and validates the updates against constraints. It interacts with the storage manager to locate and modify the appropriate data.

3. Deletion Component: The deletion component handles the removal of data from the database. It receives delete statements indicating the records or fields to be removed and ensures that any associated constraints are maintained. It interacts with the storage manager to identify and delete the specified data.

4. Query Component: The query component is responsible for retrieving data from the database based on specified conditions. It receives query statements that define the criteria for data selection, such as filtering, sorting, and joining. It interacts with the query optimizer to generate an efficient execution plan and with the storage manager to access and retrieve the requested data.

Storage Processor : 

The storage processor is responsible for managing the physical storage of data. It handles tasks such as data allocation, disk I/O management, indexing, data compression, encryption, and transaction logging. The storage processor optimizes data access, ensures data durability and reliability, and manages storage space efficiently. It plays a crucial role in coordinating the storage and retrieval of data, organizing it on disk, and implementing mechanisms to improve performance and maintain data integrity.

Storage processor contains the following components : 

Authorization manager : 

Authorization manager is a component responsible for enforcing access control and managing user permissions within the database system. It ensures that only authorized users or roles can perform specific actions on the database objects. The authorization manager verifies user credentials, checks their privileges, and enforces security policies defined by the database administrator. It controls permissions for operations like data retrieval, modification, creation, deletion, and administrative tasks. The authorization manager helps maintain data confidentiality and integrity by granting or denying access based on the user's role, privileges, and the defined security policies of the database.

Transaction Manager :

Transaction manager is a component responsible for ensuring the atomicity, consistency, isolation, and durability properties of database transactions. It manages the execution of multiple database operations as a single logical unit called a transaction. The transaction manager ensures that transactions are executed in an all-or-nothing fashion, either completely applied or completely rolled back in case of failure. It provides concurrency control mechanisms to maintain isolation among concurrent transactions. The transaction manager also logs changes made during transactions to enable recovery in case of system failures. It plays a crucial role in maintaining data integrity and reliability in the face of concurrent access and system failures.

File manager : 

File manager is a component responsible for managing the physical storage of data in files on secondary storage devices such as hard drives. It handles tasks such as file creation, deletion, and organization. The file manager is responsible for allocating space for database files, managing file structures, and handling data access and retrieval. It ensures efficient storage and retrieval of data, implements caching and buffering techniques to optimize performance, and coordinates with the storage processor to manage disk I/O operations. The file manager plays a vital role in managing the physical storage layer of the database system.

Buffer Manager : 

Buffer manager is a component responsible for managing the buffers in the memory used for caching data from disk. It aims to reduce the disk I/O overhead and improve data access performance. The buffer manager keeps a portion of the database in memory and coordinates the transfer of data between the disk and memory buffers. It implements buffer replacement policies to ensure that frequently accessed data remains in memory. The buffer manager handles read and write requests, tracks buffer usage, and optimizes data retrieval by minimizing disk accesses. It plays a critical role in enhancing the efficiency and performance of data operations in the DBMS.

Disk Storage : 

Disk storage refers to the use of magnetic or solid-state disks as a medium for long-term data storage in a computer system. It provides non-volatile storage, meaning data is retained even when power is lost. Disk storage consists of physical disks that store data in the form of binary information on magnetic or flash memory surfaces. It offers high-capacity storage, fast access times, and persistent data retention. Disk storage is commonly used in DBMS to store database files, indexes, and transaction logs. It provides the foundation for data persistence and retrieval, serving as a reliable and scalable storage solution for a wide range of applications.

Disk storage contains the following components : 

Data files : 

Data files are physical files stored on disk that contain the actual data of the database. These files store tables, indexes, and other database objects. Data files are managed by the DBMS and are accessed for data retrieval, modification, and storage.

Data Dictionary : 

Data dictionary is a centralized repository that stores metadata about the database. It contains information about tables, columns, relationships, constraints, and other database objects. The data dictionary provides a comprehensive view of the database's structure and helps ensure data integrity and consistency.

Indices : 

In DBMS, indices are data structures used to improve the efficiency of data retrieval operations. They provide a quick lookup mechanism by creating an organized representation of selected columns, allowing for faster searching, sorting, and joining of data. Indices enhance query performance by reducing disk I/O and improving data access speed.
Tags

Post a Comment

0 Comments
Post a Comment (0)
To Top