TD11 Normalforms Sols
TD11 Normalforms Sols
TD 11
1. Compute the closure of the following set of functional dependencies for a relation schema r(A, B, C, D, E).
1. A → B C
2. CD → E
3. B → D
4. E → A
Solution. There are many trivial or easy ones (from subset/superset combinations), but the main
ones are the following:
(a) A → B (decomposition)
(b) A → C (decomposition)
(c) A → D (transitivity of 1. and 3.)
(d) E → B C (transitivity of 4. and 1.)
(e) E → B (decomposition)
(f) E → C (decomposition)
(g) E → D (transitivity)
(h) CD → A (transitivity of 2. and 4.)
(i) CD → BC (transitivity)
(j) CD → B (decomposition)
(k) A → E (transitivity of 1., 2. and 3.)
2. Consider the following set F of dependencies on r(A, B, C, D, E, F).
A → BCD
BC → DE
B → D
D → A
Compute B + .
Solution. We have
B → BD
BD → ABD
ABD → ABCD
ABCD → ABCDE
Thus B + = ABCDE.
3. Consider the following set F of dependencies on r(A, B, C, D, E, F).
A → BCD
BC → DE
B → D
D → A
BC → DE ( given )
ABCD → ABCDE ( aumentation with ABCD )
A → ABCDE ( transitivity )
AF → ABCDEF ( augmentation with F )
4. Consider the following set F of dependencies on r(A, B, C, D, E, F).
A → BCD
BC → DE
B → D
D → A
(a) Breaking the table into two tables using the dependency A → BCD, we get
s (A , E , F )
t (A , B , C , D )
(b) Note that A → E follows by combining the first and second original dependencies. Thus we
have the split s(A, E, F) again to get
u (A , E )
v (A , F )
t (A , B , C , D )
(c) We are done: the table t is in BCNF, as F implies that A, B and D are all candidate keys, and
D does not fix any other variable.