1021-MWagner - Matt Wagner Database Notes 10/21/2008...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Matt Wagner Database Notes 10/21/2008 Functional Dependencies Functional Dependency constraints on the relationship between attributes in the schema In R, X <= R, Y <= R X Y In all instances of R, if two tuples have the same values in X, then they should have the same values in Y. A Key Relationship is a functional dependency (F.D.) 1) Determined on the schema level, not relational instance e.g. Y depends on X, or X determines Y 2) A generalization of the key concept 3) The initial set of F.D.'s comes from the application / customer / boss / requirements / et al. Ex: SSN (determines) Fname Rules to Derive F.D.'s Subset Property (Axiom of Reflexivity): If Y is a subset of X, then X Y Augmentation (Axiom of Augmentation): If X Y, then XZ YZ Transitivity (Axiom of Transitivity): If X Y and Y Z, then X Z These three constitute a complete set of rules, though more rules may be derived from these three. Ex: R = {A, B, C, G, H, I} F = A B A C CG H CG I B H 1) AH ?? Yes, via transitive. AB>H 2) AGI ?? Yes, via augmentation. AGCG CGI (transitive) 3) CGHI ?? Yes, CGICG replace CG with H, this CGHI "Closure" of F: all possible functional dependencies derived using 3 rules given initial set of F Database Normalization: 2nd Normal Form: (2NF) if and only if, given any candidate key and any attribute that is not a constituent of a candidate key, the nonkey attribute depends upon the whole of the candidate key rather than just a part of it. 3rd Normal Form: (3NF) if and only if both of the following conditions hold: * The relation R (table) is in second normal form (2NF) * Every nonprime attribute of R is nontransitively dependent (i.e. directly dependent) on every key of R. BoyceCodd Normal Form: (BCNF) It is a slightly stronger version of the third normal form (3NF). A table is in BoyceCodd normal form if and only if, for every one of its nontrivial functional dependencies X Y, X is a superkey--that is, X is either a candidate key or a superset thereof. Relationships Among NF's: 1NF (is weaker than) BCNF 2NF 1NF Etc. ...
View Full Document

This note was uploaded on 07/31/2011 for the course EEL 4852c taught by Professor Tu during the Fall '08 term at University of South Florida - Tampa.

Ask a homework question - tutors are online