
Data independence in DBMS is the ability to change the schema at one level of the database without impacting the schema at the other (next higher) level. You can keep data independent from the programs that use it by using data independence.
Why data independence is important? The main goal of data independence is to increase the database system’s quality and maintainability. It also increases database security standards, and it’s simple to change any level without affecting others.
There are three layers of database abstraction, as we all know. To get data independency in database, these three levels are required. If one level is modified, the other level should be unaffected.
Click here to get the idea of Database Schema Level
Table of Contents
Types of Data Independence in DBMS
There are two types of data independence in DBMS.
- Logical Data Independence
- Physical Data Independence
Logical Data Independence in DBMS
Logical data independence is the ability to update the logical data without affecting or changing the physical/external data.
For example, A table/relation is a logical data collection in the traditional sense. A constraint can exist in a table. Any modifications we make to the table (such as a constraint) there will be no effect on the data saved to disk.
Physical Data Independence example in DBMS
These are the following physical data independence examples in DBMS.
- Adding/modifying/deleting column/attribute from table/relation.
- Breaking or merging table/relation records.
Physical Data Independence in DBMS
Physical data independence is the ability to update the external data without affecting or changing the logical data.
For example, If the storage is full, you may need to expand the storage, update the storage, or relocate the database storage to a different place. The logical data should not be impacted in this scenario.
Physical Data Independence example in DBMS
These are the following logical data independence examples in DBMS.
- Change the drive for database, for example, from D to C.
- If you require additional database storage and upgrading storage.
- If you wish to modify the data access mechanism and switch to a different data structure.
- Changing the compression or the hashing algorithm if you are using any data compression.
Difference between Physical and Logical Data Independence
Physical Data Independence | Logical Data Independence |
---|---|
Physical data independence enables you to update the physical schema without changing your application program. | Without changing the application program, Logical Data Independence modifies the logical schema. |
Physical data independence is simple to regain. | Data retrieval is complex since it is mostly dependent on the data’s logical structure. |
Mainly related to data storage. | Changing the structure or data specification is the main focus. |
Internal changes may or may not be required to improve the system’s structure’s performance. | We should make changes at the logical level regardless of whether we wish to change the database structure. |
Only a few examples include changes in compression technology, storage devices, and hashing approaches. | For example: Adding, deleting, or changing an attribute in the system. |
Hope you got the basic idea of data independency in database. If you have any doubts or need clarification, feel free to contact us on the contact section. You can also comment in the comment section.
You Might Like: