Database Normalization
- is the process of structuring a database, usually a relational database, in accordance with a series of so-called normal forms in order to reduce data redundancy and improve data integrity
Database Normal Forms
The normal forms (from least normalized to most normalized) are:
- UNF: Unnormalized form
- 1NF: First normal form
- 2NF: Second normal form
- 3NF: Third normal form
- EKNF: Elementary key normal form
- BCNF: Boyce–Codd normal form
- 4NF: Fourth normal form
- ETNF: Essential tuple normal form
- 5NF: Fifth normal form
- DKNF: Domain-key normal form
- 6NF: Sixth normal form
|
Requirement |
UNF |
1NF |
2NF |
3NF |
EKNF |
BCNF |
4NF |
ETNF |
5NF |
DKNF |
6NF |
|
Primary key (no duplicate tuples) |
MAYBE |
✅ |
✅ |
✅ |
✅ |
✅ |
✅ |
✅ |
✅ |
✅ |
✅ |
|
Atomic columns (cells cannot have tables as values) |
❌ |
✅ |
✅ |
✅ |
✅ |
✅ |
✅ |
✅ |
✅ |
✅ |
✅ |
|
Every non-trivial functional dependency either does not begin with a proper subset of a candidate key or ends with a prime attribute (no partial functional dependencies of non-prime attributes on candidate keys) |
❌ |
❌ |
✅ |
✅ |
✅ |
✅ |
✅ |
✅ |
✅ |
✅ |
✅ |
|
Every non-trivial functional dependency either begins with a superkey or ends with a prime attribute (no transitive functional dependencies of non-prime attributes on candidate keys) |
❌ |
❌ |
❌ |
✅ |
✅ |
✅ |
✅ |
✅ |
✅ |
✅ |
✅ |
|
Every non-trivial functional dependency either begins with a superkey or ends with an elementary prime attribute |
❌ |
❌ |
❌ |
❌ |
✅ |
✅ |
✅ |
✅ |
✅ |
✅ |
N/A |
|
Every non-trivial functional dependency begins with a superkey |
❌ |
❌ |
❌ |
❌ |
❌ |
✅ |
✅ |
✅ |
✅ |
✅ |
N/A |
|
Every non-trivial multivalued dependency begins with a superkey |
❌ |
❌ |
❌ |
❌ |
❌ |
❌ |
✅ |
✅ |
✅ |
✅ |
N/A |
|
Every join dependency has a superkey component |
❌ |
❌ |
❌ |
❌ |
❌ |
❌ |
❌ |
✅ |
✅ |
✅ |
N/A |
|
Every join dependency has only superkey components |
❌ |
❌ |
❌ |
❌ |
❌ |
❌ |
❌ |
❌ |
✅ |
✅ |
N/A |
|
Every constraint is a consequence of domain constraints and key constraints |
❌ |
❌ |
❌ |
❌ |
❌ |
❌ |
❌ |
❌ |
❌ |
✅ |
❌ |
|
Every join dependency is trivial |
❌ |
❌ |
❌ |
❌ |
❌ |
❌ |
❌ |
❌ |
❌ |
❌ |
✅ |