0% found this document useful (0 votes)
9 views4 pages

TD11 Normalforms Sols

Onze

Uploaded by

loubna93600
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views4 pages

TD11 Normalforms Sols

Onze

Uploaded by

loubna93600
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

Bases de Données Fall, 2022

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

Show that AF is a superkey.


Solution. We have
A → BCD ( given )
A → ABCD ( aumentation with 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

Is this in BCNF? If not, then derive a new database that is in BCNF.


Solution. It is not in BCNF because A → BCD and yet A is not a superkey of the table since cannot
derive F from 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.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy