|
Answer 4:
The term functional dependency and functional
dependency are used interchangeably in the literature. We may
use example the shipment, one that includes the usual attributes
S#, P#, QTY and CITY.
|
S# |
CITY |
P# |
QTY |
|
S1 |
Delhi |
P1 |
100 |
|
S1 |
Delhi |
P2 |
100 |
|
S2 |
Mumbai |
P1 |
200 |
|
S2 |
Mumbai |
P2 |
200 |
|
S3 |
Mumbai |
P2 |
300 |
|
S4 |
Delhi |
P2 |
400 |
|
S4 |
Delhi |
P4 |
400 |
|
S4 |
Delhi |
P5 |
400 |
Let r be a relation, and
let X and Y be arbitrary subsets of the set of attributes of r. Then we say that Y is a Functional dependent of X in
symbols.
X->Y
If and only if each X
value in r has associated with it precisely one y value in r.
In
other words, whenever two tuples or r agree on their X value, they
also agree on their Y values.
For example the relation shown
in figure satisfied the functional dependency
{S#}->{CITY}
because
every tuple of the relation with a given S# value also has the same CITY
value.
A functional dependency is a
many-to-one relationship between two sets of attributes of a given relvar. Given a relvar R, the functional
dependency
A->B
is said to hold for R if and only if, whenever two tuples of R have
the same
value for A, they also have the same value for B. every relvar
necessarily satisfies certain trivial functional dependencies.
Functional dependency is
trivial if and right-hand side that is dependent is a subset of the
left hand side that is the determinant.
|