Alan K.
Dippel
CSC 570/671
October 26,1998
Professor: Fred Sadri
Department of Mathematical Sciences
University of North Carolina at Greensboro
Assignment 4
http://www.cs.indiana.edu/~adippel/csc671/assignment4.htm
Question 1 (20%)
Given the FDs
and
,
use Armstrong's axioms to derive
.
Question 2 (10%)
Let
be the relation scheme, and
hold in R. Write
(the
closure of
. Indicate which FD's are
trivial. Use the attribute closure algorithm to calculate
. Show
your work.
![]()
Trivial FDs based on reflexity
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
, ![]()
Nontrivial FDs based on the following nontrivial attribute closures.
![]()
![]()
![]()
![]()
given,
,
,
,
,
,
given,
,
,
,
,
,
, ![]()
![]()
Question 3 (20%)
Consider the relation scheme
, with the
following functional dependencies:
In order to have a candidate key the following must be true. K is the set of attributes.
![]()
![]()
Possible candidates are ,
trivial
union with 1
union with 3
union with 2 on second pass
trivial
union with 4
union with 1 second pass
union with 3 on second pass
trivial
union with 2
union with 4
union with 1 second pass
trivial
union with 3, no more attributes in
closure.
The candidate keys of R are
.
The key
is not a candidate, because
a subset of
is a candidate key
Question 4 (20%)
(a) Is it possible to have a relation (instance) on the scheme
that satisfies the FDs
and
but violates the FD
? If it is possible, then
write down such a relation with the fewest number of tuples possible. If it is not
possible then prove (justify, argue) why it is not possible.
Since
is an FD that can be derived from the given FDs, it is not
possible for an instance of R to not satisfy
.
(b) Is it possible to have a relation (instance) on the scheme
that satisfies the FDs
and
but violates the FD
? If it is possible, then
write down such a relation with the fewest number of tuples possible. If it is not
possible then prove (justify, argue) why it is not possible.
![]()
![]()
satisfies
and both
and
satisfy
, but
and
violate
, therefore it is possible.
Note: In the above questions, if an instance exists, then it is possible to find
one with only two tuples.
Question 5 (20%)
Find a canonical (or minimal) cover for the following set of functional dependencies.
![]()
![]()
![]()
![]()
The Canonical cover is as follows:
![]()
![]()
![]()
![]()