Sixth normal form


Sixth normal form is a term in relational database theory, used in two different ways.

6NF (C. Date's definition)

and others have defined sixth normal form as a normal form, based on an extension of the relational algebra.
Relational operators, such as join, are generalized to support a natural treatment of interval data, such as sequences of dates or moments in time, for instance in temporal databases. Sixth normal form is then based on this generalized join, as follows:
A relvar R is in sixth normal form if and only if it satisfies no nontrivial join dependencies at all — where, as before, a join dependency is trivial if and only if at least one of the projections involved is taken over the set of all attributes of the relvar concerned.

Date et al. have also given the following definition:
Relvar R is in sixth normal form if and only if every JD of R is trivial — where a JD is trivial if and only if one of its components is equal to the pertinent heading in its entirety.

Any relation in 6NF is also in 5NF.
Sixth normal form is intended to decompose relation variables to irreducible components. Though this may be relatively unimportant for non-temporal relation variables, it can be important when dealing with temporal variables or other interval data. For instance, if a relation comprises a supplier's name, status, and city, we may also want to add temporal data, such as the time during which these values are, or were, valid but the three values may vary independently of each other and at different rates. We may, for instance, wish to trace the history of changes to Status; a review of production costs may reveal that a change was caused by a supplier changing city and hence what they charged for delivery.
For further discussion on Temporal Aggregation in SQL, see also Zimanyi. For a different approach, see TSQL2.

DKNF

Some authors have used the term sixth normal form differently: as a synonym for Domain/key normal form.
This usage predates Date et al.'s work.

Usage

The sixth normal form is currently being used in some data warehouses where the benefits outweigh the drawbacks, for example using Anchor Modeling. Although using 6NF leads to an explosion of tables, modern databases can prune the tables from select queries where they are not required and thus speed up queries that only access several attributes.

Examples

In order for a table to be in 6NF, it has to comply with the 5NF first and then it requires that each table satisfies only trivial join dependencies.
Let’s take a simple example with a table already in 5NF:
Here, in the users table, every attribute is non null and the primary key is the username:
Users_table
This table is in 5NF because each join dependency is implied by the unique candidate key of the table. More specifically, the only possible join dependencies are:,.
The 6NF version would look like this:
Users
Users_dept
So, from one table in 5NF, 6NF produces two tables.
Following is another example:
TABLE 1
Medic NameOccupationTypePractice in years
Smith Jamesorthopedicspecialist23
Miller Michaelorthopedicprobationer4
Thomas Lindaneurologistprobationer5
Scott Nancyorthopedicresident1
Allen Brianneurologistspecialist12
Turner Stevenophthalmologistprobationer3
Collins Kevinophthalmologistspecialist7
King Donaldneurologistresident1
Harris Sarahophthalmologistresident2

The join dependencies of the table are, and. Hence we could see that such table is 2NF. The following tables try to bring it to 6NF:
TABLE 2.1
Medic NameOccupation
Smith Jamesorthopedic
Miller Michaelorthopedic
Thomas Lindaneurologist
Scott Nancyorthopedic
Allen Brianneurologist
Turner Stevenophthalmologist
Collins Kevinophthalmologist
King Donaldneurologist
Harris Sarahophthalmologist

TABLE 2.2
Medic NamePractice in years
Smith James23
Miller Michael4
Thomas Linda5
Scott Nancy1
Allen Brian12
Turner Steven3
Collins Kevin7
King Donald1
Harris Sarah2

TABLE 2.3
Medic NameType
Smith Jamesspecialist
Miller Michaelprobationer
Thomas Lindaprobationer
Scott Nancyresident
Allen Brianspecialist
Turner Stevenprobationer
Collins Kevinspecialist
King Donaldresident
Harris Sarahresident