3NF
[!example] A relation is in third normal form (3NF) if and only if:
- It is in second normal form (2NF).
- All non-prime attributes are directly (non-transitively) dependent on the entire candidate key. In other words, non-prime attributes must be functionally dependent on the key(s), but they must not depend on another non-prime attribute. 3NF non-prime attributes depend on “nothing but the key”. ^[https://vertabelo.com/blog/normalization-1nf-2nf-3nf/]
3NF is a Data Normalisation form.
| Job_id | Building | Light type | Bulb Needed |
|---|---|---|---|
| 1 | Left | Florescent | 5b62 |
| 2 | Right | Florescent | 5b62 |
| 3 | Left | Led | 9bc |
| 4 | Centre | Led | 9bc |
| 5 | Right | Incandescent | 0015d |
This is an example of data in a maintenance database. In this case which building and which Light needs fixing relate to the job Id, so we can add them to a single entity. Equally the bulb needed only relates to which type of light it broken so will have to go in it’s own entity.
| Job_id | building | light type |
|---|---|---|
| 1 | left | Florescent |
| 2 | right | florescent |
| 3 | left | Led |
| 4 | centre | Led |
| 5 | right | Incandescent |
| Light type | Bulb Needed |
|---|---|
| Florescent | 5b62 |
| Florescent | 5b62 |
| Led | 9bc |
| Led | 9bc |
| Incandescent | 0015d |
In this instance each entity has a key (Job_id and Light type) and attribute which relate to only that key. Therefor it is 3NF.