Assignment Database Fundemental
Assignment Database Fundemental
Assignment: 3
Due Date: 23st August, 2017
Instructions
This question paper contains 15 questions in 6 pages.
Q1: Consider the following relation and its functional dependencies, where the primary key is underlined.
r(A,B, C, D, E)
AB → CDE
A→C
B→D
Explanation: A determines C uniquely and B determines E uniquely, while A and B jointly uniquely identify
E. Normalizing to 2NF results in all the relations to be normalized to BCNF.
Explanation: No non-prime attribute depends on subset of candidate key, hence the relation is in 2NF.
salesperson → region creates transitive FD, separately storing the mapping of salesperson to region removes
this dependency, hence A is correct.
1
Fundamentals of Database Systems Assignment: 3
Explanation: The last functional dependency violates BCNF rule as determinant is not a super-key. To
remove this dependency, decompose the relation and set up a relation for the non-key determinant with
attributes functionally dependent on it.
Q5: A relation r(A, B, C) had multivalued dependencies among all its attributes. It was decomposed for achieving a
better database as follows:
r1(A, B)
r2(B, C)
r3(C, A)
Page 2 of 6
Fundamentals of Database Systems Assignment: 3
Explanation: It cannot be checked if an FD is a part of the scheme by examining a single instance because
in future there can be tuple(s) violating the FD whereas if in schema we found a tuple which makes the FD
wrong, the FD is violated.
Explanation: First consider the two given tuples. Try to apply the given MVDs to any pair of tuples that
have the same values for the attributes on the left side of the MVD. Each application of an MVD lets you add
two tuples to the relation: the tuples formed by swapping the values for the attributes on the right side of the
MVD. This can be done using the formal definition of an MVD. Repeat this process until all of the tuples
implied by the MVDs are already in the relation.
Explanation: To check whether a functional dependency is satisfied by R you need to take its left-hand side,
calculate the closure with respect to the original set of the functional dependencies and then check whether
the right-hand side is contained within the closure. So in the question only CEG → AB is satisfied because
closure of CEG = {C, E, G, A, B, H} and AB is in the closure.
Q9: Consider a relation R = (A, B, C, D). For which of the following sets of FDs is R in BCNF?
A. { AC → D, D → A, D → B, D → C }
B. { ABC → D, ACD → B, D → C, BCD → A }
C. { AD → C, BC → A, BD → C, CD → B }
D. { AC → B, A → D, C → A, D → B }
Page 3 of 6
Fundamentals of Database Systems Assignment: 3
Explanation: A relation is in BCNF if for every nontrivial FD, the left-side attributes contain a key. To test
whether a set of attributes S contains a key, compute the closure of the attributes in S using all of the FDs.
If the closure is all attributes of the relation, then the attributes contain a key; otherwise not. You need to go
through this process for each of the given FD set to determine if the relation is in BCNF. So, for each option,
find the candidate key and if LHS of every FD contains the candidate key then it is in BCNF.
A B C D E
a1 b1 c1 d1 e1
a2 b2 c2 d2 e2
a1 b3 c1 d1 e3
a2 b2 c3 d3 e4
a3 b3 c4 d4 e5
a2 b2 c5 d3 e6
Which of the following FDs are satisfied for the above relation instance?
(I) A → B (II) A → C (III) C → A (IV) AB → C (V) BC → A (VI) AC → B (VII) E → ABCD (VIII) D → A
A. II, III and VI only
B. III, IV, V and VII only
C. III, V, VII and VIII only
D. I and V only
Explanation: An FD is a constraint for the tuples in a relation from a database. An FD X → Y require that
the value of X uniquely determines the value of Y where X and Y are set of attributes. You need check for
each of the given FDs to determine if it is satisfied by the relation instance.
Q12: Consider a relation R(A, B, C, D). Suppose, the set of functional dependencies F over the relation R is φ except
the trivial functional dependencies. Assuming atomicity of attributes, which among the following is the highest
normal form satisfied by the relation R?
Page 4 of 6
Fundamentals of Database Systems Assignment: 3
A. 1NF
B. 2NF
C. 3NF
D. BCNF
Explanation: As for a relation to be in some normal form some constraints are imposed on FDs but since
there is no non-trivial FD hence the above relation is in highest normal form i.e BCNF.
Explanation: There exist partial functional dependencies ( (book title) → (publisher, type o f book) and
(author) → (author a f f iliation)) which violates it from being in 2NF, hence it is in 1NF (atomicity of
attributes is always assumed until specifically mentioned).
Q14: Consider a relation R with set of functional dependencies F, and another relation S with another set of functional
dependencies G. The highest normal forms of one of the relations is BCNF, while for the other, it is 3NF. It is,
however, not known which is which. To make a correct identification using a single test, which of the following
tests should be used on the relations? (Assume that the closure of F and G are available.)
A. Dependency-preservation
B. 3NF definition
C. Lossless-join
D. BCNF definition
Explanation: This is because the relation whose highest normal form is 3NF will fail the BCNF test, but
both will pass the 3NF test.
What is the average access time to read file A from disk under sequential and random I/O configuration?
Page 5 of 6
Fundamentals of Database Systems Assignment: 3
Explanation: Two important observations: 1. File A fits in a single sector therefore random and sequential
I/O time will not make difference. 2.The smallest unit that can be read is one sector. Rest of the part is trivial,
use the formula mentioned in slide to calculate the average access time.
Page 6 of 6