Armstrong's Axioms in DBMS
What is Armstrong’s Rule?
Armstrong's axioms are a set of inference rules used to derive all functional dependencies (FDs) in a relational database schema. These rules are:
- Sound: Generate only correct dependencies.
- Complete: Generate all possible dependencies.
Where is it Applied in DBMS?
Armstrong's Axioms are applied in Relational Database Theory, specifically in Functional Dependency (FD) analysis and Normalization. They help in:
- Finding closure of attributes (
X+).
- Identifying candidate keys.
- Minimizing functional dependencies.
- Decomposing relations while maintaining dependency preservation.
Armstrong's Axioms (Set of Rules)
1. Primary Axioms (Fundamental Rules)
- Reflexivity Rule: If
Y ⊆ X, then X → Y.
Example: If {A, B} is a set, then {A, B} → {A} is always true.
- Augmentation Rule: If
X → Y, then XZ → YZ for any attribute set Z.
Example: If A → B, then AC → BC.
- Transitivity Rule: If
X → Y and Y → Z, then X → Z.
Example: If A → B and B → C, then A → C.
2. Derived Axioms (Can be Derived from Primary Axioms)
- Union Rule (Additivity Rule): If
X → Y and X → Z, then X → YZ.
Example: If A → B and A → C, then A → BC.
- Decomposition Rule (Projectivity Rule): If
X → YZ, then X → Y and X → Z.
Example: If A → BC, then A → B and A → C.
- Pseudotransitivity Rule: If
X → Y and YZ → W, then XZ → W.
Example: If A → B and BC → D, then AC → D.
Application of Armstrong’s Axioms
- Finding Attribute Closure (
X+) to determine superkeys and candidate keys.
- Checking if a Functional Dependency Holds in a relation.
- Minimizing the Functional Dependencies in a database schema.
- Decomposing Relations while maintaining dependency preservation.