Normal Forms: 1NF → 2NF → 3NF
The progressive normal forms — what each one removes (repeating groups, partial dependencies, transitive dependencies) and the "key, whole key, nothing but the key" rule. Source of sample Part A Q7.
A ladder of structural quality
Normalization is the process of decomposing relations with anomalies into smaller, well-structured relations, guided by functional dependencies. Each normal form is a state of a relation, and each higher form is a *superset* of the lower: a 3NF relation is automatically in 2NF and 1NF.
### First normal form (1NF)
A relation is in 1NF if it has a primary key and no repeating groups — a single atomic value at every row/column intersection. Converting to 1NF means removing multivalued attributes / repeating groups (filling the data down into separate rows) and identifying the key. Removing all multivalued attributes puts a relation in 1NF. The result is *technically* a relation but usually still riddled with redundancy.
### Second normal form (2NF)
A relation is in 2NF if it is in 1NF and has no partial functional dependencies — every nonkey attribute depends on the whole primary key. A partial dependency is a nonkey attribute depending on only *part* of a composite key. Key insight: *partial dependencies are only possible when the key is composite* — if the primary key is a single attribute, the relation is automatically in 2NF.
### Third normal form (3NF)
A relation is in 3NF if it is in 2NF and has no transitive dependencies — no nonkey attribute determines another nonkey attribute. A transitive dependency is the chain Key → NonkeyA → NonkeyB. The informal rule that captures all of 3NF:
> Every nonkey attribute must depend on the key, the whole key, and nothing but the key.
- *the key* → 1NF (a key exists) - *the whole key* → 2NF (no partial dependency) - *nothing but the key* → 3NF (no transitive dependency)
Worked example: name the normal form
R1(EmpNo, ProjNo) -- 3NF (no nonkey attributes at all)
R2(EmpNo, ProjNo, Location, Allowance) [Location -> Allowance]
... composite key (EmpNo, ProjNo); Location & Allowance depend on the whole key,
... BUT Location -> Allowance is a transitive dependency -> only 2NF, NOT 3NF.
R3(EmpNo, ProjNo, Duration, Location) [ProjNo -> Duration]
... Duration depends on ProjNo, only PART of the key -> partial dependency -> only 1NF.
Reading the FDs tells you the form directly: a partial dependency caps you at 1NF; a transitive dependency caps you at 2NF; remove both and you reach 3NF.