DBMS Lec No 3
DBMS Lec No 3
1
Database Management
Systems
Lecture -3
2
Introduction
Database Architecture
3 layer architecture
Data Independence
3
Data Models (Terms)
Models
(1) Levels or views of the Database
Conceptual, logical, physical
10/19/24
Models (1)
10/19/24
Data Models(2): History
Hierarchical Model (1960’s and
1970’s)
Similar to data structures in programming
languages.
Books
(id, title)
Authors
Publisher Subjects
(first, last)
10/19/24
Data Models(2): History
Network Model (1970’s)
Provides for single entries of data and
navigational “links” through chains of
data.
Authors
Subjects Books
Publishers
10/19/24
Data Models(2): History
Relational Model (1980’s)
Provides a conceptually simple model for
data as relations (typically considered
“tables”) with all data visible.
10/19/24
Data Models(2): History
Object Oriented Data Model (1990’s)
Encapsulates data and operations as
“Objects”
Books
(id, title)
Authors
Publisher Subjects
(first, last)
10/19/24
Data Models(2): History
Object-Relational Model (1990’s)
Combines the well-known properties of
the Relational Model with such OO
features as:
User-defined datatypes
User-defined functions
10/19/24
Database System Life Cycle
Physical
Creation
2
Design Conversion
1 3
Growth,
Change, & Integration
Maintenance
4
6
Operations
5
10/19/24
Design
Determination of the needs of the
organization
Development of the Conceptual Model
of the database
Typically using Entity-Relationship
diagramming techniques
Construction of a Data Dictionary
Development of the Logical Model
10/19/24
Physical Creation
10/19/24
Conversion
Convert existing data sets and
applications to use the new database
May need programs, conversion utilities
to convert old data to new formats.
10/19/24
Integration
Overlaps with Phase 3
Integration of converted applications
and new applications into the new
database
10/19/24
Operations
All applications run full-scale
Privacy, security, access control must
be in place.
Recovery and Backup procedures
must be established and used
10/19/24
Growth, Change & Maintenance
Change is a way of life
Applications, data requirements, reports,
etc. will all change as new needs and
requirements are found
The Database and applications and will
10/19/24
Another View of the Life Cycle
Integration
4 Operations
5
Design
Physical 1
Creation Conversion Growth,
2 3 Change
6
10/19/24
Data, Database, Data Model and DBMS
interact
End users
Software
Application
Application
Programmers
Programs develop
“What” to
get
Database
DBMS
maintainAdministrators
“How” to
get
Data
design Database
Database Designers
Users
19
Architecture
20
Database Architecture
A basis for understanding DBMS functionalities
Three levels at which data can be described
Objective:
Separate users view from the physical
representation
Why?
Consolidated representation
21
The Three-Level Architecture
User 1 User 2 User n
Internal
Internal Level Schema
Physical Data
Organization Database
Level 1 (External View)
23
Continue…(External View)
DBMS uses external views to create user interface
for different users which is both the facility and
barrier
User’s external view is created after considering
data access, reports, and the transactions needs.
External schema evolves as user needs are
modified over time
24
Example of external view
Saleem
External Layer
Lower Layers
Level 2 Logical or Conceptual View
A complete description of the
information content of the database
Conceptual Schema
The entire information structure of the
database, as seen by the DBA
The community view of data
26
Continue….(Conceptual Schema)
Contains record types representing
Entities,
27
Example
Schema definition
28
Employee Data Workers
Saleema
First Name: Rana Name: R. Aslam
Last Name: Aslam Age: 24y,10d
Date of Birth: Dept: Sales
12 Sep, 1970
Saleem
External Layer
Conceptual Layer
30
Physical Level
31
Inter-Schema Mappings
Also a part of 3-level architecture
External/conceptual mapping
Conceptual/Internal
Ext/Con Mapping
Specifies mapping between objects in the external view
to those in the logical model
Con/Int Mapping
Specifies mapping between objects in the logical model
to those in the physical model-data independence
32
3-Level Architecture
01110011010011100101001010100101010010101…..
Data Independence
A major outcome of 3-L Arch
The immunity of applications to change in
storage structure and access strategy
Changes in lower level do not affect the upper
levels
35
Data Independence Types
36
Logical Data Independence
Changes in conceptual model do not affect the external
views
Immunity of external level from changes at conceptual level
Types of Changes
Adding a new file/index etc.
Adding a new field in a file
Changing type/size
Deleting an attribute
37
Physical Data Independence
Changes in the internal model do not affect the conceptual
model
Immunity of Conceptual level from changes at Internal level
Changes Examples.
Changing file organization
Index implementation, hash, tree etc.
Changing storage medium
38
3-Level Architecture (review)
41