1. Physical Data Independence :
Physical Data Independence is defined as the ability to make changes in the structure of the lowest level of the Database Management System (DBMS) without affecting the higher-level schemas. Hence, modification in the Physical level should not result in any changes in the Logical or View levels.
There are 3 levels in the schema architecture of DBMS: physical level, logical level and view level (arranged from the lowest to highest level).
- Example –
Changes in the lowest level (physical level) are: creating a new file, storing the new files in the system, creating a new index etc.
Instances of why we may want to do any sort of Data modification in the physical level- We may want to alter or change the data in the physical level. This is because we may want to add or remove files and indexes to enhance the performance of the database system and make it faster. Hence, in this way, the Physical Data Independence enables us to do Performance Tuning. Ideally, when we change the physical level, we would not want to alter the logical and view level.
- How is Physical Data Independence achieved ?
Physical Data Independence is achieved by modifying the physical layer to logical layer mapping (PL-LL mapping). We must ensure that the modification we have done is localized.
2. Logical Data Independence :
Logical Data Independence is defined as the ability to make changes in the structure of the middle level of the Database Management System (DBMS) without affecting the highest-level schema or application programs. Hence, modification in the logical level should not result in any changes in the view levels or application programs.
- Example –
Changes in the lowest level (physical level) are: adding new attributes to a relation, deleting existing attributes of the relation etc. Ideally, we would not want to change any application or programs that do not require to use the modified attribute.
- How is Logical Data Independence achieved ?
Logical Data Independence is achieved by modifying the view layer to logical layer mapping (VL-LL mapping).
Attention reader! Don’t stop learning now. Get hold of all the important CS Theory concepts for SDE interviews with the CS Theory Course at a student-friendly price and become industry ready.