Assignment - 3 - 1
Assignment - 3 - 1
Assignment-3
Q1.
Suppose that we decompose the schema R = (A, B, C, D, E) into:
(A, B, C)
(A, D, E).
Show that this decomposition is a lossless decomposition if the following set F of functional
dependencies holds:
ABC
CD E
B D
EA
Q2.
Compute the closure of the following set F of functional dependencies for relation schema R =
(A, B, C, D, E).
ABC
CD E
B D
EA
Q3.
In the BCNF decomposition algorithm, suppose you use a functional dependency α → β to
decompose a relation schema r(α, β, γ) into r1(α, β) and r2(α, γ).
a) What primary and foreign-key constraint do you expect to hold on the decomposed
relations?
b) Give an example of an inconsistency that can arise due to an erroneous update, if the
foreign-key constraint were not enforced on the decomposed relations above.
Q4
Give an example of a relation schema R and a set of dependencies such that R is in BCNF but is
not in 4NF.
Q5
Consider the following set F of functional dependencies on the relation schema (A, B, C, D, E,
G):
ABCD
BC DE
B D
DA
a) Compute B+.
b) Prove (using Armstrong’s axioms) that AG is a superkey.
c) Compute a canonical cover for this set of functional dependencies F; give each step
of your derivation with an explanation.
d) Give a 3NF decomposition of the given schema based on a canonical cover.
e) Give a BCNF decomposition of the given schema using the original set F of
functional dependencies.
Q6.
Consider the schema R = (A, B, C, D, E, G) and the set F of functional dependencies:
ABCD
B D
DE B
DEG AB
AC DE
R is not in BCNF for many reasons, one of which arises from the functional dependency AB →
CD. Explain why AB → CD shows that R is not in BCNF and then use the BCNF decomposition
algorithm starting with AB → CD to generate a BCNF decomposition of R. Once that is done,
determine whether your result is or is not dependency preserving, and explain your reasoning.
Q7.
Consider the following two relational schemas and sets of functional dependencies:
For each of them, decompose it into BCNF. Show all of your work and explain, at each step,
which dependency violations you are correcting. You have to turn in a description of your
decomposition steps.
Q8
A set of attributes X is called closed (with respect to a given set of functional dependencies) if
X+=X. Consider a relation with schema R(A,B,C,D) and an unknown set of functional
dependencies. For each closed attribute set below, give a set of functional dependencies that is
consistent with it.