stuff ithink that will be on the quiz midterm l.
Download
Skip this Video
Loading SlideShow in 5 Seconds..
Stuff iThink that will be on the Quiz/Midterm. PowerPoint Presentation
Download Presentation
Stuff iThink that will be on the Quiz/Midterm.

Loading in 2 Seconds...

play fullscreen
1 / 21

Stuff iThink that will be on the Quiz/Midterm. - PowerPoint PPT Presentation


  • 352 Views
  • Uploaded on

Stuff iThink that will be on the Quiz/Midterm. Fourth Normal Form by Andrew Yee Why 4NF? Performance We want database to take up less space. Why 4NF? To eliminate the possibility for data anomalies. Why 4NF? To reduce the need for: inserts, updates deletes Normal Forms Comparison

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about 'Stuff iThink that will be on the Quiz/Midterm.' - paul2


An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
stuff ithink that will be on the quiz midterm

Stuff iThinkthat will be on the Quiz/Midterm.

Fourth Normal Form

by Andrew Yee

why 4nf
Why 4NF?
  • Performance
    • We want database to take up less space.
why 4nf3
Why 4NF?
  • To eliminate the possibility for data anomalies.
why 4nf4
Why 4NF?
  • To reduce the need for:
    • inserts,
    • updates
    • deletes
non trival multi valued dependencies mvd
Non-Trival Multi-Valued Dependencies (MVD)
  • Assume X is the Superkey
    • “Superkey” still depends on FD’s only.
  • Y is not a subset of X
  • X and Y are not, together, all the attributes.
recap of 4nf definition
Recap of 4NF Definition
  • No non-trivial multi-valued dependencies

- Except on superset of a candidate key

- Multi-valued dependencies are functional dependencies.

  • Table must be in BCNF
recap of 4nf definition8
Recap of 4NF Definition
  • No Duplications
  • Table must be in BCNF
example to get 4nf
Example to get 4NF
  • Assume the table is in BCNF
  • The town, Region, and District together form the candidate key.

From Reference #1

example to get 4nf10
Example to get 4NF
  • Decomposed into two tables

From Reference #1

example 2 is it in 3nf or bcnf
Example 2: Is it in 3NF or BCNF?

Pizza Delivery

From Reference #2

example 2 is it in 3nf or bcnf12
Example 2: Is it in 3NF or BCNF?
  • The table has no non-key attributes because its only key is {Restaurant, Pizza Variety, Delivery Area}.
  • The answer is BCNF.

From Reference #2

example 2 is it in 4nf
Example 2: Is it in 4NF?

Pizza Delivery

From Reference #2

example 2 is it in 4nf14
Example 2: Is it in 4NF?
  • If we assume, that pizza varieties offered by a restaurant are not affected by delivery area, then it does not meet 4NF.
  • The answer is NO.

From Reference #2

why not in 4nf
Why not in 4NF?

Two Non-trivial: MVD

Pizza Delivery

From Reference #2

why not in 4nf16
Why not in 4NF?
  • The table has two non-trivial multivalued dependencies on the {Restaurant} attribute (which is not a superkey).
  • The dependencies are:
    • {Restaurant} →→ {Pizza Variety}
    • {Restaurant} →→ {Delivery Area}

From Reference #2

how to fix it 4nf
How to “fix it” (4NF)?

Two Non-trivial: MVD

Pizza Delivery

From Reference #2

how to fix it 4nf18
How to “fix it” (4NF)?

Varieties By Restaurant

Delivery Areas By Restaurant

No Duplications among rows! Yay!

From Reference #2

practice example
Practice Example
  • Is this 3NF or BCNF?
  • Is this 4NF?
  • If not, what are the decomposed tables in 4NF?

Pizza Delivery

practice example answer
Practice Example (Answer)
  • BCNF 2. NO 3. See Below

Delivery Areas By Restaurant

Varieties By Restaurant

No Duplications among rows! Yay!

references
References
  • Website: Database Design: 4th and 5th Normal Forms « Tod means Fox

URL:http://blog.todmeansfox.com/2007/12/04/database-design-4th-and-5th-normal-forms/

2. Website: Fourth normal form - Wikipedia, the free encyclopedia

URL: http://en.wikipedia.org/wiki/Fourth_normal_form