NEW YORK UNIVERSITY
COMPUTER SCIENCES DEPARTMENT

MIDTERM EXAM - PRACTICE QUESTIONS
G22.2433-001 (Database Systems) Spring 2000
Instructor: Viswanath Poosala


These are a few questions to practice your SQL and functional dependency algorithms. Of course, the midterm will have more than just these, but I don't think you need practice questions for them -- just study the text book.

  1. Assume that we have an employee-project schema with the following relations: (Keys are in all capitals.)

  2.   Other constraints:
  3. Compute the closure of the following set F of functional dependencies for relation schema R = (A,B,C,D,E).

  4. Starting with A->BC, we can conclude A->B, A->C.
    Applying various rules:
    A->B, B->D  -----> A->D
    A->CD, CD->E ----> A->E
    so: A->ABCDE
    E->A ----> E -> ABCDE
    CD-> -----> CD -> ABCDE
    B->D, BC->CD ----> BC->ABCDE
    ...

    Candidate keys: A, BC, CD, E.
    Closure of a candidate key is R itself.