DATA INDEPENDENCE IN DBMS

 DATA INDEPENDENCE IN DBMS

·         Data independence is described by the three-tier schema architecture.

·         When we modify the schema at one level then other level schemas are not modified or changed.

·         Helps to keep data separated from all programs which used it.

·         Stored data is used for calculating and presentation.

 

Levels of Database (abstraction)

The database is used by 3 levels which are:-

  1. Physical/Internal
  2. Conceptual / logical
  3. External /view (visible to the multiple end-users)

View level (highest level/ external)

  • ·        Describe how the data is viewed by different users.
  • ·        Show user interaction with the database by GUI to enter the data as a form format or some other set format.

Example: - student registration form

Student Name

 

Enrolment Number

 

Telephone Number

 

Student Name

 

Highest Qualification

 

Address

 

Professional Skill

 

Telephone Number

 

 

 

Highest Qualification

 

 

 

 

 

 

 

 

 

 



conceptual level (middle level / logical level)

·        Define the logical structure of the database schema.

·        Describes what and which type and size of data are stored in the database. 

·        Programmers implement this by programming languages.

Example: - student registration table   

Enrolment Number

Key: Numeric

Student Name

String

Address

String

City

String

Pincode

Numeric

Telephone Number

Numeric

Highest Qualification

String

Professional Skill

String

 

 

 

 

 

 

 

 

 

  



Physical level (internal schema/ lowest level)

·        Defines how the data /database is stored in storage devices.

·        Use detailed and complex data structures.

  • ·        Data is stored as blocks of memory in bytes, gigabytes, terabytes, etc. with complex memory storage.
  • ·        Information is not visible to the programmers.

 Example: - student registration table records storage spaces

Enrolment Number

9 digit number representation at offset 0

Student Name

25 character string at offset 9

Address

30 character string at offset 34

City

20 character string at offset 64

Pincode

….

Telephone Number

….

Highest Qualification

….

Professional Skill

…..

  

All level is independent of each other, so if make changes at one level, then the other level is not required to make changes. 

Types of Data Independence

In DBMS data independence are two types  

  1. Physical data independence
  2. Logical data independence.

 Physical Data Independence

·         Helps to separate conceptual levels from the internal/physical levels.

·         Provide a logical description of the database without any physical structures information.

·         Modification or changes in the physical storage structures or devices, not effect on the conceptual schema.

·         Some changes in physical level as

·         Use new storage devices like Hard drives or Magnetic Tapes or Change the Location of Databases from one to another ex. C drive to D Drive

·         Modify the file organization technique and Modify indexes in the Database.

·         Switching to different data structures and Changing the access method.

·         Modifying the compression techniques or hashing.

·         Due to the above-mentioned reasons at the Physical level, no change will affect the conceptual layer.

 

Logical Data Independence

·         Logical Data Independence is the change of the conceptual scheme without any changes in External views (API or programs) and physical level.

·         In logical level, some changes are:-

·         Add/Modify/drop a new attribute, entity, constraints or relationship.

·         Merging / Breaking two or more records into one or more relations.

 

Importance/advantages of Data Independence

  • Helps to improve the quality of the data
  • Inexpensive database system maintenance.
  • Implementation of standards and constraints and improvement in database security.
  • No need to modify a data structure in application programs
  • Database designers mainly focus on the general structure of the Database rather without any tension to implementation at physical storage.
  • Easily modifications in the physical level to improve the performance of the system.

 

Difference between Physical and Logical Data Independence

Logical Data Independence

Physical Data Independence

Mainly concerned with the structure or changing the data definition.

Mainly concerned with the storage of the data.

Difficult the retrieve data

Easy to retrieve.

Difficult to achieve logical data independence.

Easy to achieve physical data independence.

Changes in the Application program if new fields are added or deleted from the database.

No need to change the Application program if a new drive or storage is added, change or remove from the system.

Modification/ changes at the logical levels are significant whenever the logical structures of the database are changed.

Modifications made at the internal levels may or may not be needed to improve the performance of the structure.

 

 


Post a Comment

0 Comments