

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Material Type: Assignment; Class: Database Systems I; Subject: Computer Science; University: University of California-Santa Cruz; Term: Fall 2003;
Typology: Assignments
1 / 2
This page cannot be seen from the preview
Don't miss anything!


Instructions : Answer all the questions concisely below. Points will be taken off for unnecessarily long answers. Please remember to include your name, student-id number, and email address in your homework submission.
The relation Invoices contains for each invoice, the id of the customer who made that invoice and the date that invoice was made. The customer name, the date the customer made her first purchase, and the zipcode where the customer resides is stored in the Customers relation. Each invoice contains one or more purchased items. For every item purchased in an invoice, the quantity and price of that item are also stored in the Items relation. Write the following queries in relational algebra. Use only the relational operators taught in class so far. If your relational algebra expression is huge, please break it down into smaller parts and explain each part.
T (B, E, A, B), where (A, B) is a foreign key that references S. What are the keys of the result of each query below? Provide only the smallest set of attributes that form the key. Note that the keys you specify must hold for the query evaluated on every possible instances of R, S, and T.