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
|
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
.
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.
, Then 
and
, Then 
and
, then 
The following also involve functional dependencies:
, then 
and
, then 
The above rules are sound and complete.
Y holds in R.
.
. A trivial multivalued dependency implies, for tuples
and
, tuples
and
which are equal to
and
.
.This entry is from Wikipedia, the leading user-contributed encyclopedia. It may not have been reviewed by professional editors (see full disclaimer)