Professional Documents
Culture Documents
Abstraction Data Independence
Abstraction Data Independence
Abstraction Data Independence
external schema
conceptual schema A B C D E
Internal schema
Example: University Database
• Conceptual schema:
– Students(sid: string, name: string, login: string,
age: integer, gpa:real)
– Courses(cid: string, cname:string, credits:integer)
– Enrolled(sid:string, cid:string, grade:string)
• Physical schema:
– Relations stored as unordered files.
– Index on first column of Students.
• External Schema (View):
– Course_info(cid:string,enrollment:integer)
Data Independence
• Logical Data Independence
– Refers to immunity of external schemas to
changes in conceptual schema.
– Conceptual schema changes (e.g.
addition/removal of entities).
– Should not require changes to external schema or
rewrites of application programs.
• Physical Data Independence
– Refers to immunity of conceptual schema to
changes in the internal schema.
– Internal schema changes (e.g. using different file
organizations, storage structures/devices).
– Should not require change to conceptual or
external schemas.
Data Abstraction
View Level
What data users and
application programs
see ?
View 1 View 2 … View n
• Data Independence
– Lower-level schema changes will not effect upper-level
schemas and applications
• Physical Data Independence
– if physical schema changes do not affect application
programs.
– That is, application programs do not depend on physical
schema (but depend on a logical schema or a view
schema).
• Logical Data Independence
– if logical schema changes do not affect application
programs.
– That is, application programs do not depend on logical
schema (but depend on some views).