You are on page 1of 26

Structure of a DBMS

Structure of a DBMS

 A database system is partitioned into modules that


deal with each of the responsibilities of the overall
system.

 The functional components of a database system


can be broadly divided into the storage manager and
the query processor components.

 The storage manager is important because databases


typically require a large amount of storage space.
Structure of a DBMS

 The query processor is important because it


helps the database system to simplify and
facilitate access to data.

It is the job of the database system to translate


updates and queries written in a nonprocedural
language, at the logical level, into an efficient
sequence of operations at the physical level.
Structure of a DBMS
Query Processor
• The query processor components include
• DDL interpreter, which interprets DDL
statements and records the definitions in the
data dictionary.
• DML compiler, which translates DML statements
in a query language into an evaluation plan
consisting of low-level instructions that the query
evaluation engine understands.
Structure of a DBMS
• A query can usually be translated into any of a
number of alternative evaluation plans that all
give the same result. The DML compiler also
performs query optimization, that is, it picks the
lowest cost evaluation plan from among the
alternatives.
• Query evaluation engine, which executes low-
level instructions generated by the DML
compiler.
Structure of a DBMS
Storage Manager
• A storage manager is a program module that
provides the interface between the lowlevel data
stored in the database and the application
programs and queries submitted to the system.
The storage manager is responsible for the
interaction with the file manager. The raw data
are stored on the disk using the file system,
which is usually provided by a conventional
operating system. The storage manager
translates the various DML statements into low-
level file-system commands. Thus, the storage
manager is responsible for storing, retrieving,
and updating data in the database.
Structure of a DBMS
The storage manager components include:
• Authorization and integrity manager, which
tests for the satisfaction of integrity
constraints and checks the authority of users
to access data.
• Transaction manager, which ensures that
the database remains in a consistent
(correct) state despite system failures, and
that concurrent transaction executions
proceed without conflicting.
Structure of a DBMS
The storage manager components include:
• File manager, which manages the allocation of
space on disk storage and the data structures
used to represent information stored on disk.
• Buffer manager, which is responsible for
fetching data from disk storage into main
memory, and deciding what data to cache in
main memory. The buffer manager is a critical
part of the database system, since it enables the
database to handle data sizes that are much
larger than the size of main memory.
Structure of a DBMS
Transaction Manager
• A transaction is a collection of operations that
performs a single logical function in a database
application.
• Each transaction is a unit of both atomicity and
consistency. Thus, we require that transactions
do not violate any database-consistency
constraints. That is, if the database was
consistent when a transaction started, the
database must be consistent when the
transaction successfully terminates.
Structure of a DBMS

Transaction Manager
• Transaction - manager ensures that the database
remains in a consistent (correct) state despite
system failures (e.g., power failures and operating
system crashes) and transaction failures.
Types of Database Users
1. Database Administrator (DBA):
 DBA Stands for ​Database Administrator​.
• It is a person or a team, who is responsible for
managing the overall database management
system.
• It is the leader of the database. It is like a super-
user of the system.
• It is responsible for the administration of all the
three levels of the database.
Types of Database Users
1. Database Administrator (DBA):
 DBA is responsible for:
• Deciding the instances for the database.
• Defining the Schema
• Liaising with Users
• Define Security
• Back-up and Recovery
• Monitoring the performance
Types of Database Users
2. Database Designers:
• Database designers design the appropriate
structure for the database, where we share data.
3. System Analyst:
• System analyst analyses the requirements of end
users, especially naïve and parametric end users.
4. Application Programmers:
• Application programmers are computer
professionals, who write application programs.
Types of Database Users
5. Naïve Users / Parametric Users:
• Naïve Users are Un-sophisticated users, which has
no knowledge of the database. These users are like a
layman, which has a little bit of knowledge of the
database.
• Naive Users are just to work on developed
applications and get the desired result.
• For Example: Railway’s ticket booking users are
naive users. Or Clerical staff in any bank is a naïve
user because they don’t have any DBMS knowledge
but they still use the database and perform their
given task.
Types of Database Users

6. Sophisticated Users:
• Sophisticated users can be engineers, scientists,
business analyst, who are familiar with the
database. These users interact with the database
but they do not write programs
7. Casual Users / Temporary Users:
• These types of users communicate with the
database for a little period of time.
Levels of Database

Before we learn Data Independence, a


refresher on Database Levels is important. The
database has 3 levels as shown in the diagram
below
Physical/Internal
Conceptual
External
Levels of DBMS Architecture Diagram
Data Independence in DBMS

What is Data Independence of DBMS?


• Data Independence is defined as a property of
DBMS that helps to change the Database schema
at one level of a database system without
requiring to change the schema at the next
higher level.
• Data independence helps to keep data separated
from all programs that make use of it.
• In many systems, data independence is an
essential function for components of the system.
Types of Data Independence

In DBMS there are two types of data


independence

• Physical data independence


• Logical data independence.
Physical Data Independence

 Physical data independence helps to separate


conceptual levels from the internal/physical
levels.
 It allows to provide a logical description of
the database without the need to specify
physical structures.
 Compared to Logical Independence, it is
easy to achieve physical data independence.
Physical Data Independence

With Physical independence, we can easily


change the physical storage structures or devices
with an effect on the conceptual schema.
Any change done would be absorbed by the
mapping between the conceptual and internal
levels.
Physical data independence is achieved by the
presence of the internal level of the database
and then the transformation from the conceptual
level of the database to the internal level.
Logical Data Independence

Logical Data Independence is the ability to


change the conceptual scheme without
changing
• External views
• External API or programs
Any change made will be absorbed by the
mapping between external and conceptual
levels.
When compared to Physical Data
independence, it is challenging to achieve
logical data independence.
Difference between Physical and Logical
Data Independence
Logical Data Independence Physical Data Independence
Logical Data Independence is mainly Mainly concerned with the storage of the
concerned with the structure or changing data.
the data definition.

It is difficult as the retrieving of data is It is easy to retrieve.


mainly dependent on the logical structure
of data.

Compared to Logic Physical independence Compared to Logical Independence it is


it is difficult to achieve logical data easy to achieve physical data
independence. independence.
Difference between Physical and Logical
Data Independence
Logical Data Independence Physical Data Independence
You need to make changes in the A change in the physical level usually does
Application program if new fields are not need change at the Application
added or deleted from the database. program level.

Modification at the logical levels is Modifications made at the internal levels


significant whenever the logical structures may or may not be needed to improve the
of the database are changed. performance of the structure.

Concerned with conceptual schema Concerned with internal schema

Example: Add/Modify/Delete a new Example: change in compression


attribute techniques, hashing algorithms, storage
devices, etc
Importance of Data Independence
• Helps you to improve the quality of the data
• Database system maintenance becomes affordable
• Enforcement of standards and improvement in
database security
• You don't need to alter data structure in application
programs
• Permit developers to focus on the general structure
of the Database rather than worrying about the
internal implementation
• It allows you to improve state which is undamaged
or undivided
• Database incongruity is vastly reduced.
• Easily make modifications in the physical level is
needed to improve the performance of the system.
THANK YOU

You might also like