Data Abstraction Levels in DBMS
The database is very important for any organization. To keep this data safe, we need to hide the data from the non-authorized users. Data abstraction is a technique to hide the implementation details of a database that how a database is structured and how the data is stored physically. We need to hide how the data is stored, managed and maintained. So we provide only an abstract view of the database to the non-authorized users.
Levels of abstraction
To hide the implementation details of the database, we can set the different levels of abstraction for the databases. Abstraction levels are as follows;
- Physical level
- Logical level
- View level
The physical level is the bottom level of the abstraction levels.
This level tells us how the data is stored in the database
In this level, we completely describe the complex low-level data structures.
The logical level is commonly called conceptual level point.
The bottom level of abstraction is physical level and the next one is the logical level point logical level is just above the physical level point
This level tells us that what data is stored in the database. This level also tells us what is the relationship that exists among all of the data. The relationship can be one to one, one to many, and many to many, etc.
The database administrator has full access to this level. Any change in the logical level can’t affect the external level or physical level. For example, if we create a new column “salary” we will not modify the external view of the data on which the user is viewing the salaries of the employee. Similarly when we create a new column salary then it allocates the space for this column in the physical memory but it will not change the values of other columns. So we can say that physical independence is achieved. Similarly, we can say that external independence is also achieved.
The bottom level of the abstraction is the physical level. Next higher level is the logical level. The topmost level is view level.
This level is specially designed for the end user.
The end user can only access the view level.
Example of View level
View level is also called the external level.
When you log into your Facebook account, then you have only limited access to the database. For example, you can only upload, delete, update and can view your profile pictures. You cannot change the real database of Facebook. However, when we are on a physical level we can change the full structure of the database. When the user is on an external level, then the user can view the data in the form of columns and rows. This level provides a dummy view of the actual database. When the user views the results on the external level, then the user can feel that it is an actual database but it is not an actual database. The actual database can be viewed at the internal level.