What is physical data independence?

Share

Overview

Data independence is a property of a database management system (DBMS). It lets us change the schema at one level of the DBMS without affecting the schema at the next, higher level. This enables us to keep the data and the programs separate.

There are two types of data independence: physical, and logical.

The three-schema architecture

We use the three-schema architecture to implement the data independence property, as shown below:

The three-schema architecture

In this architecture, we define the schema at three different levels:

External schema

This is the part of the database that the user has a specific interest in. This level creates different views for the user. For instance, a user can view the course and section details simultaneously, without worrying about the exact process running at the back end.

Conceptual schema

This level defines the database structure at this level for a community of users. It explains data types, entities, and relationships. However, it hides intricate details, such as the physical storage structure, from the users.

Internal schema

This level defines how the data is physically stored on storage devices, such as a hard disk. It provides the complete details of physical storage and access paths.

Physical data independence

Physical data independence separates the logical schema from the physical schema. It allows us to change the lowest level of the DBMS, the physical schema, without changing the logical or external levels. For instance, we can change the location of the database for faster access without affecting the logical or external levels.

Physical data independence is desirable for multiple reasons:

  • It allows us to focus on providing a logical database description without worrying about the physical structure.
  • It enhances the performance of the DBMS.
  • It increases the efficiency of the DBMS.

Achieving physical data independence

DBMS uses modified physical to logical layer mapping to preserve the property of physical data independence. The DBMS automatically performs the mapping itself. It absorbs the all changes that we make to the physical layer.

Examples

Physical data independence primarily concerns data storage and the internal schema. Here are some examples of the changes we can make at this level:

  • Shifting the database from one location to another
  • Changing and moving to a new storage device
  • Modifying the data structures
  • Changing the indexes
  • Using different hashing algorithms
  • Selecting a different compression technique
  • Modifying the existing file organization technique, for instance, by creating new files
  • Choosing a different access method

Note: As long as the data is not affected, any changes made to the physical schema layer do not affect the higher schema layers.

Copyright ©2024 Educative, Inc. All rights reserved