0% found this document useful (0 votes)
3 views

4.Database System Architecture

The document outlines the architecture of database systems, detailing components such as the storage manager, query processor, and database users. It describes the roles of each component, including the storage manager's responsibility for data management and the query processor's function in translating user queries. Additionally, it explains different DBMS architectures, including 1-tier, 2-tier, and 3-tier architectures, highlighting their structure and communication methods.

Uploaded by

priyaspomdrive
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views

4.Database System Architecture

The document outlines the architecture of database systems, detailing components such as the storage manager, query processor, and database users. It describes the roles of each component, including the storage manager's responsibility for data management and the query processor's function in translating user queries. Additionally, it explains different DBMS architectures, including 1-tier, 2-tier, and 3-tier architectures, highlighting their structure and communication methods.

Uploaded by

priyaspomdrive
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 6

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.

Components of a database system can be divided into 3 units:

 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.

Transaction Manager: A transaction is a collection of operations that performs a single logical


function in a database application. Transaction-management component ensures that the database remains
in a consistent (correct) state despite system failures (e.g. power failures and operating system crashes)
and transaction failures. Concurrency-control manager controls the interaction among the concurrent
transactions, to ensure the consistency of the database.
File Manager -Which manages the allocation of storage space on disk and data structures used to
store those information's
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.
2. Query Processor:
It interprets the requests (queries) received from end user via an application program into
instructions. It also executes the user request which is received from the DML compiler.
Query Processor contains the following components :

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).

Embedded DML Pre-compiler:


It processes DML statements embedded in an application program into procedural calls.

Query Optimizer:
It executes the instruction generated by DML Compiler.

3a. Database Users

1) Application programmers – are computer professionals who write


application programs. Application programmers can choose from many tools
to develop user interfaces. Rapid application development (RAD) tools are
tools that en-able an application programmer to construct forms and reports
with minimal programming effort.
2) Sophisticated users – interact with the system without writing programs.
In-stead, they form their requests either using a database query language or
by using tools such as data analysis software. Analysts who submit queries to
explore data in the database fall in this category.

3) Specialized user – are sophisticated users who write specialized database


applications that do not fit into the traditional data-processing framework.
Among these applications are computer-aided design systems, knowledge-
base and expert systems, systems that store data with complex data types (for
example, graphics data and audio data), and environment-modeling systems.
Chapter 22 covers several of these applications.
4) Naïve users – are unsophisticated users who interact with the system by
invoking one of the application programs that have been written previously.
For example, a clerk in the university who needs to add a new instructor to
department A invokes a program called new hire. This program asks the
clerk for the name of the new instructor, her new ID, the name of the
department (that is, A), and the salary.
3b.Database Administrator

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:

 Schema definition. The DBA creates the original database schema by


executing a set of data definition statements in the DDL.
 Storage structure and access-method definition.
 Schema and physical-organization modification. The DBA carries out
changes to the schema and physical organization to reflect the changing needs
of the organization, or to alter the physical organization to improve
performance.
 Granting of authorization for data access. By granting different types of
authorization, the database administrator can regulate which parts of the
database various users can access. The authorization information is kept in a
special system structure that the database system consults whenever someone
attempts to access the data in the system.
 Routine maintenance. Examples of the database administrator’s routine
maintenance activities are:

 Periodically backing up the database, either onto tapes or onto remote


servers, to prevent loss of data in case of disasters such as flooding.
 Ensuring that enough free disk space is available for normal operations, and
upgrading disk space as required.
 Monitoring jobs running on the database and ensuring that performance is
not degraded by very expensive tasks submitted by some users.

4.. Disk Storage:

 Data files, which store the database itself.


 Data dictionary, which stores metadata about the structure of the database, in
particular the schema of the database.
 Indices, which can provide fast access to data items. A database index
provides pointers to those data items that hold a particular value. For example,
we could use an index to find the instructor record with a particular ID, or all
instructor records with a particular name. Hashing is an alternative to
indexing that is faster in some but not all cases.

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.

Types of DBMS Architecture:


Database architecture can be seen as a single tier or multi-tier. But logically, database architecture is of two types
like: 2-tier architecture and 3-tier architecture.

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

A 3-tier architecture has the following layers:

 Presentation layer (your PC, Tablet, Mobile, etc.)


 Application layer (server)
 Database Server
Database (Data) Tier − At this tier, the database resides along with its query processing languages. We also have
the relations that define the data and their constraints at this level.
Application (Middle) Tier − At this tier reside the application server and the programs that access the database.
For a user, this application tier presents an abstracted view of the database. End-users are unaware of any
existence of the database beyond the application. At the other end, the database tier is not aware of any other user
beyond the application tier. Hence, the application layer sits in the middle and acts as a mediator between the end-
user and the database.
User (Presentation) Tier − End-users operate on this tier and they know nothing about any existence of the
database beyond this layer. At this layer, multiple views of the database can be provided by the application. All
views are generated by applications that reside in the application tier.

The goal of Three Tier client-server architecture is:

 To separate the user applications and physical database


 To support DBMS characteristics
 Program-data independence
 Supporting multiple views of the data

You might also like