A Functional Dependency (FD) X → Y means:
If two tuples have the same X value, they must have the same Y value.
Armstrong's Axioms
-
Reflexivity: If Y ⊆ X, then X → Y
-
Augmentation: If X → Y, then XZ → YZ
-
Transitivity: If X → Y and Y → Z, then X → Z
Closure of Functional Dependencies (F⁺)
All FDs that can be derived from a given set F.
Example:
F = {A → B, B → C}
F⁺ = {A → B, B → C, A → C, A → A, B → B, C → C, …}
Closure of Attribute Sets (X⁺)
All attributes functionally determined by set X.
Algorithm:
-
Initialize X⁺ = X
-
For each Y → Z in F: if Y ⊆ X⁺, add Z to X⁺
-
Repeat until no changes
Example:
F = {A → B, B → C}
A⁺ = {A, B, C} (A determines B, B determines C)
Canonical Cover (Minimal Cover)
Simplified equivalent set of FDs with:
-
Single attributes on the right side
-
No extraneous attributes on the left
-
No redundant FDs
Additional Dependency Types
1. Trivial Dependency
-
A dependency X → Y is trivial if Y ⊆ X.
-
Always true, adds no new information.
Example:
-
{A, B} → A is trivial (because A is part of {A, B}).
-
{RollNo, Name} → RollNo
2. Partial Dependency
-
A partial dependency occurs when a non-prime attribute (not part of any candidate key) is functionally dependent on part of a composite candidate key, not the whole key.
-
Problematic because it violates 2NF.
Example:
Relation: R(StudentID, CourseID, Grade, StudentName)
-
Candidate Key = {StudentID, CourseID}
-
FD: StudentID → StudentName
👉 Here, StudentName depends only on part of the key (StudentID), not the whole {StudentID, CourseID}.
So, partial dependency exists.
3. Transitive Dependency
-
A transitive dependency occurs when a non-prime attribute depends on another non-prime attribute via a candidate key.
-
Problematic because it violates 3NF.
Example:
Relation: R(StudentID, DeptID, DeptName)
-
Candidate Key = {StudentID}
-
FDs: StudentID → DeptID, DeptID → DeptName
👉 StudentID → DeptName is implied, but DeptName depends transitively on StudentID through DeptID.
So, transitive dependency exists.
A transitive dependency exists when:
-
X → Y (X is a candidate key or contains a candidate key),
-
Y → Z,
-
Y is not a candidate key, and
-
Z is a non-prime attribute.
So the problem occurs if a non-prime attribute (Z) is indirectly dependent on a key through another non-prime attribute (Y).