Data Independence in DBMS

Learn via video course
FREE
View all courses
DBMS Course - Master the Fundamentals and Advanced Concepts
DBMS Course - Master the Fundamentals and Advanced Concepts
by Srikanth Varma
1000
5
Start Learning
DBMS Course - Master the Fundamentals and Advanced Concepts
DBMS Course - Master the Fundamentals and Advanced Concepts
by Srikanth Varma
1000
5
Start Learning
Topics Covered

Overview

Data independence is the ability to modify one level of a DBMS without affecting the next higher level's data structure or access methods. It's of two types, physical and logical. Physical data independence allows you to modify the physical level without affecting the conceptual and view level, whereas logical independence makes sure that modifying the logical schema wouldn't affect the view level.

What is Data Independence in DBMS?

The ability to modify the schema definition of a DBMS at one level, without affecting the schema definition of the next higher level is called data independence.

But, Why Do We Need Data Independence in DBMS?

In addition to the data entered by users, a database system typically holds a large amount of data. The system holds metadata about data which makes it easier to find and retrieve data. Once a set of metadata in DBMS has been saved in a database, changing or updating the metadata is challenging. However, as a database management system (DBMS) grows, it must evolve to meet the needs of its users. Updating the schema or data would be a time-consuming and complicated task if all of the data were dependent.

To address the problem with updating metadata, it is organized in a tiered structure, so that changing data at one level does not affect data at another. This information is self-contained, however, all this information is linked to one another.

So, data independence aids in the separation of data from the applications that use it.

Types of Data Independence in DBMS

Now that you know what data independence means, let's discuss its types. This is where your knowledge of the 3-level architecture is important!

Data Independence in DBMS is of two types:

Physical Data Independence

This is defined as the ability to modify the physical schema of the database without the modification causing any changes in the logical/conceptual or view/external level.

Physical Data Independence

Why is Physical Data Independence Important?

  • Physical data independence allows you to distinguish between conceptual and internal/physical levels. It allows you to describe the database logically without needing to identify physical structures.
  • Physical data independence allows you to modify physical storage structures or devices without affecting the conceptual model of the database. Any changes made at the internal level would be absorbed by the mapping between the conceptual and internal levels, preventing any modifications to the conceptual level.

Examples of Physical Data Independence:

  • Changing from one data structure to another.
  • Making use of new storage technology, such as a hard drive or magnetic tapes
  • Change the location of the database from one drive to another.
  • Changing the database's file organization.

Logical Data Independence

Logical data independence is the ability to modify logical schema without causing any unwanted modifications to the external schema or the application programs to be rewritten.

Logical Data Independence

Why is Logical Data Independence Important?

  • Logical data is database data, which means it stores information about how data is managed within the database. Logical data independence is a method that makes sure that if we make modifications to the table format, the data should not be affected.
  • The mapping between the external and conceptual levels will absorb any changes made.
  • In other words, to distinguish the external level from the conceptual view, logical data independence is used. Any modifications to the conceptual representation of the data will not affect the user's view of the data.

Examples of Logical Data Independence:

  • Without rewriting current application scripts, you can add, modify, or delete a new attribute, entity, or relationship.
  • To divide an existing record into two or more records.
  • Merging two records into a single one.

Note: Also you might be able to notice that we are only talking about the changes in the schema at a lower level affecting the schema at the higher levels because changing anything at a higher level can never affect the schema at a lower level.

And since the view or external level is the highest level, there is no data independence type associated with it, because there are no levels above it.

Important Fact

Logical Data Independence isn't easy to achieve, as compared to Physical Data Independence. But why?

Because application programs are so conceptually reliant, logical data independence is more difficult to achieve than physical data independence. Even a small number of changes to the database's logical structure would require changes to be made to the applications as well. As a result, obtaining logical data independence might be difficult.

Difference between Physical and Logical Data Independence

Physical Data IndependenceLogical Data Independence
It is concerned with the internal schema of the database.It is concerned with the conceptual schema of the database.
It is easier to achieve as compared to logical data independence.Logical data independence is difficult to achieve as compared to physical data independence.
Physical data independence is mostly concerned with how data is saved in the system.It is mostly focused on the structure or updating data definitions.
Changes at the internal level may or may not be required to increase the overall performance of the database.When the database's logical structure needs to be modified, the changes made at the logical level are crucial.
In most cases, a change at the physical level does not necessitate a change at the application program level.If new fields are added or removed from the database, then updates are required to be made in the application software.

Importance of Data Independence

  • Encourages you to improve the nature of the information.
  • Database framework support gets reasonable.
  • Implementation of principles and improvement in database security.
  • You don’t have to modify information structure in application programs.
  • Grant designers to concentrate on the general structure of the Database as opposed to agonizing over the interior usage.
  • It permits you to improve a state which is unharmed or unified.
  • Database disjointedness is endlessly diminished.
  • Effectively making adjustments in the physical level is expected to improve the exhibition of the framework.

Conclusion

So, that was quite a lot of information! Now, let's quickly summarize what we just studied:

  • Three-level architecture of DBMS in brief.
  • What Data independence in DBMS is and its importance.
  • The two types of data independence, physical and logical, and their importance with examples of each type.
  • Differences between physical and logical data independence.

Read More: