FexamF03Solutions - CSE 412/598 Database Management Systems...

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

View Full Document Right Arrow Icon
CSE 412/598 Database Management Systems Final Exam Spring 2003 NAME_________________________ASUID____________________ CLASS_____________ [24 pts.] 1. Use the relational schema below to develop solutions to the queries on the following pages. The ER diagram that was used to derive the relational schema is provided to assist in understanding the meaning of the relational schema. . bank b-name b-code location s_account_no 1 n 1 n 1 branch has_branch br-code savings checking savings accounts checking accounts c_account_no customers balance balance has_savings has_checking n n n 1 1 Bank(b-code , b-name) Branch(b-code, br-code , location) Savings(b-code, br-code, s-account-no , balance, ssn) Checking(b-code, br-code, c-account-no , balance, ssn) Customers(ssn , name, addr) 1
Background image of page 1

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

View Full DocumentRight Arrow Icon
1. (continued) [6 pts.] a. Write a TRC solution for the following query: QUERY: Print the name and address of customers that have more than one savings accounts at the Tempe branch of Wells Fargo Bank ("Tempe" is the branch location name). { c.name, c.address | Customers(c) and exists( S1, S2, Br, B) (Savings(S1) and S1.ssn = c.ssn and Savings(S2) and S2.ssn=c.ssn and Branch(Br) and Br.Location = ‘Tempe’ and Branch(B) and b.bname=’Wells Fargo Bank’ and S1.s_account_no < > S2.s_account_no and B.b_code = S1.b_code and B.b_code = S2.b_code and S1.br_code = BR.br_code and S2.br_code = BR.br_code)}; [6 pts.] b. Write a DRC solution for the same query as in part (a). {CName, CAddr | exists Cssn (Customer( Cssn, CName, CAddr ) and
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 05/12/2010 for the course CSE 41412 taught by Professor Hassan during the Fall '10 term at University of Arizona- Tucson.

Page1 / 8

FexamF03Solutions - CSE 412/598 Database Management Systems...

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

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