You are on page 1of 3

IS-201 (Fundamental Database Management System)

Assignment-III
I. Consider the following relational schema and functional dependencies.
movie ( movieName, whenMade, starName, age, address)
F {movieName whenMade
starName age
starName address
movieName, starName whenMade, age}
Try to answer the following questions.
a. Are there any trivial FDs?
b. Can we transitively determine any FDs?
c. What is the closure of the left hand side of each FD?
d. Are there any BCNF violating FDs?
e. What are the BCNF decompositions for this relation?

II. Consider the following relational schema and functional dependencies.


R (A, B, C, D, E)
F {A B,
B E,
C D}
Try to answer the following questions.
a. Are there any trivial FDs?
b. Can we transitively determine any FDs?
c. What is the closure of the left hand side of each FD?
d. Are there any 3NF violating FDs?
e. What are the 3NF decompositions for this relation?
Answer

I. (a) No, there are no trivial functional dependencies because none of the attributes on
the right side of the FDs are subset of the attributes on the left side.

(b) No, not directly.

(c) movieName+ = {movieName, whenMade}


starName+ = {age, address, starName}
movieName, starName+ = {movieName, starName, age, address, whenMade}

(d) movieName  whenMade


Violates BCNF since it is non-trivial and the lefthand side is not a key.

starName  age
Violates BCNF since it is non-trivial and the lefthand side is not a key.

starName  address
Violets BCNF since it is non-tivial and the lefthand side is not a key.

movieName, starName  whenMade, age


The lefthand side together from a superkey because they can uniquely identify
tuples. The lefthand side is a key, so it doesn’t violate BCNF.

(e) The BCNF decomposition for the Movie relation is

Firstly, I would like to decompose using movieName  whenMade. I also


would like to project out the attributes involved in the violating FD to obtain the
relations
Movie(movieName, whenMade)
Rest(movieName, starName, age, address)

Secondly, I would like to work on the other FDs with the Rest relations starName
 age, address. The left-hand side of this FD is not a key, so I decompose Rest
further to obtain
Star(starName, age, address)
Rest(movieName, starName)

Finally, we have no more violating FDs so I am done. So the final solution of the
decomposition of Movie relation is

Movie(movieName, whenMade)
Star(starName, age, address)
Rest(movieName, starName)

II. (a) No, there are no trivial functional dependencies because none of the attributes on
the right side of the FDs are subsets of the attributes on the left side.

(b) No, there are no transitive functional dependencies that can be derived from the
given FDs.

(c) A+: {A, B, E}


B+: {B, E}
C+: {C, D}

(d) To check 3NF violations, I have to check if there are any partial dependencies or
not and whether it is transitive dependencies or not. Since there is no information
given about candidate keys, I would like consider {A} and {C} as candidate keys. I
would like to explain why {B} is not considered as candidate key because of answer
(a).

A  B (A is candidate key, and B depends on A partially)


C  D (C is candidate key, and D depends on C partially)

Therefore, both A  B and C  D violate the 3NF.

(e) the 3NF decompositions for this relation is


I would like to remove partial dependencies to be 3NF decomposition.

R1(A, B)
This relation includes attributes dependent on candidate key A.

R2(C,D)
This relation includes attributes dependent on candidate key C.

R3(B,E)
This relation includes attributes dependent on non-key attribute B.

So, by eliminating the partial dependencies and ensure that each relation satisfies the
3NF conditions.

You might also like