This preview shows pages 1–2. Sign up to view the full content.
This preview has intentionally blurred sections. Sign up to view the full version.View Full Document
Unformatted text preview: <CS 186, MIDTERM, FALL 1994> file:///C:/Documents%20and%20Settings/Jason%20Raftery/Desktop/R... 1 of 3 5/12/2006 8:36 PM CS 186 MIDTERM FALL 1994 There are 9 questions to this exam. All count equally. Queries expressed in relational algebra and relational calculus must follow the syntax used in class. Queries expreseed in SQL must follow the syntax used in class or in the INGRES Manual. All SQL queries should contain NO duplicates in their outputs. It is not necessary to sort the outputs in any order. You are not allowed to use views for any questions expect question 7. Use the following relational database schema for all the questions except question 1: DEPT (dname, location) STUDENT (name, regno, gpa, level, dept) COURSE (cno, cname, dept) TAKE (regno, cno) None of the columns can have null values. Problem #1 Suppose there are two relations A (a1, a2, a3) and B (b1, b2, b3). A has two candidate keys and its primary key is (a1, a2). B has only one candidate key and its primary key is (b2, b3). How many candidate keys willkey is (a1, a2)....
View Full Document
This note was uploaded on 05/17/2009 for the course CS 186 taught by Professor Staff during the Spring '08 term at University of California, Berkeley.
- Spring '08
- Computer Science