What Is Data Independence In DBMS? Understand Its Importance With Examples

Unstop
7 min readMar 17, 2022

--

Table of content:

  • What is Data Independence of DBMS?
  • Achieving Data Independence
  • What are the two levels of data independence?
  • Advantages of Data Independence
  • Disadvantages of Data Independence

Nowadays we are leaving in a world where produced data is mind-blowing and there should be a proper mechanism to handle the data, you ever wonder, how is it possible to handle the complex set of data?

Data independence is one of the characteristics of the Database Management System that can be used to modify the information without affecting the result of the system. All three levels of data abstraction are mainly implemented to achieve data independence.

In this blog, we are going to discuss how data independence works at different levels and why it is important for the efficient implementation of Databases. Let’s dive into the detail of the data independence without any further ado.

ALSO READ

What Is The Difference Between Encryption And Hashing?

What is Data Independence of DBMS?

Data Independence can be defined as the ability of the data such that change in the schema at one level of the database without having to change the schema at the next higher level. In simple words, we can say that Data independence is a property of a database that allows the User or Database Administrator to ****change the schema at one level without affecting the data or schema at another level. To achieve data independence it is necessary that if we are making the change at one level it doesn’t change or hamper the data at the next level.

The purpose of data independence is to enhance the security of the system and to save lots of time and price needed once the information is changed or altered.

Achieving Data Independence

To achieve data independence, we first need to ensure Data Abstraction. Data Abstraction can be defined as extracting the necessary data by ignoring the remaining irrelevant details. If we take the example of a real-world entity, ATM is one of the best examples of data abstraction We all use an ATM machine for cash withdrawal, money transfer, etc in our daily life. But we don’t know internally what processes and operations are being performed inside an ATM.

The main purpose of data abstraction is to achieve data independence. There are three levels of abstraction.

  • Physical or Internal Level — Physical level is the lowest level of data abstraction and It indicates how the data will be stored and describes the data structures and access methods to be used by the database. The internal level is used to describe the entire database.
  • Conceptual or Logical Level — The Conceptual level is additionally called the logical structure because it defines the logical relations between the data. The separation of the conceptual view from the internal view enables us to provide a logical description of the database without the need to specify physical structures. The conceptual level comes between the physical level and view level. It provides the link between the external schema and the internal schema of the database.
  • External or View Level — It is the highest level of data abstraction. The external level describes the user interaction with the database management system. This level is used to provide a Graphical user interface to the user, and the user does not know about the file structure, access method, and other internal details of the database.

ALSO READ

Importance Of Data Transformation In Data Mining

What are the two levels of data independence?

Based on the data abstraction, there are two levels of data independence:

  • Physical level data independence
  • Logical level data independence

Let’s discuss the properties of these two levels of data independence.

1. Physical Level Data Independence

Physical data independence can be defined as the ability to change the physical level without affecting the logical or Conceptual level. Physical data independence gives us the freedom to modify the — Storage device, File structure, location of the database, etc without changing the definition of conceptual or view level.

Ex- For example, if we take the database of the banking system and we want to scale up the database by changing the storage size and also want to change the file structure then we can do it without affecting any functionality of logical schema.

Below changes can be done at the physical layer without affecting the conceptual layer -

  • Changing the storage devices like SSD, hard disk and magnetic tapes, etc.
  • Changing the access technique and modifying indexes.
  • Changing the compression techniques or hashing algorithms.

2. Logical Level Data Independence

Logical Data Independence is a property of a database that can be used to change the logic behind the logical level without affecting the other layers of the database. Logical data independence is usually required for changing the conceptual schema without having to change the external schema or application programs. It allows us to make changes in a conceptual structure like adding, modifying, or deleting an attribute in the database.

Ex- If there is a database of a banking system and we want to add the details of a new customer or we want to update or delete the data of a customer at the logical level data will be changed but it will not affect the Physical level or structure of the database.

These changes can be done at a logical level without affecting the application program or external layer.

  • Adding, deleting, or modifying the entity or relationship.
  • Merging or breaking the record present in the database.

Advantages of Data Independence

  • Data independence allows changing the schema at one level without the need to change the schema at another level.
  • It helps to improve the data security of the database.
  • With the help of physical data independence, we can change the storage and file structure of the database without affecting the application program.
  • Logical data independence helps us to add and delete the data in the database without any effect on the application program.
  • Data independence provides us the facility of data abstraction which means we can use the functions without worrying about the internal structure of that function. Ex- in a vehicle we used to apply breaks to decelerate the vehicle without worrying about the internal mechanism of the break.
  • Data independence saves a lot of time and price in case, we want to change the location or file structure of the database or we want to alter the data.

ALSO READ

15 Popular JAVA Frameworks Use In 2022

Disadvantages of Data Independence

Now you know that data independence is how much important for handling a large amount of data and providing security to the data in the DBMS. But data independence has a darker side also.

  • The first disadvantage of data independence is that we need a high initial investment for the hardware and software to set up the database because we need hardware and machine with high performance.
  • The second disadvantage of data independence is the complexity, the database should be designed in a way such that it can give high performance, and to achieve this complexity increases automatically.

Difference between Logical Data Independence and Physical Data Independence

Physical Data IndependenceLogical Data IndependencePhysical data independence is used to change the internal schema without requiring a change in the logical schema. Logical data independence is making sure that if you add any new field or delete any existing field we do not need to change the application program.Physical data independence is easy to attain in comparison to logical data independence.It is difficult to attain logical data independence compared to physical data independence.Physical data independence provides feasibility if we want to shift the database or want to change the file structure.Logical data independence helps us to change the data definition and the structure of the data without having changes in the physical schema.Physical data independence deals with the internal structure of the schema.Logical data independence deals with conceptual schema.Examples of changes in Physical independence are Changing the compression techniques, hashing algorithms, SSD, location of the database, etc.Examples of changes in logical independence are Adding, deleting, or modifying the entity or relationship.

Summing up…

As we have discussed data independence, there are various advantages of data independence for the DBMS. To manage a larger chunk of data we need data abstraction and the purpose of data abstraction is to achieve data independence. It helps us to improve the quality of the data and provides additional security to the data.

The data at one level can be changed without affecting the other level, which helps to improve the performance of the system. We can conclude that data independence is one of the important factors for designing a bigger database to handle a huge amount of data.

You might also be interested in reading:

  1. Importance Of Data Transformation In Data Mining
  2. 15 Popular JAVA Frameworks Use In 2022
  3. Top 50 Selenium Interview Questions And Answers For 2022
  4. Difference Between Scripting And Programming Language | Why Scripting Language Is Considered A Programming Language But Not Vice-Versa?

--

--

Unstop
Unstop

Written by Unstop

Unstop (formerly Dare2Compete) enables companies to engage with candidates in the most interactive way to discover, assess, and hire the best talent.

No responses yet