2.7. Fourth Normal Form (4NF)

Fourth Normal Form (4NF) makes use of multivalued dependencies. The problem it solves is that the table has too many of them. For example, consider a table of departments, their projects, and the parts they stock. The MVDs in the table would be:

dept_name ->> jobs

dept_name ->> parts

Assume that dept_name ‘d1’ works on jobs ‘j1’ and ‘j2’ with parts ‘p1’ and ‘p2’; that dept_name ‘d2’ works on jobs ‘j3’, ‘j4’, and ‘j5’ with parts ‘p2’ and ‘p4’; and that dept_name ‘d3’ works only on job ‘j2’ with parts ‘p5’ and ‘p6’. The table would look like this:

dept job part ================= 'd1' 'j1' 'p1' 'd1' 'j1' 'p2' 'd1' 'j2' 'p1' 'd1' 'j2' 'p2' 'd2' 'j3' 'p2' 'd2' 'j3' 'p4' 'd2' 'j4' 'p2' 'd2' 'j4' 'p4' 'd2' 'j5' 'p2' 'd2' ...

Get Joe Celko's SQL for Smarties, 3rd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.