- Published on
Armstrong's Axioms - Inference Rules for Functional Dependencies in DBMS
- 1. π Reflexivity Rule
- 2. π Augmentation Rule
- 3. π Transitivity Rule
- π Summary Table of Inference Rules
- π§ Final Thoughts
In relational databases, inference rulesβalso known as Armstrong's Axiomsβare used to derive all possible functional dependencies from a given set. These rules play a critical role in database normalization, minimizing redundancy, and preserving data consistency.
Let's go over the three main inference rules with easy-to-understand examples using a Student
database.
1. π Reflexivity Rule
The Reflexivity Rule states that if a set of attributes Y is a subset of X, then X β Y must hold.
β Notation:
If Y β X
, then X β Y
β Example:
In the table with columns {Student_ID, Name, Course}
:
Student_ID | Name | Course |
---|---|---|
101 | Alice Smith | Math |
102 | Bob Johnson | Science |
{Student_ID, Name} β Student_ID
βοΈ{Student_ID, Course} β Course
βοΈ
π Since Student_ID
and Course
are subsets of the left side, the dependency is valid by reflexivity.
2. π Augmentation Rule
The Augmentation Rule allows you to add the same attribute(s) to both sides of a functional dependency without changing its validity.
β Notation:
If X β Y
, then XZ β YZ
β Example:
If:
Student_ID β Name
Then:
{Student_ID, Course} β {Name, Course}
is valid.
π Adding Course
to both sides does not break the dependency.
This rule is helpful when building larger, composite dependencies from smaller ones.
3. π Transitivity Rule
The Transitivity Rule works like in math: if X β Y
and Y β Z
, then X β Z
also holds.
β Notation:
If X β Y
and Y β Z
, then X β Z
β Example:
Student_ID | Department_ID | Department_Name |
---|---|---|
101 | D01 | Science |
102 | D02 | Arts |
Given:
Student_ID β Department_ID
Department_ID β Department_Name
βΉ Therefore:Student_ID β Department_Name
π This transitive dependency shows that Department_Name
can be indirectly determined from Student_ID
.
To reduce redundancy, we often eliminate such transitive dependencies during Third Normal Form (3NF).
π Summary Table of Inference Rules
Rule | Definition | Example |
---|---|---|
Reflexivity | If Y is a subset of X, then X β Y | {Student_ID, Name} β Student_ID |
Augmentation | If X β Y, then XZ β YZ | If Student_ID β Name , then {Student_ID, Course} β {Name, Course} |
Transitivity | If X β Y and Y β Z, then X β Z | Student_ID β Department_ID and Department_ID β Name β Student_ID β Name |
π§ Final Thoughts
Mastering Armstrong's Axioms (Reflexivity, Augmentation, Transitivity) is essential for:
- Deriving hidden functional dependencies
- Validating schema design
- Simplifying normalization steps
These rules form the theoretical backbone of functional dependency theory in DBMS and help you maintain a clean, reliable, and efficient database structure.