Download presentation
Presentation is loading. Please wait.
1
Inclusion Dependency (IND) IND is the rule among different schemas Consider the student and department relations sidsnamesfullnamesprogramsdept 1001stud_Astud_A AuBEng(COMP)1 1002stud_Bstud_B LoBEng(COMP)1 1003stud_Cstud_C KoBEng(ELEC)2 1004stud_Dstud_D NgBEng(ELEC)2 diddname 1Computer Sci. 2Electronic Eng. studentdepartment
2
Inclusion Dependency (IND) In the student relation, we only have the student ID of the student and his/her corresponding department ID number. Normally every student must belong to a department. There should not exist that the relation contains a department with an unknown department identity number, or that the department has no identity number.
3
Inclusion Dependency (IND) Just the same as FD, there is a tool to formulate the IND between schemas This tool is called “Casanova et al.’s axiom system” We consider the following three rules: –Reflexivity –Projection and Permutation –Transitivity
4
Inclusion Dependency (IND) Reflexivity –If X is (are) attribute(s) in a schema R, we have IND├ R[X] R[X]. –Example In student relation, IND ├ student[sid] student[sid] –It gives the basis of inclusion dependency.
5
Inclusion Dependency (IND) Projection and permutation –If IND├R 1 [X] R 2 [Y], then IND├R 1 [X k ] R 2 [Y k ] where X k and Y k are projection and permutation on X and Y –Example In the teach relation, course ID and the course description are subset of records in the course relation. If we use course ID as referential key to the course relation, there must exist some records in course relation for the same description as the course description.
6
Inclusion Dependency (IND) coursecdescriptionlecturer COMP104C++1 COMP104C++2 COMP171Algorithms3 ELEC102Electronics4 ELEC151Digital Circuit5 ELEC151Digital Circuit6 coursecdescriptioncredit COMP104C++5 COMP171Algorithms3 ELEC102Electronics5 ELEC151Digital Circuit5 course teach teach[{course, cdescription}] course[{course, cdescription, credit}] => teach[cdescription] course[cdescription]
7
Inclusion Dependency (IND) Transitivity –If IND├R 1 [X] R 2 [Y] and IND├R 2 [Y] R 3 [Z], then IND├R 1 [X] R 3 [Z] –Example In the pattern relation, it records what courses a student needs to take and only the course ID is known. It is trivial that the course ID is a subset of the course ID in the teach relation. As course ID in the teach relation is also a subset of that in the course relation, from the pattern relation, we can use the course ID as referential key to the course relation.
8
Inclusion Dependency (IND) studentdeptcourse 10011COMP104 10011COMP171 10021COMP104 10021COMP171 10032ELEC102 10032ELEC151 10042ELEC102 10042ELEC151 coursecdescriptionlecturer COMP104C++1 COMP104C++2 COMP171Algorithms3 ELEC102Electronics4 ELEC151Digital Circuit5 ELEC151Digital Circuit6 pattern teach IfIND├ pattern[course] teach[course]
9
Inclusion Dependency (IND) coursecdescriptiondept COMP104C++1 COMP171Algorithms1 ELEC102Electonics1 ELEC151Digital Circuit1 coursecdescriptionlecturer COMP104C++1 COMP104C++2 COMP171Algorithms3 ELEC102Electronics4 ELEC151Digital Circuit5 ELEC151Digital Circuit6 course teach andIND├ teach[course] course[course]
10
Inclusion Dependency (IND) coursecdescriptiondept COMP104C++1 COMP171Algorithms1 ELEC102Electonics1 ELEC151Digital Circuit1 studentdeptcourse 10011COMP104 10011COMP171 10021COMP104 10021COMP171 10032ELEC102 10032ELEC151 10042ELEC102 10042ELEC151 course pattern thenIND├ pattern[course] course[course]
Similar presentations
© 2025 SlidePlayer.com Inc.
All rights reserved.