0 4

BIT202 ยท 0 ยท 5 marks

What is data independence? How three schema architecture ensures logical and physical data independence?

What is data independence? How three schema architecture ensures logical and physical data independence? [5]

Database Management SystemChapter 1: Database Fundamentals and ArchitectureThree-schema architecture layers

Quick answer

Data independence is the ability to modify the schema definition at one level of the database system without affecting the schema definition at the next higher level.

Data Independence and Three Schema Architecture

What is Data Independence?

It means that changes made to the structure or storage of data should not require changes to the application programs that use the data.

There are two types of data independence:

1. Logical Data Independence

The ability to change the conceptual schema without having to change the external schemas (user views) or application programs.

  • Example: Adding a new attribute to a table, splitting a table, or merging tables should not affect existing user views or applications.

2. Physical Data Independence

The ability to change the internal/physical schema without having to change the conceptual schema (or external schemas).

  • Example: Changing file organization, indexing strategy, or storage devices should not affect the logical structure of the database.

Three Schema Architecture

The Three Schema Architecture (proposed by ANSI/SPARC) divides the database into three levels:

LevelSchemaDescription
External LevelExternal SchemaIndividual user views
Conceptual LevelConceptual SchemaLogical structure of entire database
Internal LevelInternal SchemaPhysical storage details
External Level:   [View 1]   [View 2]   [View 3]
                        |         |         |
                   (External/Conceptual Mapping)
                              |
Conceptual Level:    [Conceptual Schema]
                              |
                   (Conceptual/Internal Mapping)
                              |
Internal Level:      [Internal Schema]
                              |
                      [Physical Database]

How Three Schema Architecture Ensures Data Independence

Logical Data Independence (via External/Conceptual Mapping)

  • The mapping between external schema and conceptual schema is maintained by the DBMS.
  • When the conceptual schema changes (e.g., a new column is added), only the external/conceptual mapping needs to be updated.
  • The external schemas and application programs remain unchanged.
  • This is harder to achieve because application programs are closely tied to the logical structure.

Physical Data Independence (via Conceptual/Internal Mapping)

  • The mapping between conceptual schema and internal schema is maintained by the DBMS.
  • When the internal schema changes (e.g., a new index is created, or data is moved to a different disk), only the conceptual/internal mapping needs to be updated.
  • The conceptual schema remains unchanged, and therefore external schemas and applications are also unaffected.
  • This is relatively easier to achieve and is well supported by most modern DBMS.

Summary

The three schema architecture achieves data independence by providing two levels of mappings (external/conceptual and conceptual/internal). Changes at one level are absorbed by updating the corresponding mapping, so the levels above remain unaffected. This insulates users and applications from physical and logical changes in the database.

Short on time? The 1, 5 and 10 mark versions of this answer, flashcards and practice sets come with a program pass.