140 likes | 270 Views
Denny Tran CS157B 3/25/2010. MULTIvalued Dependency. Agenda. Definition MVD Rules Examples. Definition.
E N D
Denny Tran CS157B 3/25/2010 MULTIvalued Dependency
Agenda • Definition • MVD Rules • Examples
Definition • The multivalued dependency X->>Y holds in a relation R if wherever we have two tuples of R that agree in all the attributes of X, then we can swap their Y components and get two new tuples that are also in R.
MVD Rules Every FD is an MVD: If X -> Y, then X ->> Y A -> B 1: 3 2: 1 A ->> B
MVD Rules Cont Complementation: If X ->> Y, then X ->> Z where Z is all attributes not in X or Y. 1: 2,3 2: 2,1 Show if A ->> B then A ->> C True
Example 1 Instructor ->> Book Price: Intro Comp Parker: Intro Comp Kemp: Data in Action, ORACLE Tricks Warner: Data in Action, ORACLE Tricks ORACLE Tricks Data in Action ORACLE Tricks Data in Action MVD Satisfied!
Example 1 cont Instructor ->> Class Price: MIS2003 Parker: MIS2003 Kemp: MIS4533 Warner: MIS4533 Nothing to swap so satisfies MVD.
Example 1 cont Class ->> Instructor MIS2003: Price, Parker MIS4533: Kemp, Warner Parker Price Warner Kemp Warner Kemp MVD Satisfied!
Example 2 Name ->> Area Code? No Name ->> Phone? No
Example 2 Cont Name ->> AreaCode Phone? Yes! Sue: {650, 555-1111}, {415, 555-9999}
Example 3: Tuple-generating effect of MVD A ->> B 1: 1, 2, 3 1 2 2 1 1 3 2 1 1 1 3 1 1 3 3 1 1 1 1 2 1 2 1 2