Lecture 2 Dbms
Lecture 2 Dbms
The architecture of most commercial DBMSs is based on the ANSI-SPARC architecture (1975). It was
devised by American National Standards Institute (ANSI) and Standards Planning And Requirements
Committee (SPARC). The ANSI-SPARC model of a database identifies three distinct levels at which
data items can be described. These levels form a three-level architecture comprising of an external level, a
conceptual level, and an internal level.
Objectives of Three-Level Architecture
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
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.
ANSI-SPARC Three-level Architecture
External Level - Describes that part of database that is relevant to a particular user. Users' view of the
database.
Conceptual Level - Community view of the database. Describes what data is stored in database and
relationships among the data.
Internal Level - it’s the Physical representation of the database on the computer. Describes how the data
is stored in the database
With reference to the ANSI-SPARC (3-levels) architecture, data independence means that upper levels
are not affected by changes at the lower level. They are of two types
2. Physical Data independence - Refers to immunity of conceptual schema to changes in the internal
schema. Internal schema changes (e.g. using different file organizations, storage
structures/devices) should not require change to conceptual or external schemas.
Mapping refers to the linking of two or more levels of schemas in the DBMS. The DBMS checks the
schemas for consistency e.g Each external schema must be derivable from the conceptual schema. There
two types of mapping mainly:
1. External /conceptual mapping - This enables the DBMS to map data in the user’s view onto the
relevant part of the conceptual schema.
2. Conceptual/internal mapping - This enables the DBMS to find the actual record or combination
of records in physical storage that constitute a logical record in the conceptual schema. As shown
below :
Data Models
Definition: Integrated collection of concepts for describing data, relationships between data, and
constraints on the data in an organization.
Data models provides the basic concepts and notation that will allow databases designers and users
accurately communicate with the organisation. They are of three categories; (1) object-based data models
(2) Record based data models (3) Physical Data models.
In this Course SCT 113 , we shall look into Record Based data models with much emphasizes on
relational data model.
In this category we have three sub categories (1) Network Data Model (2) Hierarchical Data Model (3)
Relational Data Model.
(1) Network data models – Data is represented as a collection of records and relationships organised
in a generalised graph structure with the parent (base) relation or record appearing on the left side
and the child relation appearing on the right. The example of the network model below shows the
campus records with the course records as the parents and the students under each course as child
relations.
(2)Hierarchical Model – it transform the records in to a hierarchical structure with a root record. Each
record (child) has a parent, either a normal parent or the root. To get a given record a search algorithm is
used. Using the same example of the campus records the hierarchical structure could be as follows.
Root Record (Campus)
Courses records
ICT faculty
Business. faculty
BICTM DICTM
BBIT
BBA
DBMS
The Server holds the database and the DBMS and the Client manages user interface and runs
applications. The advantages include:
increased performance
Increased consistency.