DBI202
DBI202
Solution:
Ex 3.2.1:
a) Nontrivial FDs that follow from the given FDs with single attributes on the right side:
AB → C (given)
C → D (given)
D → A (given)
ABC → D (by transitivity from AB → C and C → D)
BD → A (by transitivity from D → A and C → D)
ABD → C (by augmentation from AB → C)
b) Keys of R: The keys of a relation are the minimal superkeys that uniquely identify each tuple. To find
the keys, we need to find the candidate keys first.
Candidate keys:
AB
BC
c) Superkeys of R that are not keys: Superkeys are the supersets of keys that uniquely identify each tuple.
From the keys found in part (b), the superkeys that are not keys are:
ABCD
ABC
ABD
BCD
Ex 3.2.2:
A → B (given)
B → C (given)
B → D (given)
AB → C (by augmentation from B → C)
AB → D (by augmentation from B → D)
A → D (by transitivity from A → B and B → D)
A
ABCD
ABC
ABD
BD
AB → C (given)
BC → D (given)
CD → A (given)
AD → B (given)
ABC → D (by transitivity from AB → C and BC → D)
BCD → A (by transitivity from BC → D and CD → A)
ABD → B (by transitivity from AB → C, BC → D, and CD → A)
b) Keys of T: Candidate keys:
ABC
BCD
ABCD
A → B (given)
B → C (given)
C → D (given)
D → A (given)
AB → C (by augmentation from B → C)
AC → D (by transitivity from A → B and B → C)
BC → A (by transitivity from B → C and C → D)
BD → A (by augmentation from D → A)
ABC → D (by transitivity from AB → C and AC → D)
ABD → C (by augmentation from AB → C)
ABC
BCD
ABCD
ABD
ACD
BCD (note that BCD is both a key and a superkey)
Ex 3.2.10
a) AB → DE, C → E, D → C, and E → A.
In the projected relation S(A, B, C), the FDs that hold are:
b) A → D, BD → E, AC → E, and DE → B.
In the projected relation S(A, B, C), the FDs that hold are:
Minimal basis: {A → B}
c) AB → D, AC → E, BC → D, D → A, and E → B.
In the projected relation S(A, B, C), the FDs that hold are:
d) A → B, B → C, C → D, D → E, and E → A.
In the projected relation S(A, B, C), the FDs that hold are:
A → B (given)
B → C (given)
A → C (derived from A → B and B → C)
Minimal basis: {A → B, B → C}