Data Dependency plays an important role in the relational database design theory. Among them, function dependencies and multi-value dependencies are the most important. How can we understand these two dependencies? After learning for a while, we not only think of the scenario of learning functions in high school.
Before learning the concept of a function, we first introduce the concept of ing. The one-to-one ing relationship is called a function. Simple Example
F (x, y, z) = x2 + 4y + z
For any definite (x, y, z), a definite f (x, y, z) corresponds to it. This concept can be easily applied to relational database models, R (u), u = {X, Y, Z, k}, for any single tuples, As long as (x, y, z) then, we can determine the entire tuples, that is, the relationship between K = f (x, y, z), but here f cannot be expressed by formulas, it can only be a semantic meaning.
Later, we came into contact with an equation similar to y2 = X, that is
F (x, y) = +-SQRT (X)
Obviously, for a definite x value, f (x) may have two values corresponding to them. Starting from the strict definition of "function", this is not a function. To unify the concept, it is called a multi-value function ". Note that although x cannot completely determine the value of f (x, y), it can determine the value range of f (x, y) (all possible value groups ).
The multi-value dependency in relational mode is similar in concept. Some attributes in a given tuples can determine the possible values of other attributes. That is to say, the given attribute values can determine several tuples, instead of unique tuples.
Or the above multi-value function, we can see that the value of f (x, y) is only related to X, but not y. This is called the trivial multi-value dependency in the relational mode. The ordinary multi-value dependency can exist in 4nf, but not ordinary and non-function multi-value dependency cannot exist in 4nf.