fourth normal form

we present the definition of fourth normal form (4NF), which is violated when a relation has undesirable multivalued dependencies and hence can be used to identify and decompose such relations.
a relation schema is in 4NF with respect to a set of dependencies (that includes functional dependencies and multivalued dependencies) if, for every nontrivial multivalued dependency in , is a superkey for .
[cite:;from @elmasri_db_2015 chapter 14.6.1 formal definition of multivalued dependency]
[cite:;see @elmasri_db_2015 chapter 14 basics of functional dependencies and normalization for relational databases]
4nf is applied in cases where in the key there are pairs of fields between which there is a multivalued dependency, with no relations between the different pairs.
a relation satisfies the 4nf normalization degree if:
  1. it satisfies all of 1nf, 2nf, 3nf: the fields that arent in the key are dependent on the whole key only.
  2. in the key there is at most one multivalued dependency.
if there is more than one multivalued dependency inside the key, we must divide the relation into multiple relations, one for each pair of fields of multivalued dependencies. in each relation the key is both fields.
consider the relation (worker id, project code, language), a worker can be a part of many projects, a worker can know different languages, there is no relation between the languages one knows and the projects theyre in.
to 4nf-normalize this relation we turn it into the following schema:
  • (worker id, project)
  • (worker id, language)