8. Functional Dependencies Flashcards
(6 cards)
Functional Dependency (FD):
A constraint denoted by X → Y, where X (LHS) and Y (RHS) are sets of attributes in a relation R. It specifies that for any two tuples, if they have the same values for attributes in X, they must have the same values for attributes in Y. X determines Y, or Y is functionally dependent on X.
Inference Rules (Armstrong’s Axioms):
A set of rules used to infer additional FDs implied by a given set F.
◦ Reflexive: If Y ⊆ X, then X → Y.
◦ Augmentation: If X → Y, then XZ → YZ and XZ → Y (for any Z).
◦ Transitive: If {X → Y, Y → Z}, then X → Z.
◦ Decomposition (Projective): If X → YZ, then X → Y and X → Z.
◦ Union (Additive): If {X → Y, X → Z}, then X → YZ.
◦ Pseudotransitive: If {X → Y, WY → Z}, then WX → Z.
Closure of FDs (F+):
The set of all FDs that can be inferred from a given set F using the inference rules.
Closure of Attributes (X+):
Given a set of FDs F and a set of attributes X, X+ is the maximal set of attributes determined by X. Algorithm: Start with X, repeatedly add attributes determined by any set of attributes currently in X+ based on the FDs in F.
Redundant FD:
An FD X → Y in a set F is redundant if it can be inferred from the other FDs in F (i.e., F+ = (F - {X → Y})+).
Minimal Cover:
A set of FDs F is minimal (irreducible) if every RHS is a single attribute, every LHS is irreducible (no redundant attributes), and no FD in F is redundant. An algorithm exists to compute a minimal cover for any set of FDs.