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.
1. Addition, modification or deletion in any attribute, entity or relationship can be done without any changes in the existing programs.
2. Addition of two records with each other.
3. Dividing the existing record into multiple records
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.
1. Modification in the indexes.
2. Multiple switching to data structures.
3. Changes in the access methods.
4. Using a new device for storage like magnetic tapes, pen drives.
5. Changes in the location of the database from C to D drive.
|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.|
1. The quality of data is improved.
2. The maintenance of the database system becomes affordable.
3. Developers can focus on the general structure rather than the internal implementations.
4. There is an improvement in database security.
5. No alterations of the data structure are required in application programs.
6. Database incompatibility is reduced.