0% found this document useful (0 votes)
89 views

Three Level Architecture

The document describes the ANSI-SPARC three-level database architecture, which defines three levels of data abstraction: the external schema, conceptual schema, and internal schema. The external schema represents different user views of the data. The conceptual schema represents the overall logical design and is independent of physical storage. The internal schema describes how data is physically stored. This architecture provides data independence, allowing each level to change without affecting the other levels.

Uploaded by

crybert zinyama
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
89 views

Three Level Architecture

The document describes the ANSI-SPARC three-level database architecture, which defines three levels of data abstraction: the external schema, conceptual schema, and internal schema. The external schema represents different user views of the data. The conceptual schema represents the overall logical design and is independent of physical storage. The internal schema describes how data is physically stored. This architecture provides data independence, allowing each level to change without affecting the other levels.

Uploaded by

crybert zinyama
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 24

ANSI SPARC THREE-Level

ACHITECTURE
OBJECTIVES

TO Describe the components of the 3-level


database architecture
To explain the concept of data independence
What is a database Schema?
 A database schema is the skeleton structure
that represents the logical view of the entire
database.
 Purpose:
◦ Describes how the data is organized and how the
relations (tables) among them are associated.
◦ Typically, a database designer creates a database
schema to help programmers whose
software/applications/programs will interact with
the database.
Database Schema features
 It formulates all the constraints (rules) that
are to be applied on the data.
 A database schema defines its entities and

the relationship among them.


 It contains a descriptive detail of the

database, which can be depicted by means of


schema diagrams.
ANSI-SPARC 3-level Architecture
 American National Standards Institute (ANSI) and
Standards Planning and Requirements Committee
(SPARC)
 In the early 1970s, the ANSI-SPARC defined a framework

for data modelling based on degrees of data


abstraction.
◦ You can use this framework to better understand database
models,
 The framework has been expanded with the addition of
a physical model to explicitly address physical-level
implementation details of the internal model.
 The ANSI/SPARC architecture defines three levels of data

abstraction: external, conceptual, and internal.


ANSI-SPARC 3-level Architecture
External schema/sub
schema/Users’ view
 Users’ view of the database.
◦ The way in which users perceive data
 Consists of a number of different views of the database
 Each user has a view of his or her own of “real world” represented

in a form a user is familiar with


 Different views may have different presentation of the same data
◦ For example two users can see same date in different formats. One may want to see it as
mm/dd/yy and the other user may see it in dd/mm/yy
 Each external schema describes the part of the database that a
particular user group is interested in and hides the rest of the
database from that user group.
 Some views may include derived or calculated data whenever

needed.
 External schema is a subset of the conceptual schema (sub-

schema)
The External Schema ctd
 Describes that part of database that is relevant to a
particular user.
Conceptual Schema/Schema
Contains the logical structure of entire database seen
by the DBA.
 Also known as the community view of the database.
◦ It is the complete view of data requirements of an organisation
 The conceptual view represents:
◦ All entities and their attributes and relationships.
◦ Constraints on data (tables, views, and integrity constraints)
◦ Security and integrity of information
 a representational data model is used to describe
the conceptual schema when a database system is
implemented. (ERD)
Conceptual Schema/Schema ctd
 The level supports every external view in that
any data available to the user must be
contained in, or derivable from conceptual
level
 The level does not contain any description

about storage details.


 The conceptual schema hides the details of

physical storage structures .


Conceptual schema
 Describes what data is stored in database and
relationships among the data items.
Internal Level

The way in which DBMS and operating system


perceive data, where data is actually stored using
data structures and file organisations.
Physical representation of the database on the
computer
 Internal level covers data structures and file

organisations used for storing data on storage


device
 Internal level interfaces with the operating
system access methods such as (file
management techniques, storing and
retrieval of data records)
 Normally not seen by the user or applications
developer
Internal Schema

 Describes how the data is stored in the


database.
Create table Branch(
BName varchar(25),
BNum INT,
primary key(BNum)
);
Create table Staff(
Sno int,
Fname varchar(25),
Lname varchar(25),
age int,
salary DECIMAL,
BNum Int,
primary key(Sno),
foreign key(BNum) references Branch(BNum)
);
Purpose of the Three-Level
Architecture
 To separate each user’s view of the database
from the way database is physically stored.
Why is this desirable?
◦ Each user should access the same but having a
customized view of data.
◦ Each user should be able to customize the view of
data without affecting other users
◦ The Internal structure of the database should not be
affected by the changes made to the physical aspects
of storage.
◦ The DBA should be able to change the conceptual
structure of the data without affecting users.
Data Independence
 The three-schema architecture can be used
to further explain the concept of data
independence, which can be defined as the
capacity to change the schema at one level of
a database system without having to change
the schema at the next higher level.
 We can define two types of data

independence:
◦ Logical Data independence
◦ Physical data independence
Logical data independence
 Refers to immunity of external schemas to changes in
conceptual schema.
◦ is the capacity to change the conceptual schema without
having to change external schemas or application
programs.
◦ Conceptual schema changes (e.g. addition/removal of entities).
 We may change the conceptual schema to expand
the database (by adding a record type or data
item), to change constraints, or to reduce the
database (by removing a record type or data item).
 Should not require changes to external schema

or rewrites of application programs.


Physical data independence
 Refers to immunity of conceptual schema to
changes in the internal schema.
◦ is the capacity to change the internal schema
without having to change the conceptual schema.
Hence, the external schemas need not be changed
as well.
◦ Internal schema changes (e.g. using different file
organizations, storage structures/devices).
 Should not require change to conceptual or
external schemas.
Three- Level Architecture and Data
Independence
Question ?
 Define database.
 Explain the three level architecture of DBMS.
 What is the difference between physical data

independence and logical data independence?


 What are the advantages of data

independence?
Conclusion
 As a database designer, it is important to
understand the three-level architecture
especially the conceptual schema because all
data needs are defined at that level.
References
Elmasri, R. & Navathe, S., 2013. Fundamentals
of Database Systems. 4th ed. Boston: Digital
Vision.
Ramakrishnan, R. & Gehrke, J., 2010. Database
management Systems. 4th ed. New York:
MaGraw-Hill.
Rob, P. & Coronel, C., 2012. Database Systems:
Design Implementation and Management. 8th
ed. Massachuets: Course Technology.

You might also like