Chapter 2 Three Level Architecture
Chapter 2 Three Level Architecture
Software: It is the actual DBMS. Between the physical database itself and the users of
Data: Data acts as the bridge between the machine components and user components.
Components of Database System
Users: There are number of users who can access or retrieve
data on demand using the applications and the interfaces
provided by DBMS. The users can be:
• Naive users
• Online users
• Application Programmers
• Sophisticated Users
• Data base Administrator ( DBA)
Different Types of Database Users in DBMS
1. Application Programmers
• As its name shows, application programmers are the one who writes application
programs that uses the database.
• These programs meet the user requirement and made according to user requirements.
They interact with DBMS through DML (Data manipulation language) calls. And all
these functions are performed by generating a request to the DBMS.
End Users
End users are those who access the database from the terminal end.
They use the developed applications and they don’t have any
knowledge about the design and working of the database.
Their main motto is just to get their task done.
following layers:
• Presentation layer (your PC, Tablet, Mobile, etc.)
• Database Server
Database Schema
The description of the database
Specified during database design
Expected to change when requirements change
Schema Diagram
Most data models have certain conventions for displaying schemas as
diagrams
Displays only some aspects of a schema, such as names of record types
and data items
Some constraints are difficult to represent
Schema Construct
Each object in the schema (e.g., student, course)
Example
Database State or Snapshot
Actual data in the database may change frequently
The data in the database at a particular moment in time is called a
database state or snapshot
Also called the current set of occurrences or instances in the database
Database Schema vs. Database State
Valid State: A state that satisfies the structure and the constraints
specified in the schema
Internal schema at the internal level to describe data storage structures and
access paths. Typically uses physical data model.
Conceptual schema at the conceptual level to describe the structure and
constraints for the whole data se. Uses a conceptual or an implementation
data model.
External schema at the external level to describe the various user views.
Usually uses the same data model as the conceptual level.
External Level
Conceptual Level
Internal Level
External Level or View level
It is the users’ view of the
database.
It describes that part of the
database that is relevant to each
user.
It is closest to the end users.
External level is also known as
the view level.
External Level or View level
It deals with the way in which
individual users view data.
Individual users are given
views according to their requirements.
different
Example: one user may view dates
theinform (day, month, while
year),
another may view dates as
month, day).
(year,
One may be interested in First
Name other may be in
Name. Name and Last
First
Conceptual Level or Logical
Level
This level must not contain any storage
dependent details.
For example it contains
only information about data type and
its size
but not any storage considerations,
such as the number of bytes occupied.
Conceptual level is also known as
the logical level.
Conceptual Level or Logical
Level
This level deals with
All entities, their attributes,
and their relationships
The constraints on the data
Security and integrity information
Internal Level or Storage
level
It is the physical representation of
the database on the computer.
This level describes how the data
is stored in the database.
It concerns the way the data are
physically stored on the
hardware.
Internal Level or Storage
level
The internal level is concerned with
Storage space allocation for
data and indexes;
Record descriptions for
storage (with stored sizes for data
items);
Record placement;
Data compression and
data encryption techniques.
Three Level Architecture
Mapping between the Views
Mapping between Views
External/Conceptual Mapping:
Each external schema is related to the
conceptual schema by
external/conceptual mapping.
the
It maps logical record in the
view to one (or more)
external
conceptual record(s) in the conceptual
view.
Mapping between Views
Conceptual/Internal Mapping:
Conceptual schema is related to
internal
the schema by
conceptual/internal mapping.
the
This enables the DBMS to find the
actual record or combination of records
in physical storage that constitute a
logical record in conceptual schema.
Schema
The External view is described by means of a schema called external schema that
correspond to different views of the data.
Similarly the Conceptual view is defined by conceptual schema, which describes all
the entities, attributes, and relationship together with integrity constraints.
Internal View is defined by internal schema, which is a complete description of the
internal model, containing definition of stored records, the methods of representation,
the data fields, and the indexes used.
Data Independence
Achievement of Three Level Architecture
Data Independence