In this post, we will learn about data abstraction in dbms. We will see the different data abstraction layers in dbms – Physical level, Logical level and View level.
The major purpose of a database system is to provide users with an abstract view of the data i.e. The system hides certain details of how the data are stored and maintained.
Let’s look at an example to understand abstraction. Let’s say a layman is walking on the street in front of your college. When he looks at your college what all does he knows about the college! He knows the name of the college then he might know that it is a Science or Arts college, it is run by so a so society etc. Now you are a student of the college know more about it than this person on the street like you know the number of courses held in the college, most of the teachers in the college, the course fees of the course which you are learning, the different buildings of the college etc.
Now, consider the administrative staff of the college. These people know even more information about the college than a student of the college like how courses are conducted, how teachers are appointed, what is the fee structure of the courses what new courses are to be started etc. Now, these 3 people are looking at the same thing (i.e. the college) from 3 different levels of abstraction.
Some of the information known by the student is hidden from the man of the street. Similarly, the database developers hide the complexity from the users through several levels of abstraction to simplify the user’s interaction with the system.
That’s how the data abstraction in dbms works.
Layers of Data Abstraction in DBMS –
Mainly following 3 levels of abstraction are defined as below –
1. Physical Level
This is the lowest level of abstraction that describes how the data are actually stored. At the physical level, complex low-level data structures are described in details.
2. Logical Level
The next higher level of abstraction describes what data is stored in the database and what relationships exist among the data. The logical level of abstraction is used by the database administration who must decide what information is to be kept in the database.
3. View level
The highest level of abstraction describes only part of the entire database. Despite the use of simpler structures at the logical level, some complexity remains because of the large size of the database. Many users of the database system will not be concerned with all this information. Instead such users need to access only a part of the database. So, to simplify their interaction with the system, the view level of abstraction is defined. The system may provide many views of the same database.
Consider an example. In a Pascal language we may declare a record as follows
type student = record
s_name : string;
s_roll_no : integer;
s_class: string;
s_address : string;
This code defines a new record called student with 4 fields. Each field has a name and type associated with it.
At physical level, a student record can be described as a block of consecutive storage locations (For example, words or bytes). The compiler hides this level of details from programmers. Similarly, the database system hides many of the lowest level storage details from database programmer. Database administration may be aware of certain details of the physical organization of the data.
At the logical level, each such record is described by a type definition as shown above in the segment code and the interrelationship among these record types is defined. Programmer using a programming language works at this level of abstraction. Similarly, database administrations usually work at this level of abstraction.
Finally at the view level, computer users see a set of application programs that hide details of the data types. Similarly, at the view level several views of the database are defined and the database users see these views. In addition to hiding details of the logical level of the database, the views also provide a security mechanism to prevent users from accessing parts of the database. For example, one except the person in the office staff is allowed to view the information about the student fees paid.
That’s end of tutorial on data abstraction in DBMS.
You must be logged in to post a comment.