The document outlines the structure and components of a Database Management System (DBMS), which serves as an interface between users and databases to perform operations like insert, delete, update, and retrieval. Key components include the DDL and DML compilers, query optimizer, stored data manager, and data dictionary, each responsible for processing commands, optimizing queries, maintaining data integrity, and storing metadata. The importance of the data dictionary is emphasized for controlling data integrity, documenting design processes, and promoting data independence.
The document outlines the structure and components of a Database Management System (DBMS), which serves as an interface between users and databases to perform operations like insert, delete, update, and retrieval. Key components include the DDL and DML compilers, query optimizer, stored data manager, and data dictionary, each responsible for processing commands, optimizing queries, maintaining data integrity, and storing metadata. The importance of the data dictionary is emphasized for controlling data integrity, documenting design processes, and promoting data independence.
Structure of DBMS
DBMS (Database Management System) acts as an interface between the
user and the database. The user requests the DBMS to perform various
operations (insert, delete, update and retrieval) on the database. The
components of DBMS perform these requested operations on the database
and provide necessary data to the users
At a very high level, a database is considered as shown in the below
diagram. Let us see them in detail below.
+ Applications: — It can be considered as a user-friendly web
page where the user enters the requests. Here he simply enters
the details that he needs and presses buttons to get the data.
+ End User: — They are the real users of the database. They can
be developers, designers, administrators, or the actual users of
the database.
. DDL: —Data Definition Language (DDL) is a query fired to
create database, schema, tables, mappings, etc in the
database. These are the commands used to create objects like
tables, indexes in the database for the first time. In other
words, they create the structure of the database.
+ DDL Compiler: — This part of the database is responsible for
processing the DDL commands. That means this compiler
actually breaks down the command into machine-
understandable codes. It is also responsible for storing the
metadata information like table name, space used by it,
number of columns in it, mapping information, etc.
+ DML Compiler: — When the user inserts, deletes, updates or
retrieves the record from the database, he will be sending
requests which he understands by pressing some buttons. But
for the database to work/understand the request, it should be
broken down to object code. This is done by this compiler. One
can imagine this as when a person is asked some question,
how this is broken down into waves to reach the brain!
+ Query Optimizer: - When a user fires some requests, he is
least bothered how it will be fired on the database. He is not allaware of the database or its way of performance. But whatever
be the request, it should be efficient enough to fetch, insert,
update, or delete the data from the database. The query
optimizer decides the best way to execute the user request
which is received from the DML compiler. It is similar to
selecting the best nerve to carry the waves to the brain!
Stored Data Manager: —This is also known as Database
Control System. It is one of the main central systems of the
database. It is responsible for various tasks
+ It converts the requests received from query optimizer
to machine-understandable form. It makes actual
requests inside the database. It is like fetching the
exact part of the brain to answer.
« It helps to maintain consistency and integrity by
applying the constraints. That means it does not allow
inserting/updating / deleting any data if it has child
entry. Similarly, it does notallow entering any
duplicate value into database tables.
+ Itcontrols concurrent access. If there are multiple
users accessing the database at the same time, it
makes sure, all of them see correct data. It guarantees
that there is no data loss or data mismatch happens
between the transactions of multiple users.
+ It helps to back up the database and recovers data
whenever required. Since it is a huge database and
when there is any unexpected exploit of
the transaction, and reverting the changes is not easy.
It maintains the backup of all data so that it can be
recovered.
It has the real data stored in it. It can be stored
as magnetic tapes, magnetic disks, or optical disks.
Compiled DML: — Some of the processed DML statements
(insert, update, delete) are stored in it so that if there are
similar requests, it will be re-used.
Data Dictionary: — It contains all the information about the
database. As the name suggests, it is the dictionary of all the
data items. It contains a description of allthe tables, view, materialized
views, constraints, indexes, triggers, etc.
Data Dictionary - Data Dictionary is a repository of description of data in
the database. It contains information about
* Data - names of the tables, names of attributes of each table, length of
attributes, and number of rows in each table.
* Relationships between database transactions and data items referenced
by them which is useful in determining which transactions are affected
when certain data definitions are changed.
* Constraints on data i.e. range of values permitted.
* Detailed information on physical database design such as storage
structure, access paths, files and record sizes.
* Access Authorization - is the Description of database users their
responsibilities and their access rights.
* Usage statistics such as frequency of query and transactions.Data dictionary is used to actually control the data integrity, database
operation and accuracy. It may be used as a important part of the DBMS.
Importance of Data Dictionary -
Data Dictionary is necessary in the databases due to following reasons:
« It improves the control of DBA over the information system and user's
understanding of use of the system.
* It helps in documentating the database design process by storing
documentation of the result of every design phase and design decisions.
« It helps in searching the views on the database definitions of those
views.
* It provides great assistance in producing a report of which data elements
(i.e, data values) are used in all the programs.
* It promotes data independence i.e. by addition or modifications of
structures in the database application program are not effected.
Functions Of Data Manager Ar
* Convert operations in user's Queries coming from the application
programs or combination of DML Compiler and Query optimizer which is
known as Query Processor from user's logical view to physical file system.
* Controls DBMS information access that is stored on disk.
* It also controls handling buffers in main memory.
* It also enforces constraints to maintain consistency and integrity of the
data.
* It also synchronizes the simultaneous operations performed by the
concurrent users.* It also controls the backup and recovery operations.