|< < 19 > >|

Functional Dependencies

Definition

  • A relation
  • A set of attributes in R, (think function input)
  • A set of attributes in R, (think function output)

A functional dependency XY holds in relation R if for two different rows, r and s: If r[X] = s[X] then r[Y] = s[Y].

Equivalent statements

  • r[X]s[X] or r[Y] = s[Y]

  • Either the Xs are different, or they are the same and then the Ys are the same too.

  • The Ys are the same whenever the Xs are.

Example


XY XY does not hold
X Y Z
1 10 aaa
2 20 bbb
2 20 ccc
X Y Z
1 10 aaa
2 20 bbb
2 21 ccc

|< < 19 > >|