Data Abstraction in DBMS
Database systems are made-up of complex data structures. To ease the user
interaction with database, the developers hide internal irrelevant details from users. This
process of hiding irrelevant details from user is called data abstraction.
We have three levels of abstraction:
Physical level: This is the lowest level of data abstraction. It describes how data is
actually stored in database. You can get the complex data structure details at this level.
It helps you to keeps information about the actual representation of the entire database.
Like the actual storage of the data on the disk in the form of records
Logical Level (Conceptual level): This level tells how the data is actually stored and
structured. We have different data models by which we can store the data. Though the
data is stored in the database but the structure of the tables like the student table,
teacher table, books table, etc are defined here in the conceptual level or logical
level.
, For eg: To store the data of a student, the columns in the student table will be name,
age, mail_id, roll_no etc. We have to define all these at this level while we are creating
the database.
View level: This is the highest level of abstraction. Only a part of the actual database is
viewed by the users. This level exists to ease the accessibility of the database by an
individual user. Users view data in the form of rows and columns. Tables and relations
are used to store data. Multiple views of the same
database may exist. Users can just view the data and
interact with the database, storage and implementation
details are hidden from them.
The main purpose of data abstraction is achieving data
independence in order to save time and cost required
when the database is modified or altered.
We have namely two levels of data independence arising
from these levels of abstraction:
Physical data independence : It refers to the characteristic of being able to modify the
physical schema without any alterations to the conceptual or logical schema,
Conceptual structure of the database would not be affected by any change in storage
size of the database system server. Changing from sequential to random access files is
one such example.
Logical level data independence: It refers characteristic of being able to modify the
logical schema without affecting the external schema or application program. The user
view of the data would not be affected by any changes to the conceptual view of the
data. These changes may include insertion or deletion of attributes, altering table
structures entities or relationships to the logical schema etc.
Instance and schema in DBMS
Schema
Database systems are made-up of complex data structures. To ease the user
interaction with database, the developers hide internal irrelevant details from users. This
process of hiding irrelevant details from user is called data abstraction.
We have three levels of abstraction:
Physical level: This is the lowest level of data abstraction. It describes how data is
actually stored in database. You can get the complex data structure details at this level.
It helps you to keeps information about the actual representation of the entire database.
Like the actual storage of the data on the disk in the form of records
Logical Level (Conceptual level): This level tells how the data is actually stored and
structured. We have different data models by which we can store the data. Though the
data is stored in the database but the structure of the tables like the student table,
teacher table, books table, etc are defined here in the conceptual level or logical
level.
, For eg: To store the data of a student, the columns in the student table will be name,
age, mail_id, roll_no etc. We have to define all these at this level while we are creating
the database.
View level: This is the highest level of abstraction. Only a part of the actual database is
viewed by the users. This level exists to ease the accessibility of the database by an
individual user. Users view data in the form of rows and columns. Tables and relations
are used to store data. Multiple views of the same
database may exist. Users can just view the data and
interact with the database, storage and implementation
details are hidden from them.
The main purpose of data abstraction is achieving data
independence in order to save time and cost required
when the database is modified or altered.
We have namely two levels of data independence arising
from these levels of abstraction:
Physical data independence : It refers to the characteristic of being able to modify the
physical schema without any alterations to the conceptual or logical schema,
Conceptual structure of the database would not be affected by any change in storage
size of the database system server. Changing from sequential to random access files is
one such example.
Logical level data independence: It refers characteristic of being able to modify the
logical schema without affecting the external schema or application program. The user
view of the data would not be affected by any changes to the conceptual view of the
data. These changes may include insertion or deletion of attributes, altering table
structures entities or relationships to the logical schema etc.
Instance and schema in DBMS
Schema