Computer Science 186 - Spring 1995 - Wang - Midterm

Computer Science 186 - Spring 1995 - Wang - Midterm - CS...

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

View Full Document Right Arrow Icon
CS 186, Midterm, Spring 1995 file:///C:/Documents%20and%20Settings/Jason%20Raftery/Desktop/R. .. 1 of 3 5/12/2006 8:25 PM CS 186, Spring 1995 Midterm Professor Wang There are a total of 8 questions. Credits for each question are indicated in brackets. There are a total of 45 points. Queries expressed in relational algebra and relational calculus must follow the syntax used in class. Queries expressed in SQL must follow the syntax used in class or in the INGRES Manual. All SQL queries should contain NO duplicated in their outputs. It is not necessary to sort the outputs in any order. You are NOT allowed to use views for any questions Problem #1 (1) [5] Given a relation with 3 attributes, at most how many candidate keys can it have at any given time? At least how many candidate keys does it have? Please state your reasoning in support of your answer. Problem #2 (2) Consider the following relational database schema: 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 #2a
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 05/17/2009 for the course CS 186 taught by Professor Staff during the Spring '08 term at University of California, Berkeley.

Page1 / 3

Computer Science 186 - Spring 1995 - Wang - Midterm - CS...

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