# Denny Tran CS157B 3/25/2010. Agenda  Definition  MVD Rules  Examples.

## Presentation on theme: "Denny Tran CS157B 3/25/2010. Agenda  Definition  MVD Rules  Examples."— Presentation transcript:

Denny Tran CS157B 3/25/2010

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.

Graphical Representation

MVD Rules Every FD is an MVD: If X -> Y, then X ->> Y ABC 132 212 133 211 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. ABC 132 212 133 211 Show if A ->> B then A ->> C 1: 2,3 2: 2,1 ABC 13 21 True

Example 1 Instructor ->> Book InstructorBookClass PriceInro CompMIS 2003 ParkerIntro CompMIS 2003 KempData in Action MIS 4533 KempORACLE Tricks MIS 4533 WarnerData in Action MIS 4533 WarnerORACLE Tricks MIS 4533 Price: Intro Comp Parker: Intro Comp Kemp: Data in Action, ORACLE Tricks Warner: Data in Action, ORACLE Tricks InstructorBookClass Price Intro CompMIS 2003 Parker Intro CompMIS 2003 Kemp MIS 4533 Warner MIS 4533 Data in Action ORACLE Tricks ORACLE Tricks MVD Satisfied!

Example 1 cont InstructorBookClass PriceInro CompMIS 2003 ParkerIntro CompMIS 2003 KempData in ActionMIS 4533 KempORACLE Tricks MIS 4533 WarnerData in ActionMIS 4533 WarnerORACLE Tricks MIS 4533 Instructor ->> Class Price: MIS2003 Parker: MIS2003 Kemp: MIS4533 Warner: MIS4533 Nothing to swap so satisfies MVD.

Example 1 cont InstructorBookClass PriceInro CompMIS 2003 ParkerIntro CompMIS 2003 KempData in ActionMIS 4533 KempORACLE Tricks MIS 4533 WarnerData in ActionMIS 4533 WarnerORACLE Tricks MIS 4533 Class ->> Instructor MIS2003: Price, Parker MIS4533: Kemp, Warner InstructorBookClass Intro Comp MIS 2003 Data in Action MIS 4533 ORACLE Tricks MIS 4533 PriceParker Kemp Warner MVD Satisfied!

Example 2 NameArea CodePhoneBeers Liked Beer Manufacturer Sue650555-1111 Bud A.B. Sue650555-1111 WickedAle Pete's Sue415555-9999 Bud A.B. Sue415555-9999 WickedAle Pete's Name ->> Area Code? NameArea CodePhoneBeers Liked Beer Manufacturer Sue 415555-1111 Bud A.B. Name ->> Phone? NameArea CodePhoneBeers Liked Beer Manufacturer Sue650555-9999 Bud A.B. No

Example 2 Cont NameArea CodePhoneBeers Liked Beer Manufacturer Sue650555-1111 Bud A.B. Sue650555-1111 WickedAle Pete's Sue415555-9999 Bud A.B. Sue415555-9999 WickedAle Pete's Name ->> AreaCode Phone? Sue: {650, 555-1111}, {415, 555-9999} NameArea CodePhoneBeers Liked Beer Manufacturer Sue Bud A.B. Sue WickedAle Pete's Yes!

Example 3: Tuple-generating effect of MVD ABCD 1121 1231 1312 1 2 2 1 1 3 2 1 1 1 3 1 1 3 3 1 1 1 1 2 1 2 1: 1, 2, 3A ->> B

Questions?

Download ppt "Denny Tran CS157B 3/25/2010. Agenda  Definition  MVD Rules  Examples."

Similar presentations