Functional Dependencies (FDs)
A functional dependency X Y holds over relation R if, for every allowable instance r of R:
- t1 r, t2 r, t1.X = t2.X implies t1.Y = t2.Y
- i.e., given two tuples in r, if the X values agree, then the Y values must also agree. (X and Y are sets of attributes.)
An FD is a statement about all allowable relations.
- Identified by DBA based on semantics of application.
- Given some allowable instance r1 of R, we can check if it violates some FD f, but we cannot tell if f holds over R!
K is a candidate key for R means that K R
- However, K R does not require K to be minimal!