Hamish Burke | 2025-05-22
Related to: #databases
Normal Form
- 1NF: All attributes domains
- Meaning each attribute is not nested/composite values
- domains can be strings/dates/numbers etc (NOT lists/sets)
- 2NF: 1NF holds. No Functional Dependency from any proper subset of a candidate key to a non-prime attribute
- Eg if candidate key was
, and and are not prime (not in any candidate keys) or can't exist
- Eg if candidate key was
- 3NF: 2NF holds. For every FD
either is a Superkey or is a prime attribute - BCNF: For every non-trival FD
, is a Superkey
To apply
- Compute all candidate keys via Attribute Closure
- Identify prime vs non-prime attributes
- Test each FD for partial (2NF), transitive (3NF) violations and key-status (BCNF)
Candidate Key
- A minimal
such that
Prime Attribute
- Appears in at least one candidate key
- Even in a subset?
Non-prime Attribute
- Appears in no candidate key