In this blog, We will study data independence in the database management system (DBMS), types of data independence, the difference between them, and the importance of data independence in the database management system (DBMS). So let us start.
Data independence also known as data abstraction is the ability to modify the schema at a lower level without making alteration at a higher level. Its goal is to make data independent from the user. The database contains a tremendous amount of data which is hard to handle if it is stored in one place. But with the usage database management system expands, there is a need to change the data overtime to satisfy the requirements.
So there is a multilayer architecture, such that modifications done at one level won’t affect another. We have two types of data independence-Logical data independence and physical data independence which can be explained by various levels. The various levels of abstractions -physical level, logical level, and view level.
This describes how the data or record is stored and where the data is stored. It is the lowest level and is also known as the internal level. It is controlled by the database administrator.
It is also known as a logical level. This describes how data is stored in the database and what are the structures used. It is also used to define the relationships between different tables. In this, the constraints for the entire database are defined. It is at the middle level. It is controlled by the database designer.
It is also known as view level. It is mainly used to represent data to the user. In this, the application programs hide details of the data types which means it can also be used to hide pieces of information for security purposes. In simple words, it is used to give authorization to different users to view data differently. It is the highest level. It is controlled by the interface designer.
Logical data independence gives us the ability to change the conceptual level without affecting the external views and programs. Any modifications done will be absorbed by the mapping between the external and the conceptual levels.
Physical data independence gives us the ability to separate out the conceptual level and physical level. It allows us to provide a logical description of the database without the need to specify the physical structures. Compared with logical data independence it is much easier to achieve.
|Logical data independence||Physical data independence|
|It mainly deals with structure or changes in the data definition.||It deals with the storage of data.|
|It is mainly concerned with the conceptual schema.||It is mainly concerned with the internal schema.|
|It is difficult to achieve.||It is easier to achieve.|
|There is a need for changes in application programs sometimes.||There is no need to change the application program most of the time.|