Database Engineer self-study (7)-function dependency and multi-value dependency

Source: Internet
Author: User

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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.