Data management I, Autumn 1999, Exercise 10 (7.-9.12.)

The minimum requirement for active attendance: 4 tasks done

This is the last set of tasks for the exercises. On next Monday we have no exercise sessions (Independence Day); temporary participation in the other groups is allowed. The last lectures will be given on Tuesday and Thursday.

The 2nd exam will be held according to the schedule indicated: Wednesday, Dec. 15, 12:00 to 15:00 in Porthania II. Requirements will be expressed on the English course page by Dec. 10th (practically the contents of exercises 6-10 and the material treated after the first exam).


1.  Consider the following relation of schema ABCD: r = {(2,2,5,6),
(4,2,5,5), (6,3,4,4)}.  Which of the following claims hold true?

a) r |= A -> BCD.       b) r |= B -> C.     c) r |= BC -> D.
d) r |= D -> ABC.

2.  Consider the following relation of schema ABC: r = {(1,2,3),
(1,2,5), (6,2,3)}.  What functional dependencies hold in r?

3.  Give an SQL query that determines whether or not the functional
dependency BCD -> A holds in r. 

4.  What functional dependencies would you set on the relation schema

TEACHING(Lecturer, Position, Office, Phone, Course, DayOfWeek, Hour,
Room)?

5.  Give an algorithm that determines a key for a relation schema R with
dependency set F.  Apply your algorithm to the schema R = ABCD and the
dependency set F = {AB -> CD, BC -> AD, A -> B}.  Hint: You may use the
algorithm that computes the closure for a set of attributes X (see page
405 in E&N2, page 481 in E&N3).

6. A relation SCHEDULE(Train, DepStation, DepTime, ArrStation, Arrtime)
holds the data for daily train schedules so that one row (tuple) gives
the departure and arrival data for one station to the next. The schema
contains the following functional dependencies:

Train DepStation -> DepTime ArrStation
Train DepTime -> DepStation
Train ArrStation -> ArrTime DepStation
Train ArrTime -> ArrStation

a) Give one minimal cover for this dependency set.
b) What are the keys of the schema?
c) Is the schema in Boyce-Codd normal form (BCNF)?

7. Fill in the form of teaching evaluation:
a href=http://www.cs.helsinki.fi/kurssit/kyselyt/syksy_1999/