Multivalued dependency
In database theory, multivalued dependency is a full constraint between two sets of attributes in a relation.
In contrast to the functional dependency, the multivalued dependency requires that certain tuples be present in a relation. Therefore, a multivalued dependency is a special case of tuple-generating dependency. The multivalued dependency plays a role in the 4NF database normalization.
Contents |
[edit] Formal definition
The formal definition is given as follows. [1]
Let
be a relation schema and let
and
(subsets). The multivalued dependency
(which can be read asmultidetermines
) holds on
if, in any legal relation
, for all pairs of tuples
and
in
such that
, there exist tuples
and
in
such that
In more simple words the above condition can be expressed as follows: if we denote by
the tuple having values for
collectively equal to
correspondingly, then whenever the tuples
and
exist in
, the tuples
and
should also exist in
.
[edit] Example
Consider this example of a database of teaching courses, the books recommended for the course, and the lecturers who will be teaching the course:
| Course | Book | Lecturer |
|---|---|---|
| AHA | Silberschatz | John D |
| AHA | Nederpelt | William M |
| AHA | Silberschatz | William M |
| AHA | Nederpelt | John D |
| AHA | Silberschatz | Christian G |
| AHA | Nederpelt | Christian G |
| OSO | Silberschatz | John D |
| OSO | Silberschatz | William M |
Because the lecturers attached to the course and the books attached to the course are independent of each other, this database design has a multivalued dependency; if we were to add a new book to the AHA course, we would have to add one record for each of the lecturers on that course, and vice versa.
Put formally, there are two multivalued dependencies in this relation: {course}
{book} and equivalently {course}
{lecturer}.
Databases with multivalued dependencies thus exhibit redundancy. In database normalization, fourth normal form requires that either every multivalued dependency X
Y is trivial or for every nontrivial multivalued dependency X
Y, X is a superkey.
[edit] Interesting properties
- If
, Then 
- If
and
, Then 
- If
and
, then 
The following also involve functional dependencies:
- If
, then 
- If
and
, then 
The above rules are sound and complete.
- A decomposition of R into (X, Y) and (X, R − Y) is a lossless-join decomposition if and only if X
Y holds in R.
[edit] Definitions
- full constraint
- A constraint which expresses something about all attributes in a database. (In contrast to an embedded constraint.) That a multivalued dependency is a full constraint follows from its definition,as where it says something about the attributes
. - tuple-generating dependency
- A dependency which explicitly requires certain tuples to be present in the relation.
- trivial multivalued dependency 1
- A multivalued dependency which involves all the attributes of a relation i.e.
. A trivial multivalued dependency implies, for tuples
and
, tuples
and
which are equal to
and
. - trivial multivalued dependency 2
- A multivalued dependency for which
.
[edit] References
- ^ Silberschatz, Abraham; Korth, Sudarshan (2006). Database System Concepts (5th ed.). McGraw-Hill. p. 295. ISBN 007-124476-X.
[edit] External links
- Multivalued dependencies and a new Normal form for Relational Databases (PDF) - Ronald Fagin, IBM Research Lab
be a relation schema and let
and
(subsets). The multivalued dependency
multidetermines
) holds on
, for all pairs of tuples
and
in
, there exist tuples
and
in ![t _1[\alpha] = t _2 [\alpha] = t _3 [\alpha] = t _4 [\alpha]](http://upload.wikimedia.org/wikipedia/en/math/8/5/d/85dfa6c14b7eddaacd959fe36645bb7e.png)
![t _3[\beta] = t _1 [\beta]](http://upload.wikimedia.org/wikipedia/en/math/c/a/7/ca736f7724f1a97d2399cf73db719652.png)
![t _3[R - \beta] = t _2 [R - \beta]](http://upload.wikimedia.org/wikipedia/en/math/f/c/b/fcbff7e18df9591c9c1ed09355ea6014.png)
![t _4[\beta] = t _2 [\beta]](http://upload.wikimedia.org/wikipedia/en/math/a/1/2/a12ea64b17943932a37ad5453f927e86.png)
![t _4[R - \beta] = t _1 [R - \beta]](http://upload.wikimedia.org/wikipedia/en/math/0/b/5/0b5bda4e4851fe2b567c8be94ac569cc.png)

, Then 
, then 
, then
, then
.
. A trivial multivalued dependency implies, for tuples
.