4.Database System Architecture
4.Database System Architecture
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, Database users and
administrators and the query processor components.
The storage manager is important because databases typically require a large amount of storage space. Corporate
databases range in size from hundreds of gigabytes to, for the largest databases, terabytes of data. A gigabyte is
approximately 1000 megabytes (actually 1024) (1 billion bytes), and a terabyte is 1 million megabytes (1 trillion
bytes). Since the main memory of computers cannot store this much information, the information is stored on disks.
Data are moved between disk storage and main memory as needed. Since the movement of data to and from disk is
slow relative to the speed of the central processing unit, it is imperative that the database system structure the data so
as to minimize the need to move data between disk and main memory.
The query processor is important because it helps the database system to simplify and facilitate access to data. The
query processor allows database users to obtain good performance while being able to work at the view level and not
be burdened with understanding the physical-level details of the implementation of the system. 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.
Storage Manager
Query Processor
Database users and administrators.
1. Storage Manager:
It is a program module that provides an interface between the database and application
program. The storage manager is responsible for storing, retrieving and updating the data in the database. A storage
manager is a program module that provides the interface between the low-level data stored in the database and the
application programs and queries submitted to the system
1.1 Storage Manager Components:
Authorization and Integrity manager – Which tests for the satisfaction of integrity constraints and
checks the authority of users to access data.
DML Compiler :
It processes the DML statements into low level instruction (machine language), so that they can be executed.
DDL Interpreter :
It processes the DDL statements into a set of table containing meta data (data about data).
Query Optimizer:
It executes the instruction generated by DML Compiler.
One of the main reasons for using DBMSs is to have central control of both the data
and the programs that access those data. A person who has such central control over
the system is called a database administrator (DBA). The functions of a DBA
include:
DBMS Architecture:
The DBMS design depends upon its architecture. The basic client/server architecture is used to
deal with a large number of PCs, web servers, database servers and other components that are
connected with networks.
The client/server architecture consists of many PCs and a workstation which are connected via the
network.
DBMS architecture depends upon how users are connected to the database to get their request
done.
1-Tier Architecture
In this architecture, the database is directly available to the user. It means the user can directly sit
on the DBMS and uses it.
Any changes done here will directly be done on the database itself. It doesn't provide a handy tool
for end users.
The 1-Tier architecture is used for development of the local application, where programmers can
directly communicate with the database for the quick response.
A simple one tier architecture example would be anytime you install a Database in your system
and access it to practice SQL queries. But such architecture is rarely used in production.
2-Tier Architecture
The 2-Tier architecture is same as basic client-server. In the two-tier architecture, applications on
the client end can directly communicate with the database at the server side. For this interaction,
API's like: ODBC, JDBC are used.
The user interfaces and application programs are run on the client-side.
The server side is responsible to provide the functionalities like: query processing and transaction
management.
To communicate with the DBMS, client-side application establishes a connection with the server
side.
Two tier architecture provides added security to the DBMS as it is not exposed to the end-user
directly. It also provides direct and faster communication.
3-Tier Architecture
The 3-Tier architecture contains another layer between the client and server. In this architecture,
client can't directly communicate with the server.
The application on the client-end interacts with an application server which further communicates
with the database system.
End user has no idea about the existence of the database beyond the application server. The
database also has no idea about any other user beyond the application.
The 3-Tier architecture is used in case of large web application