CS122aSlides05

CS122aSlides05 - 1 ICS122A / EECS116 Introduction to Data...

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

View Full Document Right Arrow Icon

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

View Full DocumentRight Arrow Icon

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

View Full DocumentRight Arrow Icon

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

View Full DocumentRight Arrow Icon

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

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

Unformatted text preview: 1 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 ICS122A/EECS116 Notes 02 2 Announcements HWs and projects HW #1 due tonight by end-of-evening HW #2 will become available by then as well Project part 1 is available and due next week (old news) Discussion section meetings There is a discussion session meeting Friday AM Content will be HW/project Q&A plus no cost quizzes Lectures Any lingering questions about the last lecture? Today Finish E-R relational translation Cover relational algebra, part 1 ICS122A/EECS116 Notes 04 3 Relation: account(acct#,customer, balance) transaction(acct#,trans#, amount) Key of Transaction: acct#, trans# IND: transaction[acct#] account[acct#] No relation for the weak relationship set Log. Weak Entity Sets account Acct# balance trans# log transaction amount customer ICS122A/EECS116 Notes 04 4 Other relationships of the weak entity set (transaction) should use the complete key as its key Relation: ATM(id, address) Key: id use(acct#,trans#, id, time) Key: acct#, trans#, id IND: use[acct#,trans#] transaction[acct#,trans#] use[id] ATM[id] Weak Entity Sets (cont.) account Acct# balance trans# log transaction amount customer ATM use id address time ICS122A/EECS116 Notes 04 5 Aggregation Relation: using(id, pid, tid, stime) Key: id, pid, tid tools work using employees projects Id pId stime tId ICS122A/EECS116 Notes 04 6 Exercise (I) Translate the above E/R diagram to relations, using the "E/R" approach to handling ISA hierarchies. (see next slide for answer) ICS122A/EECS116 Notes 04 7 Exercise (I) - Answer E(a,b,c): A weak entity set's relation includes the keys of all supporting entity sets, c in this case. F(c,d): An ordinary enitity-set-to-relation transformation. G(a,c,e): In the E/R approach, a subclass gets the key of the root (a and c in this case), plus (just) its own attributes, which are e here. H(g,h): An ordinary enitity-set-to-relation transformation. S(a,c,f,g): A relationship's relation has the keys from all connected entity sets ({a,c} and g in this case), plus it has whatever attributes are attached to the relationship itself (f here). Note that R yields no relation, because it supports the weak entity set E. ICS122A/EECS116 Notes 04 8 Exercise II Employees Work Departments ename eid dname add r hourNum The following are the translated relational tables for the diagram....
View Full 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 / 34

CS122aSlides05 - 1 ICS122A / EECS116 Introduction to Data...

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

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