DBMS SYSTEM ARCHITECTURE

As noted earlier, a database management system is a complex piece of software that consists of a number of modules. 



The DBMS may be considered as an agent that allows communication between different types of users with the physical database and the operating system without the users being aware of every detail of how it is done. In addition to providing facilities for defining the database and retrieving information, a DBMS provides facilities for the following:


  • User communication with the system
  • Authentication and authorization
  • Query processing including a syntax checker and translator for the DDL and DML
  • Access path selection
  • Transaction management including concurrency control, logging manager, locking manager and recovery manager
  • Database management including a file manager and the physical database
  • Catalog manager


To provide all these facilities and some others, a DBMS has system architecture like the simple architecture


The various components of the database system architecture are discussed below.


1. User Communication, Authentication and Authorization


This component deals with the user when he/she communicates with the DBMS. The communication depends on the kind of database system It may be a two-tier system or a three-tier system. In each case, the system would include a mechanism for the user to log in and be authenticated. Once the user is allowed to access the database, the system will check the user's credentials and allow the user to access the parts of the database that he/she is authorized to


2. Query Processor


This component of a DBMS has several subcomponents including a query parser, a query rewriter. A query optimizer and a query executor. Query processor involves the DBMS interpreting the DDL and DML statements from the users and checking them for correct syntax and, if found to be correct, translate them into query execution plans. While developing query execution plans, the query optimizer attempts to efficiently find the best plan. These plans are then passed on to the database manager which then executes them. This is perhaps the most important component of a DBMS since each user is querying the database and is hoping to get results quickly. The queries are mostly submitted in a declarative language SQL and therefore its translation and optimization is very different than that of procedural language programs Query processing including details about the various components of a query processor. 


In a nonprocedural or a declarative language like SQL, no sequence of operations is explicitly given and therefore a query may be processed in a number of different ways, often called plans, where each plan might have a different sequence of operations. Optimization in declarative languages therefore is a more complex task, since it not only involves code optimization (ways to carry out operations that need to be carried out) but also selecting the best plan including selecting the best access paths. In many situations, especially if the database is large and the query is complex, a very large number of alternative plans are often possible and it is then not practical to enumerate them all and select the best. Then, it is necessary to consider a small number of possible plans and select the best option from those. Since the savings from query optimization can be substantial, it is acceptable that a DBMS spend some time in finding the best plan to process the query. Again, of course, we assume that we are dealing with queries that are expected to consume a significant amount of computing resources. There is no point in spending time optimizing queries that are so simple that almost any approach could be used to execute them in a small amount of time Further details of query processing introduction to Database Management. 


3. Transaction Management and Concurrency Control


Modern database systems are multi-user systems. Some large systems may support thousands of users. Multiple users are able to use a single system simultaneously because the processor (or processors) in the system is shared amongst the users trying to access computer resources (including databases) simultaneously. The concurrent execution of programs is therefore interleaved, with each program being allowed access to the CPU at regular intervals. The concept of a transaction is very important since many users are using a multi-user system concurrently and the transactions must be managed so that they do not interfere with each other. Control is therefore needed to coordinate concurrent accesses to a DBMS so that the overall correctness of the database is maintained. Efficiency is also important since the response time for interactive users ought to be short. Our discussion of concurrency in Chapter 9 will be transaction based. A transaction is assumed to be a logical unit of work, and a unit of consistency in that preserves database consistency. Transaction processing database systems are now ubiquitous. For example, they include e-commerce, billing systems including telecommunications accounting, payroll, airline and hotel reservations, banking and electronic stock market transactions, to name a few. Transaction management consists of a number of components including the following:


  • Concurrency control
  • A lock manager 
  • A log manager 
  • Recovery manager


Transaction management and concurrency control, backup and recovery, security and integrity are discussed.


4. File and Access Methods


This component of the DBMS interacts with the physical storage that stores the database. The file manager is responsible for storing the database on the disk and for providing the DBA a number of data structure options for storing the database. This module also assists in maintaining the metadata of the database as well as indexes for the various files. 


5. Buffer Manager


A database is normally resident on a disk although data can only be manipulated in the main memory. A part of the database therefore must be loaded in the main memory for retrieval and updates, and it must be written back to the disk once it is modified. The database therefore has a buffer manager that is responsible for handling the interfacing between the main memory and disk. The buffer manager maintains a number of pages of the same size and a large buffer size is important for the performance of a large and active database system. 


6. Storage Manager


The storage manager is a DBMS subsystem that provides support for database management including management of access paths and indexes.


7. Catalog Manager


We have discussed earlier the role of metadata to describe the data structures (tables and their properties users, indexes, constraints and so on) in a database. This data is maintained in the catalog and stored






Like

Share


# Tags

Keep learning, Keep Exploring ⇗

Stay curious, stay informed, and keep exploring with atharvgyan.