Spring05Midterm1

Spring05Midterm1 - CSCI 485 Midterm 1 March 1 2005 Warm...

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

View Full Document Right Arrow Icon
CSCI 485 Midterm 1 March 1, 2005 Warm up (5 points) 1. (5 points) Write your name and student-id on your blue book. Logical data design (10 points) 2. (10 points) The following ER diagram shows a person must have at most one spouse. Reduce this ER diagram to minimal number of tables. Structured Query Language, SQL (30 points) 3. Recall tables that describe sailors who reserve boats at different times: Sailors (sid, sname, rating) Boats (bid, color, bname) Reserve (sid, bid, date) a. (10 points) Write the SQL command to delete those sailors with a rating below average. b. (10 points) Write the SQL command to retrieve the name of those sailors with the maximum rating. c. (10 points) For each red boat, retrieve its id and the average rating of sailors who have reserved this boat. Relational algebra (30 points) 4. (15 points) Using the tables specified for Question number 3, write the algebraic expression to retrieve id of those sailors who have reserved both a red and a green colored boat. 5.
Background image of page 1

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

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

This note was uploaded on 01/11/2009 for the course CSCI 485 taught by Professor Ghandeharizadeh during the Fall '08 term at USC.

Page1 / 2

Spring05Midterm1 - CSCI 485 Midterm 1 March 1 2005 Warm...

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

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