Download DBMS_Introduction

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

Entity–attribute–value model wikipedia , lookup

IMDb wikipedia , lookup

Extensible Storage Engine wikipedia , lookup

Open Database Connectivity wikipedia , lookup

Microsoft Jet Database Engine wikipedia , lookup

Concurrency control wikipedia , lookup

Functional Database Model wikipedia , lookup

Relational model wikipedia , lookup

Database wikipedia , lookup

Clusterpoint wikipedia , lookup

Versant Object Database wikipedia , lookup

Database model wikipedia , lookup

Transcript
DATABASE
MANAGEMENT SYSTEM
ARCHITECTURE
Learners Support Publications www.lsp4you.com
1
DBMS ARCHITECTURE
• The logical DBMS architecture
• The physical DBMS architecture
Learners Support Publications www.lsp4you.com
2
DBMS ARCHITECTURE
• The logical DBMS architecture
The logical architecture deals with the way data
is stored and presented to users.
• The physical DBMS architecture
Learners Support Publications www.lsp4you.com
3
DBMS ARCHITECTURE
• The logical DBMS architecture
The physical architecture is concerned with the
s/w components that make up a DBMS.
• The physical DBMS architecture
Learners Support Publications www.lsp4you.com
4
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
Learners Support Publications www.lsp4you.com
5
Three Level Architecture of DBMS
continue…
External
View 1
Level
View 2
View 3
Conceptual
Level
Physical
Level
Learners Support Publications www.lsp4you.com
6
Three Level Architecture of DBMS
continue…
Sales Officer
External
Level
Conceptual
Level
Physical
Level
View 1
Item_Name
Price
Inventory Controller
View 2
Item_Name
Stock
Conceptual
Item_Number
Item_Name
Price
Stock
Character (6)
Character(30)
Numeric(5,2)
Numeric(4)
Physical
Stored_Item
Item #
Name
Price
Stock
Length=50
Type = Byte(6), offset = 0, Index = Ix
Type = Byte(30), offset = 6
Type = Byte(8), offset = 36
Type = Byte(4), offset = 44
Learners Support Publications www.lsp4you.com
7
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.
Learners Support Publications www.lsp4you.com
8
External or View Level
continue…
• Highest level of abstraction of database.
• Allows to see only the data of interest to them.
• Users – Application programmers or end-users.
• Any no. of external views – external schema.
Learners Support Publications www.lsp4you.com
9
External or View Level
continue…
• It consists of the definition of logical records
and relationships in the external view.
• It also contains the methods for deriving the
objects such as entities, attributes and
relationships in the external view from the
Conceptual View.
Learners Support Publications www.lsp4you.com
10
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.
Learners Support Publications www.lsp4you.com
11
Conceptual Level
continue…
• The sum total of DBMS users view.
• Describes what data are actually stored in the
database (ie,all the records and relationships
included in the database).
Learners Support Publications www.lsp4you.com
12
Conceptual Level
continue…
• The conceptual view is a representation of the
entire information content of the database in a
form that is some what abstract in comparison
with the way in which the data is physically
stored.
Learners Support Publications www.lsp4you.com
13
Conceptual Level
continue…
• The conceptual view is defined by means of the
conceptual schema, which includes the
definition of each of the various types of
conceptual records and the mapping between the
conceptual schema and the internal schema.
Learners Support Publications www.lsp4you.com
14
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.)
Learners Support Publications www.lsp4you.com
15
Internal or Physical Level
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 lowlevel data structures are described in detail.
Learners Support Publications www.lsp4you.com
16
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
• Physical Data Independence
• Logical Data Independence
Learners Support Publications www.lsp4you.com
17
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.
Learners Support Publications www.lsp4you.com
18
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.
Learners Support Publications www.lsp4you.com
19
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.
Learners Support Publications www.lsp4you.com
20
Physical DBMS Architecture
• Describes the software components used to
enter and process data.
• How these s/w components are related and
interconnected.
Learners Support Publications www.lsp4you.com
21
DBMS Structure
General users
AP
Application
Programs
System
Calls
Object Code
Of Program
DML
Precompiler
Query
DBA
Database
Schema
Query
Processor
DDL
Compiler
Database
Manager
File
Manager
Data Files
Learners Support Publications www.lsp4you.com
Data Dict.
22
DBMS Structure
General users
AP
Application
Programs
System
Calls
Object Code
Of Program
DML
Precompiler
Query
DBA
Database
Schema
Query
Processor
DDL
Compiler
Database
Manager the
define
DDL – set of commands required to
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.
Learners Support Publications www.lsp4you.com
23
DBMS Structure
General users
AP
Application
Programs
System
Calls
Object Code
Of Program
DML
Precompiler
Query
DBA
Database
Schema
Query
Processor
DDL
Compiler
Database
Manager
DDL compiler converts DDL statements into a set of tables
File in a form that can be
containing metadata tables – which are
Manager
used by other components of the DBMS. These are stored in
system catalog or data dictionary.
Data Files
Learners Support Publications www.lsp4you.com
Data Dict.
24
DBMS Structure
General users
AP
Application
Programs
System
Calls
Query
Database
Schema
Manages the allocation of space on disk storage.
Object Code
Of Program
DML
Precompiler
DBA
Query
Processor
DDL
Compiler
Database
Manager
File
Manager
Data Files
Learners Support Publications www.lsp4you.com
Data Dict.
25
DBMS Structure
General users
AP
Application
Programs
System
Calls
Object Code
Of Program
DML
Precompiler
Query
DBA
Database
Schema
Query
Processor
DDL
Compiler
Database
Manager
File statements and
Responsible for receiving query language
Manager
changing to a form the DBMS can understand. It has two
parts : (i) parser (ii) query optimizer
Data Files
Learners Support Publications www.lsp4you.com
Data Dict.
26
DBMS Structure
General users
AP
Application
System
It is Programs
the interface b/w
lowCalls
level
data,
application
programs and queries. It
enforces
to
Object Codeconstraints
DML
Of Program
Precompilerand
maintain
the consistency
integrity of the data as well as
its security. It synchronizes the
concurrent access. It also
perform backup and recovery
operations.
Query
Database
Schema
Query
Processor
DDL
Compiler
Database
Manager
File
Manager
Data Files
Learners Support Publications www.lsp4you.com
DBA
Data Dict.
27
DBMS Structure
General users
AP
Query
Application
Components System
Programs
Calls
•
•
•
•
•
•
•
•
Authorization Control
Command Processor
Object Code
DML
Integrity
CheckerPrecompiler
Of Program
Query Optimizer
Transaction Manager
Scheduler
Recovery Manager
Buffer Manager
Database
Schema
Query
Processor
DDL
Compiler
Database
Manager
File
Manager
Data Files
Learners Support Publications www.lsp4you.com
DBA
Data Dict.
28
DBMS Structure
General users
AP
Query
Application
Components System
Programs
Calls
•
•
•
•
•
•
•
•
DBA
Database
Schema
Authorization Control
Command Processor
Object Code
DML
Query
DDL
Integrity
CheckerPrecompiler
Of Program
Processor
Compiler
Query Optimizer
Transaction Manager
Database
Manager
Scheduler
Recovery Manager
File
Buffer Manager
Manager
Checks that the user has necessary
authorization to carry
out the required function.
Data Files
Learners Support Publications www.lsp4you.com
Data Dict.
29
DBMS Structure
General users
AP
Query
Application
Components System
Programs
Calls
•
•
•
•
•
•
•
•
DBA
Database
Schema
Authorization Control
Command Processor
Object Code
DML
Query
DDL
Integrity
CheckerPrecompiler
Of Program
Processor
Compiler
Query Optimizer
Transaction Manager
Database
Manager
Scheduler
Recovery Manager
File
Buffer Manager
Manager
Converts commands to a logical sequence of steps.
Data Files
Learners Support Publications www.lsp4you.com
Data Dict.
30
DBMS Structure
General users
AP
Query
Application
Components System
Programs
Calls
•
•
•
•
•
•
•
•
DBA
Database
Schema
Authorization Control
Command Processor
Object Code
DML
Query
DDL
Integrity
CheckerPrecompiler
Of Program
Processor
Compiler
Query Optimizer
Transaction Manager
Database
Manager
Scheduler
Recovery Manager
File
Buffer Manager
Manager
Checks the requested operation
satisfies all necessary
integrity constraints such as key constraints.
Data Files
Learners Support Publications www.lsp4you.com
Data Dict.
31
DBMS Structure
General users
AP
Query
Application
Components System
Programs
Calls
•
•
•
•
•
•
•
•
DBA
Database
Schema
Authorization Control
Command Processor
Object Code
DML
Query
DDL
Integrity
CheckerPrecompiler
Of Program
Processor
Compiler
Query Optimizer
Transaction Manager
Database
Manager
Scheduler
Recovery Manager
Examines the query language statements and tries to
File
Buffer Manager
choose the best and most efficient
way to executing the
Manager
query. Factors – CPU time, disk time, network time,
sorting methods and scanning methods.
Data Files
Learners Support Publications www.lsp4you.com
Data Dict.
32
DBMS Structure
General users
AP
Query
Application
Components System
Programs
Calls
•
•
•
•
•
•
•
•
Authorization Control
Command Processor
Object Code
DML
Integrity
CheckerPrecompiler
Of Program
Query Optimizer
Transaction Manager
Scheduler
Recovery Manager
Buffer Manager
The
transaction manager
authorization concurrency.
Database
Schema
Query
Processor
DDL
Compiler
Database
Manager
File
Manager
maintains
Data Files
Learners Support Publications www.lsp4you.com
DBA
tables
Data Dict.
of
33
DBMS Structure
General users
AP
Query
Application
Components System
Programs
Calls
•
•
•
•
•
•
•
•
Authorization Control
Command Processor
Object Code
DML
Integrity
CheckerPrecompiler
Of Program
Query Optimizer
Transaction Manager
Scheduler
Recovery Manager
Buffer Manager
Database
Schema
Query
Processor
DDL
Compiler
Database
Manager
It controls the relative order
operations are executed.
File
Manager
in which transaction
Data Files
Learners Support Publications www.lsp4you.com
DBA
Data Dict.
34
DBMS Structure
General users
AP
Query
Application
Components System
Programs
Calls
•
•
•
•
•
•
•
•
DBA
Database
Schema
Authorization Control
Command Processor
Object Code
DML
Query
DDL
Integrity
CheckerPrecompiler
Of Program
Processor
Compiler
Query Optimizer
Transaction Manager
Database
Manager
Scheduler
Recovery Manager
File
Buffer Manager
Manager
Ensures that the database remains in a consistent state in
the presence of failures. Responsible for transaction
commit and abort.
Data Files
Learners Support Publications www.lsp4you.com
Data Dict.
35
DBMS Structure
General users
AP
Query
Application
Components System
Programs
Calls
•
•
•
•
•
•
•
•
DBA
Database
Schema
Authorization Control
Command Processor
Object Code
DML
Query
DDL
Integrity
CheckerPrecompiler
Of Program
Processor
Compiler
Query Optimizer
Responsible for the transfer of data between main
Transaction Manager
memory and secondary storage. Database
Manager
Scheduler
Recovery Manager
File
Buffer Manager
Manager
Data Files
Learners Support Publications www.lsp4you.com
Data Dict.
36
Questions ?
Learners Support Publications www.lsp4you.com
37