Inclusion Dependency in DBMS

Learn via video course
FREE
View all courses
DBMS Course - Master the Fundamentals and Advanced Concepts
DBMS Course - Master the Fundamentals and Advanced Concepts
by Srikanth Varma
1000
5
Start Learning
DBMS Course - Master the Fundamentals and Advanced Concepts
DBMS Course - Master the Fundamentals and Advanced Concepts
by Srikanth Varma
1000
5
Start Learning
Topics Covered

In database design, inclusion dependency (IND) signifies a constraint where values in one column or set must be a subset of values in another column or set. Although less common than functional or join dependencies, IND, exemplified by foreign keys, influences database structure. Essentially, IND ensures relational consistency within a database management system by linking specific column values to others.

Inclusion Dependency Example

Let's say we take two relations, namely R and S that are created by using two entity sets in a way that every entity in R is also S entity. Inclusion dependence occurs when projecting R's key attributes gives a relation that is contained in the relation acquired by projecting S's key attributes.

Let's name the relations R as teacher and S as student, so take the attribute as teacher_id, so we can write:

  • teacher.teacher_id --> student.teacher_id

teacher:

teacher_id (primary key)namedepartment
1Ram KumarDBMS

student:

student_1nameteached_id (foreign key)age
1Rahul Singh118

teacher_id will be the primary key for teacher table and will be foreign key for the student table, attributes of the teacher table will be available in the student table.

So this foreign key concept makes the inclusion dependency possible.

Inference Axioms for Inclusion Dependencies

Interference axioms for inclusion dependencies are described in the following table:

AxiomFormal Expression
Reflexive ruleA -> A
Projection and Permutation ruleIF AB -> CD THEN A -> C AND B -> D
Transitivity ruleIF A -> B AND B -> C THEN A -> C
  • Reflexive rule here states that a table can have attributes and can project on itself: If X⊇X then X->X.
  • Projection and Permutation rule here states that if IF AB->CD then A->C AND B->D.
  • Transitivity rule here states that if a table A projects to B and B projects to C, so We can conclude A->C.

Conclusion

Now that we have seen an example of inclusion dependency in DBMS, let us note down a few points:

  • Inclusion dependency can be used to guide the design of the database.
  • A statement in which some columns of a relation are contained in other columns is known as an inclusion dependency.
  • A foreign key is an example of inclusion dependency. The referring relation is contained in the primary key column.
  • They follow some rules:
    • Reflexive rule: A -> A
    • Projection and Permutation rule: IF AB -> CD THEN A -> C AND B -> D
    • Transitivity rule: IF A -> B AND B -> C THEN A -> C

Read More: