What is Data Independence in DBMS?

In this blog, We will study what is data independence in DBMS (database management system)?, the types of data independence, the difference between them, and the importance of data independence in database management systems (DBMS). So let us start.

What is data independence in DBMS?

Data independence in DBMS also known as data abstraction is the ability to modify the schema at a lower level without making alterations at a higher level. Its goal is to make data independent of the user. The database contains a tremendous amount of data which is hard to handle if it is stored in one place. However, with the usage database management system expanding, there is a need to change the data over time 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 abstraction -physical level, logical level, and view level.

Physical level data independence in DBMS

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.

Conceptual level data independence in DBMS

It is also known as a logical level. This describes how data is stored in the database and what are 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.

External level data independence in DBMS

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.

What is Data Independence in DBMS?

The list of data independence in DBMS

data independence in DBMS are two types of data independence there are:

Logical Data Independence in DBMS

Logical data independence in DBMS gives us the ability to change the conceptual level without affecting external views and programs. Any modifications done will be absorbed by the mapping between the external and the conceptual levels.

Examples are: –

  1. Addition, modification, or deletion of 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 in DBMS

Physical data independence in DBMS gives us the ability to separate 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.

Examples are: –

  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, or pen drives.
  5. Changes in the location of the database from C to D drive.

Difference between Logical data independence and physical data independence

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.

Importance of data independence in DBMS

  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.