3NF

Published 1 Year ago. data

3NF

[!example] A relation is in third normal form (3NF) if and only if:

  1. It is in second normal form (2NF).
  2. 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_idBuildingLight typeBulb Needed
1LeftFlorescent5b62
2RightFlorescent5b62
3LeftLed9bc
4CentreLed9bc
5RightIncandescent0015d

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_idbuildinglight type
1leftFlorescent
2rightflorescent
3leftLed
4centreLed
5rightIncandescent
Light typeBulb Needed
Florescent5b62
Florescent5b62
Led9bc
Led9bc
Incandescent0015d

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.