Data Independence in DBMS
Data independence is used for the separation of the data from various application that needs the same data. In other words, it helps to change the database schema at one level of the system without affecting the database schema at other levels of the system. It is used to provide a clear separation of data between multiple applications.
Data independence is of mainly 2 types
1. Logical Data Independence
- As the name suggests, the logical schema of the data is modified and it does not affect the physical structure of the data. The view of the data will be retained as it is but the logical level of retrieving the data will be modified.
- It refers to adding new fields, changing the data types redefining the relations between the entities, and many more. For example, adding a new column to the table or combining/merging the 2 tables.
2. Physical Data Independence
- It mainly refers to the changing the physical level of data but the logical level schema is retained as it is.
- There is change only in how data will be displayed but the logic of retrieving or accessing the data will be retained as it is.
- Changing file indexes, changing the structures of files, or using different storage devices can be included in physical data independence.
What is a View? How it is Related to Data Independence in DBMS?
In DBMS, View is a virtual table that is created using specific rows of one more table. View does not create a new table with these entries, it only presents the selected rows together. Views are used to hide sensitive information from users. Views are used to display the information that is needed by the user, all other information that is sensitive or useless is hidden and not displayed in the view.