Normalization Theory
Functional Dependencies
Aside
- Quick way to remember: studentID (PK) studentName.
- studentID determines studentName.
studentID | studentName | courseCode | valid? |
---|---|---|---|
stu001 | Bob | COMP 3000 | ✅ |
stu002 | Jane | COMP 3005 | ✅ |
stu003 | Bob | COMP 1405 | ✅ |
stu003 | Bob | COMP 1406 | ✅ |
stu001 | James | COMP 2402 | ❌ Contradicts row 1. If this row exists, then studentID studentName is false. |
Trivial Functional Dependencies
- A functional dependency is trivial if .
- is trivial.
- is non-trivial.
Armstrong's Axioms
- Reflexivity: If , then .
- Augmentation: If , then .
- Transitivity: If and , then .
- Union: If and , then .
- Decomposition: If , then and .
- Pseudotransitivity: If and , then .
Superkeys and Candidate Keys
- Superkey: All attributes in the relation are determined by this key. In this example, is a superkey.
- Candidate Key: A small subset of attributes that each individually uniquely determine all other attributes in the relation. In this example, if is a candidate key, it has to mean A and G can uniquely determine all other attributes in the relation (individually).