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

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

View Full Document Right Arrow Icon
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.
Background image of page 1

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

View Full DocumentRight Arrow Icon
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.
Background image of page 2
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
Background image of page 3

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

View Full DocumentRight Arrow Icon
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.
Background image of page 4
Winter 2002 Arthur Keller – CS 180 4–5 Decomposition to Reach BCNF Setting: relation R , given FD’s F . Suppose relation
Background image of page 5

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

View Full DocumentRight Arrow Icon
Image of page 6
This is the end of the preview. Sign up to access the rest of the document.

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 Right Arrow Icon
Ask a homework question - tutors are online