Q51605 What are the Rules about Functional Dependencies?

Answer

Functional dependencies (FD) are type of constraint that is based on keys. A superkey is defined as in the relational schema R , where:

a subset K of R is a subkey of R if, in any legal relation r(R), for all pairs, t 1 and t2 in tuple r such that t1 is not equal to t2 then t1 [K] is not equal to t2[K].

Or, no two rows (tuples) have the same value in the attribute(s) K, which is the key. Now, if there are two attributes (or sets of attributes) A and B that are legal in the relation schema R, we can have a functional dependency where

A implies B

for all pairs of tuples such that t1[A] is equal to t2[A] andt1[B] is equal to t2[B]. This allows us to state that K is a superkey of R if K implies R. For example, in a relation that has names and social security numbers, whenever your Social Security number is the student ID, the name in that tuple can only contain your name. That is because your name is not unique, but your Social Security is. If I go to the Social Security Administration and search their database for the name “Gary Burt”, the results is a large number of people. If I search of the social security number “123-45-6789”, the result is one and only one person.

Another example is in the loan information that we looked at before:

Loan-info-schema = (branch-name, loan-name, customer-name, amount)

it can be shown that the loan-number implies both the amount and the branch-name.It does not imply the customer-name because there may be more than one person listed on the load, such as a husband and wife, or parent and child (when the parent co-signs the loan).

Functional dependencies:

  1. Specify a set of constraints on a legal relation.
  2. Test relations to see if they are legal.

Some relations are said to be trivial when they are satisfied by all relations:

ed010d383e1f191bdb025d5985cc03fc?s=120&d=mm&r=g

DistPub Team

Distance Publisher (DistPub.com) provide project writing help from year 2007 and provide writing and editing help to hundreds student every year.