Databases Reference

In-Depth Information

5.2

Define as precisely as you can what it means for a relvar to be subject to a functional dependency.

5.3

Consider the following FDs:

a.

{ CITY }
→
{ STATUS }

b.

{ SNO , CITY }
→
{ STATUS }

c.

{ SNO }
→
{ SNO }

d.

{ SNO , CITY }
→
{ SNO }

e.

{ SNO }
→
{ SNO , CITY }

f.

{ SNAME , SNO }
→
{ STATUS , CITY }

g.

{ SNO }
→
{ STATUS }

h.

{ SNAME }
→
{ STATUS , SNO }

Which of these FDs are trivial? Which ones are satisfied by the current value of relvar S as given in Fig. 1.1?

Which hold in relvar S? Which are irreducible with respect to relvar S?

5.4 Prove Heath's Theorem. Prove also that the converse of that theorem isn't valid.
Note:
In this connection,

see also Exercise 11.3 in Chapter 11.

5.5

What exactly does it mean to say an FD is implied by a superkey? Or a key?

5.6 Here's a predicate: On day
d
during period
p
, student
s
is attending lesson
l
, which is being taught by teacher

t
in classroom
c
(where
d
is a day of the week—Monday to Friday—and
p
is a period—1 to 8—within the day).

Lessons are one period in duration and have a lesson identifier
l
that's unique with respect to all lessons taught in the

week. Design a set of BCNF relvars for this database. What are the keys?

5.7 Design a database for the following. The entities to be represented are employees and programmers. Every

programmer is an employee, but some employees aren't programmers. Employees have an employee number,

name, and salary. Programmers have a (single) programming language skill. What difference would it make if

programmers could have an arbitrary number of such skills?

5.8 The definition of
key
given in the body of the chapter is somewhat different in form from the definition given

in Chapter 4. Are those definitions logically equivalent?