# slides4 - Schedule Today Jan 15(T x x Normal Forms...

This preview shows pages 1–6. Sign up to view the full content.

Winter 2002 Arthur Keller – CS 180 4–1 Schedule Today: Jan. 15 (T) Normal Forms, Multivalued Dependencies. Read Sections 3.6-3.7. Assignment 1 due. Jan. 17 (TH) Relational Algebra. Read Chapter 5. Project Part 1 due. Jan. 22 (T) SQL Queries. Read Sections 6.1-6.2. Assignment 2 due. Jan. 24 (TH) Subqueries, Grouping and Aggregation. Read Sections 6.3-6.4. Project Part 2 due.

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
Winter 2002 Arthur Keller – CS 180 4–2 Normalization Goal = BCNF = Boyce-Codd Normal Form = all FD’s follow from the fact “key everything.” Formally, R is in BCNF if for every nontrivial FD for R , say X A , then X is a superkey. “Nontrivial” = right-side attribute not in left side. Why? 1. Guarantees no redundancy due to FD’s. 2. Guarantees no update anomalies = one occurrence of a fact is updated, not all. 3. Guarantees no deletion anomalies = valid fact is lost when tuple is deleted.
Winter 2002 Arthur Keller – CS 180 4–3 Example of Problems Drinkers(name , addr, beersLiked , manf, favoriteBeer) FD’s: 1. name addr 2. name favoriteBeer 3. beersLiked manf ???’s are redundant, since we can figure them out from the FD’s. Update anomalies: If Janeway gets transferred to the Intrepid , will we change addr in each of her tuples? Deletion anomalies: If nobody likes Bud, we lose track of Bud’s manufacturer. name addr beersLiked manf favoriteBeer Janeway Voyager Bud A.B. WickedAle Janeway ??? WickedAle Pete's ??? Spock Enterprise Bud ??? Bud

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
Winter 2002 Arthur Keller – CS 180 4–4 Each of the given FD’s is a BCNF violation: Key = { name , beersLiked } Each of the given FD’s has a left side that is a proper subset of the key. Another Example Beers(name , manf, manfAddr) . FD’s = name manf , manf manfAddr . Only key is name . Manf manfAddr violates BCNF with a left side unrelated to any key.
Winter 2002 Arthur Keller – CS 180 4–5 Decomposition to Reach BCNF Setting: relation R , given FD’s F . Suppose relation

This preview has intentionally blurred sections. Sign up to view the full version.

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

## This note was uploaded on 02/21/2011 for the course CS CS 180 taught by Professor Dr.arthur during the Fall '01 term at The University of Akron.

### Page1 / 19

slides4 - Schedule Today Jan 15(T x x Normal Forms...

This preview shows document pages 1 - 6. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online