70 likes | 200 Vues
DATABASE DESIGN. Functional Dependencies. Overview. Functional Dependencies Normalization Functional dependencies Normal forms. Functional Dependencies FD. Describes relationship between attributes in a relation.
E N D
DATABASE DESIGN Functional Dependencies
Overview • Functional Dependencies • Normalization • Functional dependencies • Normal forms
Functional Dependencies FD • Describes relationship between attributes in a relation. • If two tuples of a table agree on their X value they also agree on their Y value • If A and B are attributes of relation R, B is functionally dependent on A (denoted A B), if each value of A in R is associated with exactly one value of B in R. • Define all the functional dependencies for the employee data-items
FD Rules • Inclusion Rule - Given table, T with heading, HEAD(T) • If X and Y sets of attributes contained in HEAD(T), AND then X Y • Trivial Dependency - FD of the form X Y that hold for any T where X, Y HEAD(T) • example - right hand side subset of left side
Armstrong’s Axioms + • Reflexivity: If Y is a subset of X, then X Y • Self-determination: Y Y • Transitivity: If X Y and Y Z, the X Y • Augmentation: If X Y, then XZ YZ • Union: If X Y and X Z, then X YZ • Decomposition: If X YZ, then X Y and X Z • Pseudotransivity: If X Y and WY Z, then XW Z • Accumulation: If X YZ and Z BW, then X YZB
Irreducible Sets of FDs • Set, S of FD irreducible iff • right-hand side of every FD in S singleton set • left-hand side of every FD in S irreducible in turn (no determinant can be discarded from the determinant without loosing information • No FD can be discarded from S without changing closure (loosing information)
Review Question • Consider the following two sets of functional dependencies_ F = (A C, AC D, E AD, E H) G = (A CD, E AH) Check whether they are equivalent.