Presentation is loading. Please wait.

Presentation is loading. Please wait.

Relational Design Theory

Similar presentations


Presentation on theme: "Relational Design Theory"— Presentation transcript:

1 Relational Design Theory
Multivalued Dependencies & 4th Normal Form

2 Relational design by decomposition
MVDs & 4NF Relational design by decomposition “Mega” relations + properties of the data System decomposes based on properties Final set of relations satisfies normal form No anomalies, no lost information Functional dependencies  Boyce-Codd Normal Form Multivalued dependences  Fourth Normal Form

3 Example: College application info. FDs? Keys? BCNF? Good design?
MVDs & 4NF Example: College application info. Apply(SSN, cName, hobby) FDs? Keys? BCNF? Good design?

4 Multivalued Dependency
MVDs & 4NF Multivalued Dependency Based on knowledge of real world All instances of relation must adhere

5 MVDs & 4NF Apply(SSN, cName, hobby)

6 Modified example MVDs? Good design? MVDs & 4NF
Apply(SSN, cName, hobby) Reveal hobbies to colleges selectively MVDs? Good design?

7 Expanded example MVDs & 4NF Apply(SSN, cName, date, major, hobby)
Reveal hobbies to colleges selectively Apply once to each college May apply to multiple majors

8 Trivial Multivalued Dependency Nontrivial MVD
MVDs & 4NF Trivial Multivalued Dependency Nontrivial MVD

9 Rules for Multivalued Dependencies FD-is-an-MVD rule
MVDs & 4NF Rules for Multivalued Dependencies FD-is-an-MVD rule

10 Rules for Multivalued Dependencies Intersection rule Transitive rule
MVDs & 4NF Rules for Multivalued Dependencies Intersection rule Transitive rule

11 Fourth Normal Form MVDs & 4NF Relation R with MVDs is in 4NF if:
For each nontrivial A B, A is a key

12 Fourth Normal Form MVDs & 4NF Relation R with MVDs is in 4NF if:
For each nontrivial A B, A is a key

13 4NF decomposition algorithm
MVDs & 4NF 4NF decomposition algorithm Input: relation R + FDs for R + MVDs for R Output: decomposition of R into 4NF relations with “lossless join” Compute keys for R Repeat until all relations are in 4NF: Pick any R’ with nontrivial A B that violates 4NF Decompose R’ into R1(A, B) and R2(A, rest) Compute FDs and MVDs for R1 and R2 Compute keys for R1 and R2

14 BCNF Decomposition Example #1
MVDs & 4NF BCNF Decomposition Example #1 Apply(SSN, cName, hobby)

15 BCNF Decomposition Example #2
MVDs & 4NF BCNF Decomposition Example #2 Apply(SSN, cName, date, major, hobby)

16 Relational design MVDs & 4NF
Functional dependencies & Boyce-Codd Normal Form Multivalued dependences & Fourth Normal Form


Download ppt "Relational Design Theory"

Similar presentations


Ads by Google