CS122aSlides16

CS122aSlides16 - ICS122A / EECS116 Introduction to Data...

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

View Full Document Right Arrow Icon
ICS122A / EECS116 Introduction to Data Management Spring 2009 Prof. Mike Carey Bren School of ICS UC Irvine Slides based on previous CS122a lecture notes as well as  material borrowed from U-Wisconsin, Stanford, & Berkeley
Background image of page 1

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

View Full DocumentRight Arrow Icon
CS122A/EECS116 Notes 16 2 Announcements Homework and project notes Project Part 4 is available to start on HW #6 is due this Wednesday night (not Tuesday) HW #7 will be due a week from Friday night Buying time to include some of everything in it This week: Relational database design theory Note: The book goes a bit overboard on the theory side here – we’ll focus more of our attention on the parts that you’d actually end up using if you were to decide to “do databases for dollars” someday Any lingering questions or concerns first…?
Background image of page 2
Normalization Goal: Come up with a “good” relational schema for a given database – but how ? Certain collections of relations have better properties than others when… Data may be updated as well as queried, and/or Space (on disk) matters Approach: Consider functional dependencies and apply normalization theory to arrive at a “good” schema design CS122A/EECS116 Notes 16 3
Background image of page 3

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

View Full DocumentRight Arrow Icon
An Example Consider a student sailing club database with information about sailors, boats, and reservations   Res(sid , sname, bid , bname, bcolor, date ) CS122A/EECS116 Notes 16 4 sid sname bid bname bcolor date 1 Fred 13 Windsurfer red 4/13 1 Fred 18 Interlake blue 6/22 2 Joe 18 Interlake blue 7/17 2 Joe 16 M20 green 5/5 3 Mark 17 Windsurfer green 5/9 4 Bart 13 Windsurfer red 4/14
Background image of page 4
An Example ( cont.) This design has a number of “issues”: 1. Can’t have entries in the table without (sid, bid, date) attribute values all being present, so… 2. Can’t insert a sailor without a boat reservation 3. Can’t insert a boat without a sailor reserving it CS122A/EECS116 Notes 16 5 sid sname bid bname bcolor date 1 Fred 13 Windsurfer red 4/13 1 Fred 18 Interlake blue 6/22 2 Joe 18 Interlake blue 7/17 2 Joe 16 M20 green 5/5 3 Mark 17 Windsurfer green 5/9 4 Bart 13 Windsurfer red 4/14
Background image of page 5

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

View Full DocumentRight Arrow Icon
An Example ( cont.) 1. Can’t delete a reservation without fear of losing track of a sailor and/or boat Ex: Delete (3, 17, 5/9) or (2, 16, 5/5) 1. Can’t update an entry without worrying about updating a number of (redundant!) copies
Background image of page 6
Image of page 7
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 06/18/2009 for the course CS 122a taught by Professor Carey during the Spring '09 term at UC Irvine.

Page1 / 21

CS122aSlides16 - ICS122A / EECS116 Introduction to Data...

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

View Full Document Right Arrow Icon
Ask a homework question - tutors are online