MySQL + SQL · Lesson 24
Functional Dependency in DBMS
What is Functional Dependency?
A functional dependency (FD) X → Y means: if you know X, you can uniquely determine Y. It is the foundation of normalization.
Example: roll_no → name means each roll_no determines exactly one name.
Types of FD
| Type | Meaning |
|---|---|
| Trivial FD | Y is a subset of X (e.g. {roll_no,name}→name) |
| Non-trivial FD | Y is not a subset of X (roll_no→name) |
| Fully functional | Y depends on the whole key, not part |
| Partial | Y depends on part of a composite key |
| Transitive | X→Y and Y→Z gives X→Z |
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.
Summary
- FD X→Y: X determines Y.
- Types: trivial, non-trivial, full, partial, transitive.
- Armstrong's axioms: reflexivity, augmentation, transitivity.