Fourth Normal Form
   HOME

TheInfoList



OR:

Fourth normal form (4NF) is a normal form used in
database normalization Database normalization is the process of structuring a relational database in accordance with a series of so-called '' normal forms'' in order to reduce data redundancy and improve data integrity. It was first proposed by British computer scien ...
. Introduced by Ronald Fagin in 1977, 4NF is the next level of normalization after Boyce–Codd normal form (BCNF). Whereas the
second The second (symbol: s) is a unit of time derived from the division of the day first into 24 hours, then to 60 minutes, and finally to 60 seconds each (24 × 60 × 60 = 86400). The current and formal definition in the International System of U ...
, third, and Boyce–Codd normal forms are concerned with functional dependencies, 4NF is concerned with a more general type of dependency known as a multivalued dependency. A
table Table may refer to: * Table (database), how the table data arrangement is used within the databases * Table (furniture), a piece of furniture with a flat surface and one or more legs * Table (information), a data arrangement with rows and column ...
is in 4NF
if and only if In logic and related fields such as mathematics and philosophy, "if and only if" (often shortened as "iff") is paraphrased by the biconditional, a logical connective between statements. The biconditional is true in two cases, where either bo ...
, for every one of its non-trivial multivalued dependencies ''X'' \twoheadrightarrow ''Y'', ''X'' is a superkey—that is, ''X'' is either a
candidate key A candidate key, or simply a key, of a relational database is any set of columns that have a unique combination of values in each row, with the additional constraint that removing any column could produce duplicate combinations of values. A candi ...
or a superset thereof."A relation schema R* is in fourth normal form (4NF) if, whenever a nontrivial multivalued dependency X \twoheadrightarrow Y holds for R*, then so does the functional dependency X → A for every column name A of R*. Intuitively all dependencies are the result of keys."


Multivalued dependencies

If the column headings in a relational database table are divided into three disjoint groupings ''X'', ''Y'', and ''Z'', then, in the context of a particular row, we can refer to the data beneath each group of headings as ''x'', ''y'', and ''z'' respectively. A multivalued dependency ''X'' \twoheadrightarrow ''Y'' signifies that if we choose any ''x'' actually occurring in the table (call this choice ''xc''), and compile a list of all the ''xcyz'' combinations that occur in the table, we will find that ''xc'' is associated with the same ''y'' entries regardless of ''z''. So essentially the presence of z provides no useful information to constrain the possible values of ''y''. A trivial multivalued dependency ''X'' \twoheadrightarrow ''Y'' is one where either ''Y'' is a subset of ''X'', or ''X'' and ''Y'' together form the whole set of attributes of the relation. A functional dependency is a special case of multivalued dependency. In a functional dependency ''X'' → ''Y'', every ''x'' determines ''exactly one y'', never more than one.


Example

Consider the following example: Each row indicates that a given restaurant can deliver a given variety of pizza to a given area. The table has no non-key attributes because its only candidate key is . Therefore, it meets all normal forms up to BCNF. If we assume, however, that pizza varieties offered by a restaurant are not affected by delivery area, or the converse, that delivery areas are not affected by pizza varieties (i.e. a restaurant offers all pizza varieties it makes to all areas it supplies), then it does not meet 4NF. The problem is that the table features two non-trivial multivalued dependencies on the attribute (which is not a superkey). The dependencies are: * \twoheadrightarrow * \twoheadrightarrow These non-trivial multivalued dependencies on a non-superkey reflect the fact that the varieties of pizza a restaurant offers are independent from the areas to which the restaurant delivers. This state of affairs leads to redundancy in the table: for example, we are told three times that A1 Pizza offers Stuffed Crust, and if A1 Pizza starts producing Cheese Crust pizzas then we will need to add multiple rows, one for each of A1 Pizza's delivery areas. There is, moreover, nothing to prevent us from doing this incorrectly: we might add Cheese Crust rows for all but one of A1 Pizza's delivery areas, thereby failing to respect the multivalued dependency \twoheadrightarrow . To eliminate the possibility of these anomalies, we must place the facts about varieties offered into a different table from the facts about delivery areas, yielding two tables that are both in 4NF: In contrast, if the pizza varieties offered by a restaurant sometimes did legitimately vary from one delivery area to another, the original three-column table would satisfy 4NF. Ronald Fagin demonstrated that it is always possible to achieve 4NF.Fagin, p. 268 Rissanen's theorem is also applicable on multivalued dependencies.


4NF in practice

A 1992 paper by Margaret S. Wu notes that the teaching of database normalization typically stops short of 4NF, perhaps because of a belief that tables violating 4NF (but meeting all lower normal forms) are rarely encountered in business applications. This belief may not be accurate, however. Wu reports that in a study of forty organizational databases, over 20% contained one or more tables that violated 4NF while meeting all lower normal forms.


Normalization beyond 4NF

Only in rare situations does a 4NF table not conform to the higher normal form 5NF. These are situations in which a complex real-world constraint governing the valid combinations of attribute values in the 4NF table is not implicit in the structure of that table.


See also

* Attribute-value system *
Bijection In mathematics, a bijection, bijective function, or one-to-one correspondence is a function between two sets such that each element of the second set (the codomain) is the image of exactly one element of the first set (the domain). Equival ...
*
Injective function In mathematics, an injective function (also known as injection, or one-to-one function ) is a function that maps distinct elements of its domain to distinct elements of its codomain; that is, implies (equivalently by contraposition, impl ...
*
First normal form First normal form (1NF) is the simplest form of database normalization defined by English computer scientist Edgar F. Codd, the inventor of the relational database. A Relation (database), relation (or a Table (database), ''table'', in SQL) can be ...
(1NF) *
Second normal form Second normal form (2NF), in database normalization, is a normal form. A relation is in the second normal form if it fulfills the following two requirements: # It is in first normal form. # It does not have any non-prime attribute that is fun ...
(2NF) *
Third normal form Third normal form (3NF) is a database schema design approach for relational databases which uses normalizing principles to reduce the duplication of data, avoid data anomalies, ensure referential integrity, and simplify data management. It was d ...
(3NF) *
Fifth normal form Fifth normal form (5NF), also known as projection–join normal form (PJ/NF), is a level of database normalization designed to remove redundancy in relational databases recording multi-valued facts by isolating semantically related multiple relati ...
(5NF) *
Sixth normal form Sixth normal form (6NF) is a normal form used in relational database normalization which extends the relational algebra and generalizes relational operators (such as join) to support interval data, which can be useful in temporal databases. Th ...
(6NF)


References


Further reading

*Date, C. J. (1999),
An Introduction to Database Systems
' (8th ed.). Addison-Wesley Longman. . *Kent, W. (1983)

', Communications of the ACM, vol. 26, pp. 120–125 {{Database normalization 4NF de:Normalisierung (Datenbank)#Vierte Normalform (4NF)