Prerequisite : Physical and Logical Data Independence
1. Physical Data Independence :
The physical data independence is basically used to separate conceptual levels from the internal/physical levels. It is easy to achieve physical data independence. With this type of independence, user is able to change the physical storage structures or the devices which have an effect on the conceptual schema.
Examples of changes under Physical Data Independence :
- It is by the use of new storage device like Hard Drive or Magnetic Tapes
- Modifying the file organization technique in the Database
- Switching to different data structures.
- Changing the access method.
- Modifying indexes.
- To change the compression techniques or hashing algorithms.
- To change the Location of Database from say C drive to D Drive
2. Logical Data Independence :
Logical Data Independence is used to change the conceptual scheme without changing the following things :
- External views
- External API or programs
Examples of changes under Logical Data Independence :
- To Add/Modify/Delete a new attribute, entity or relationship is possible without a rewrite of existing application programs
- Merging two records into one
- To break an existing record i.e to divide the record into two or more records
Difference between Physical and Logical Data Independence :
|Physical Data Independence||Logical Data Independence|
|It mainly concern about how the data is stored into the system.||It mainly concerned about the structure or the changing data definition.|
|It is easy to retrieve.||It is difficult to retrieve because the data is mainly dependent on the logical structure of data.|
|As compared to the logical independence it is easy to achieve physical data independence.||As compared to the physical independence it is easy to achieve logical data independence.|
|Any change at the physical level, does not require to change at the application level.||The change in the logical level requires a change at the application level.|
|The modifications made at the internal level may or may not be needed to improve the performance of the structure.||The modifications made at the logical level is significant whenever the logical structure of the database is to be changed.|
|It is concerned with the internal schema.||It is concerned with the conceptual schema.|
|Example: Change in compression techniques, Hashing algorithms and storage devices etc.||Example: Add/Modify or Delete a new attribute.|