DATABASE function dependency

Source: Internet
Author: User

Set R (u) to the relational mode on the property set U, and X and Y to the subset of U.
If any possible relationship between R (u) is R, the attribute values of two tuples on X cannot be the same in R, but the attribute values on y cannot be the same, it is called "x function determines y" or "y function depends on X" and is recorded as X → y.
X is called the decision Attribute Set (determinant) of this function dependency ).
Y = f (x)
Note:
1. function dependency is not a constraint that is met by one or some relational instances in relational mode R, but a constraint that must be met by all relational instances in R.
2. function dependency is the concept of semantic category. Function dependencies can only be determined based on the data semantics.
For example, the "Name> Age" function is only valid when the same celebrity is not allowed.
3. Database designers can enforce regulations on the real world. For example, if the same celebrity is not allowed to appear, the function depends on "Name> age. The inserted tuples must satisfy the specified function dependency. If the same celebrity exists, the inserted tuples are not loaded.
Example: Student (SNO, sname, ssex, sage, sdept)
Assume that duplicate names are not allowed:
Sno → ssex, SnO → sage, SnO → sdept,
Sno plugin → sname, sname → ssex, sname → sage
Sname → sdept
But ssex-/→ sage
If X → y and Y → X, it is recorded as X then → y.
If y does not depend on X, it is recorded as X-/→ y.
In the relational mode R (u), for the subset X and Y of U,
If X → y, but y is not a subset of X, X → y is called a non-trivial function dependency.
If X → y, but y is a subset of X, X → y is an ordinary function dependency.
For example, in Relation SC (SNO, CNO, grade,
Non-trivial function dependency: (SNO, CNO) → grade
Ordinary function dependency: (SNO, CNO) → SnO
(SNO, CNO) → CNO
Some function dependencies: If X-> Y and the real subset X1 of x exists, so that x1-> Y, y depends on X.
Full function dependency: If X-> Y and there is no x1-> Y in any real subset of X, Y is completely dependent on X.

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.