{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

# norm - 1 Normalization Anomalies Boyce-Codd Normal Form 3...

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

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

View Full Document

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

View Full Document

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.

Unformatted text preview: 1 Normalization Anomalies Boyce-Codd Normal Form 3 rd Normal Form 2 Anomalies ◆ Goal of relational schema design is to avoid anomalies and redundancy. ◗ Update anomaly : one occurrence of a fact is changed, but not all occurrences. ◗ Deletion anomaly : valid fact is lost when a tuple is deleted. 3 Example of Bad Design Drinkers(name , addr, beersLiked , manf, favBeer) name addr beersLiked manf favBeer Janeway Voyager Bud A.B. WickedAle Janeway ??? WickedAle Pete’s ??? Spock Enterprise Bud ??? Bud Data is redundant, because each of the ???’s can be figured out by using the FD’s name -> addr favBeer and beersLiked -> manf. 4 This Bad Design Also Exhibits Anomalies name addr beersLiked manf favBeer Janeway Voyager Bud A.B. WickedAle Janeway Voyager WickedAle Pete’s WickedAle Spock Enterprise Bud A.B. Bud • Update anomaly: if Janeway is transferred to Intrepid , will we remember to change each of her tuples? • Deletion anomaly: If nobody likes Bud, we lose track of the fact that Anheuser-Busch manufactures Bud. 5 Boyce-Codd Normal Form ◆ We say a relation R is in BCNF if whenever X -> A is a nontrivial FD that holds in R , X is a superkey. ◗ Remember: nontrivial means A is not a member of set X . ◗ Remember, a superkey is any superset of a key (not necessarily a proper superset). 6 Example ◆ Drinkers(name , addr, beersLiked , manf, favBeer) ◆ FD’s: name->addr favBeer, beersLiked->manf...
View Full Document

{[ snackBarMessage ]}

### Page1 / 21

norm - 1 Normalization Anomalies Boyce-Codd Normal Form 3...

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

View Full Document
Ask a homework question - tutors are online