U1 - System Architecture
U1 - System Architecture
MANAGEMENT SYSTEM
ARCHITECTURE
1
Data Models
Data Model
– A collection of concepts that can be used to describe
the structure of a database
– By the structure we mean the data types,
relationships and constraints that should hold on the
data
– Also includes basic operations for specifying
retrievals and updates on the database
– It is becoming more common to include concepts to
specify the dynamic aspect or behavior of a
database application
2
Objectives
• All users should be able to access same
data.
• A user’s view is immune to changes made
in other views.
• Users should not need to know physical
database storage details.
3
• DBA should be able to change database
storage structures without affecting the
users’ views.
• Internal structure of database should be
unaffected by changes to physical aspects
of storage.
• DBA should be able to change conceptual
structure of database without affecting all
users.
4
DBMS ARCHITECTURE
5
DBMS ARCHITECTURE
6
DBMS ARCHITECTURE
7
Three Level Architecture of
DBMS
A major purpose of a database system is
to provide users with an abstract view of the
data. That is, the system hides certain details
of how the data is stored and maintained.
• External or View Level
• Conceptual Level
• Internal or Physical Level
8
Three Level Architecture of
DBMS continue…
Conceptual
Level
Physical
Level
9
Three Level Architecture of DBMS
continue…
Sales Officer Inventory Controller
View 1 View 2
External Item_Name Item_Name
Level Price Stock
Conceptual
Conceptual Item_Number Character (6)
Item_Name Character(30)
Level Price Numeric(5,2)
Stock Numeric(4)
Physical
Stored_Item Length=50
Physical Item # Type = Byte(6), offset = 0, Index = Ix
Name Type = Byte(30), offset = 6
Level Price Type = Byte(8), offset = 36
Stock Type = Byte(4), offset = 44
10
External or View Level
This level is closest to the users and is concerned
with the way in which the data is viewed by
individual users. Most of the users are not
concerned with all the information contained in the
database. Instead they need only a part of the
database relevant to them. The system provides
many views for the same database.
11
External or View Level
continue…
12
External or View Level
continue…
13
Conceptual Level
This level of abstraction describes what data are
actually stored in the database. It also describes the
relationships existing among data. At this level, the
database is described logically in terms of simple data
structures.
The users of this level are not concerned with how these
logical data structures will be implemented at the
physical level, rather they just are concerned about
what information is to be kept in the database.
14
Conceptual Level
continue…
15
Conceptual Level
continue…
16
Internal or Physical Level
• Lowest level of abstraction.
• Describes how the data are physically stored.
• Internal view – internal schema (not only defines the
various types of stored record but also specifies what
indexes exists, how files are represented, etc.)
• The internal level is closest to physical storage. This
level is also termed as physical level. It describes how
the data are actually stored on the storage medium. At
this level, complex low-level data structures are
described in detail.
17
Data Independence
The ability to modify a schema definition in one
level without affecting a scheme definition in
the next higher level is called DATA
INDEPENDENCE
18
Physical Data Independence
It refers to the ability to modify the scheme followed
at the physical level without affecting the scheme followed at
the conceptual level.
The application programs remain the same even
though the scheme at the physical level gets modified.
Modifications at the physical level are occasionally
necessary in order to improve performance of the system.
19
Logical Data Independence
It refers to the ability to modify the conceptual
scheme without causing any changes in the schemes followed
at view levels.
The logical data independence ensures that the
application programs remain the same.
Modifications at the conceptual level are necessary
whenever logical structures of the database get altered
because of some unavoidable reasons.
20
Physical & Logical
Data Independence
• It is more difficult to achieve logical data
independence than the physical data
independence.
• The reason being that the application programs
are heavily dependent on the logical structure of
the database.
21
Physical DBMS Architecture
• Describes the software components used
to enter and process data.
• How these s/w components are related
and interconnected.
22
DBMS Structure
General users AP Query DBA
Database
Manager
File
Manager
Database
DDL – set of commands required toManager
define the format of data.
DML – set of commands that modify, process data.
File
DML precompiler converts DML statements embedded in an
Manager
application program to normal procedural calls in the host
language. It interacts with the query processor in order to
generate the appropriate code. Data Files Data Dict. 24
DBMS Structure
General users AP Query DBA
Database
Manager
Database
Manager
File
Manager
Database
Manager
Components System
Application Database
Programs Calls Schema
• Authorization Control
• Command Processor
Object Code DML Query DDL
• Integrity Checker
Of Program Precompiler Processor Compiler
• Query Optimizer
• Transaction Manager Database
• Scheduler Manager
• Recovery Manager
• Buffer Manager File
Manager
Components System
Application Database
Programs Calls Schema
• Authorization Control
• Command Processor
Object Code DML Query DDL
• Integrity Checker
Of Program Precompiler Processor Compiler
• Query Optimizer
• Transaction Manager Database
• Scheduler Manager
• Recovery Manager
• Buffer Manager File
Checks that the user has necessary
Manager authorization to
carry out the required function.
Components System
Application Database
Programs Calls Schema
• Authorization Control
• Command Processor
Object Code DML Query DDL
• Integrity Checker
Of Program Precompiler Processor Compiler
• Query Optimizer
• Transaction Manager Database
• Scheduler Manager
• Recovery Manager
• Buffer Manager File
Manager
Converts commands to a logical sequence of steps.
Components System
Application Database
Programs Calls Schema
• Authorization Control
• Command Processor
Object Code DML Query DDL
• Integrity Checker
Of Program Precompiler Processor Compiler
• Query Optimizer
• Transaction Manager Database
• Scheduler Manager
• Recovery Manager
• Buffer Manager File
Checks the requested operation satisfies all necessary
Manager
integrity constraints such as key constraints.
Components System
Application Database
Programs Calls Schema
• Authorization Control
• Command Processor
Object Code DML Query DDL
• Integrity Checker
Of Program Precompiler Processor Compiler
• Query Optimizer
• Transaction Manager Database
• Scheduler Manager
• Recovery Manager
Examines the query language statements and tries to
• Buffer Manager File
choose the best and most efficient
Managerway to executing
the query. Factors – CPU time, disk time, network
time, sorting methods and scanning methods.
Data Files Data Dict. 33
DBMS Structure
General users AP Query DBA
Components System
Application Database
Programs Calls Schema
• Authorization Control
• Command Processor
Object Code DML Query DDL
• Integrity Checker
Of Program Precompiler Processor Compiler
• Query Optimizer
• Transaction Manager Database
• Scheduler Manager
• Recovery Manager
• Buffer Manager File
Manager
The transaction manager maintains tables of
authorization concurrency.
Data Files Data Dict. 34
DBMS Structure
General users AP Query DBA
Components System
Application Database
Programs Calls Schema
• Authorization Control
• Command Processor
Object Code DML Query DDL
• Integrity Checker
Of Program Precompiler Processor Compiler
• Query Optimizer
• Transaction Manager Database
• Scheduler Manager
• Recovery Manager
• Buffer Manager File
Manager
It controls the relative order in which transaction
operations are executed.
Data Files Data Dict. 35
DBMS Structure
General users AP Query DBA
Components System
Application Database
Programs Calls Schema
• Authorization Control
• Command Processor
Object Code DML Query DDL
• Integrity Checker
Of Program Precompiler Processor Compiler
• Query Optimizer
• Transaction Manager Database
• Scheduler Manager
• Recovery Manager
• Buffer Manager File
Manager
Ensures that the database remains in a consistent state
in the presence of failures. Responsible for transaction
commit and abort.
Data Files Data Dict. 36
DBMS Structure
General users AP Query DBA
Components System
Application Database
Programs Calls Schema
• Authorization Control
• Command Processor
Object Code DML Query DDL
• Integrity Checker
Of Program Precompiler Processor Compiler
• Query Optimizer
Responsible for the transfer of data between main
• Transaction Manager
memory and secondary storage.Database
• Scheduler Manager
• Recovery Manager
• Buffer Manager File
Manager