Last modified on April 17th, 2020
Data Independence in DBMS (Database)
“Data Independence in DBMS (Database)” is the today topic of discussion in this tutorial. Let’s begin with the tutorial.
A relational database is a multi-level database. If a database system does not contain multi-layers called levels, then it becomes very difficult to make any change in the database system. So, Database systems are designed in multi-levels. These levels are mentioned below;
- Physical Level – Relates to the storage of data in storage devices.
- Conceptual Level – Relates to concepts like structure and relationships of data, etc.
- External Level – Relates to the user view. User is not aware of how the data is physically stored or conceptually managed.
Logical data independence
The changes in the conceptual model do not affect the external views.
According to Logical Data Independence, we can change the conceptual scheme without changing the followings;
- External views
- External programs
- External API
How Much Data Independence is possible with Logical Data Independence?
- We can merge the two records into one
- We can break the existing record into multiple records.
- We can add, update and delete a new attribute without a rewrite of existing application programs.
- We can add, update and delete an entity and relationship among the entities without a rewrite of existing application programs.
Physical Data Independence
Physical data independence facilitates the system in such a way that changes made to the internal level shall not affect the conceptual level.
Although the independence exists but the changes made should belong to a specific domain and should not exceed the liberty offered by the physical data independence.
If we compare the physical data independence with logical data Independence, then we can say that it is easy to achieve physical data independence.
How Much Data Independence is possible with Physical Data Independence?
Due to Physical data independence, there are some changes that will not affect the conceptual layer. Some of these changes are mentioned below;
- We can independently use a new storage device. For example, we can change the Hard disk or any other storage media.
- We can independently modify the database file organization techniques.
- We can independently switch to some another data structure.
- Changing the access method.
- Modifying indexes.
- We can independently change the compression techniques.
- We can independently change the hashing algorithms.
- We can independently change the Location of the database from one drive of the hard disk to some another drive. For example, we can change the location from drive C to drive D.
Difference between Physical and Logical Data Independence
|Physical Data Independence||Logical Data Independence|
|Mainly concerned with the storage of the data.||Mainly concerned with the structure or changing the data definition.|
|Concerned with internal schema||Concerned with conceptual schema|
|If a change in the physical level occurs then it usually does not need to change at the Application program level.||If new fields are added or deleted from the database, then you need to make changes in the Application program.|
|Modifications made at the internal levels may or may not be needed to improve the performance of the structure.||Modification at the logical levels is important whenever the logical structures of the database are changed.|
|If we compared it to Logical Independence it is easy to achieve physical data independence.||If we compared it to Physical independence it is difficult to achieve logical data independence.|
|Example: For example, we can change the Hard disk or any other storage media.||Example: We can add, update and delete a new attribute without a rewrite of existing application programs.