DATABASE
ABSTRACTION
Presented by:
Dr.Ritu Bhargava
Sophia Girls’College(Autonomous)
Ajmer
DATABASE ABSTRACTION
• The major purpose of a database system is to provide users
with an abstract view of the system. The system hides
certain details of how data is stored and created and
maintained
• Complexity should be hidden from database users.
2
The data in DBMS is described at three levels
of abstraction:
1) Internal or physical level
2)Conceptual level
3)External level
3
4
INTERNAL LEVEL
• At the internal or physical level,Students are
represented by a stored record type called
STORED-STU ,which is a 74 character long.
• Student record contains 4 fields or data items.
5
6
STORED-STU record length 74
SID 4 INTEGER OFFSET 0 UNIQUE
SNAME STRING LENGTH 20 OFFSET 0
SMAJOR STRING LENGTH 40 OFFSET 64
SCREDIT DEC 5,2 OFFSET 69
• INTERNAL LEVEL is the physical representation of the
database .
• This is the lowest abstraction of database.
• This level indicates HOW the data will be stored on the
Database and describes the data structure,file structure and
access methods to be used by the database.
• The internal schema defines the stored record ,methods of
representing data, indexing,data compression and
encryption techniques.
7
CONCEPTUAL LEVEL
STORED-STU record length 69
SID : INTEGER (4)
SNAME :STRING (20)
SMAJOR :STRING (40)
SCREDIT: DEC ( 5,2)
8
• At the conceptual level,the database contains information
concerning an entity type called STUDENT
• Each individual student has a SID,SNAME,SMAJOR,SCREDIT
• All the Database entities and relationships are included in this
databse abstraction .
• It descibes WHAT data is stored in the database and the
relationships among the data
• IT contains the logical structure of entire databse and seen by
DBA.
• It applies constraints on the data,has semantic information
about the data,checks to retain data consistency and
integrity,security information.
9
EXTERNAL LEVEL
USER VIEW 1 USER VIEW2
10
• EXTERNAL LEVEL is the user’s view of the database.
• This level is the highest level of abstraction .
• This level describes that part of database which is relevant to the
users.
• Any number of user views, may exist for a given conceptual or
global view of the database.
• It includes only those entities, attributes ,relationships in the real
world that is user is interested in. Other may be present in
database but user is not aware of it.
11
• In the external level, different views may have different
representation on the same data.
• Some view include derived or calculculated data i.e data is
not stored in the database ,but are related when needed .
• This schema consists of the defination of the logical
records and the relationships in the external view.
• The external Schema is written using external DDL.
• It also contains the method of deriving objects in the view
from the objects in conceptual level.
12
THANK YOU

Database abstraction

  • 1.
  • 2.
    DATABASE ABSTRACTION • Themajor purpose of a database system is to provide users with an abstract view of the system. The system hides certain details of how data is stored and created and maintained • Complexity should be hidden from database users. 2
  • 3.
    The data inDBMS is described at three levels of abstraction: 1) Internal or physical level 2)Conceptual level 3)External level 3
  • 4.
  • 5.
    INTERNAL LEVEL • Atthe internal or physical level,Students are represented by a stored record type called STORED-STU ,which is a 74 character long. • Student record contains 4 fields or data items. 5
  • 6.
    6 STORED-STU record length74 SID 4 INTEGER OFFSET 0 UNIQUE SNAME STRING LENGTH 20 OFFSET 0 SMAJOR STRING LENGTH 40 OFFSET 64 SCREDIT DEC 5,2 OFFSET 69
  • 7.
    • INTERNAL LEVELis the physical representation of the database . • This is the lowest abstraction of database. • This level indicates HOW the data will be stored on the Database and describes the data structure,file structure and access methods to be used by the database. • The internal schema defines the stored record ,methods of representing data, indexing,data compression and encryption techniques. 7
  • 8.
    CONCEPTUAL LEVEL STORED-STU recordlength 69 SID : INTEGER (4) SNAME :STRING (20) SMAJOR :STRING (40) SCREDIT: DEC ( 5,2) 8
  • 9.
    • At theconceptual level,the database contains information concerning an entity type called STUDENT • Each individual student has a SID,SNAME,SMAJOR,SCREDIT • All the Database entities and relationships are included in this databse abstraction . • It descibes WHAT data is stored in the database and the relationships among the data • IT contains the logical structure of entire databse and seen by DBA. • It applies constraints on the data,has semantic information about the data,checks to retain data consistency and integrity,security information. 9
  • 10.
    EXTERNAL LEVEL USER VIEW1 USER VIEW2 10
  • 11.
    • EXTERNAL LEVELis the user’s view of the database. • This level is the highest level of abstraction . • This level describes that part of database which is relevant to the users. • Any number of user views, may exist for a given conceptual or global view of the database. • It includes only those entities, attributes ,relationships in the real world that is user is interested in. Other may be present in database but user is not aware of it. 11
  • 12.
    • In theexternal level, different views may have different representation on the same data. • Some view include derived or calculculated data i.e data is not stored in the database ,but are related when needed . • This schema consists of the defination of the logical records and the relationships in the external view. • The external Schema is written using external DDL. • It also contains the method of deriving objects in the view from the objects in conceptual level. 12
  • 13.