Professional Documents
Culture Documents
(Solutions)
1. For a database relation R (a, b, c, d) where the domains of a, b, c and d only include atomic
values, only the following functional dependency and those that can be inferred from them
hold: a c , b d
Solution: Option A
Since, it is already mentioned that a, b, c, d are atomic values, so by definition of
1NF, it can be inferred that it is already in 1NF.
But as a c
b d, the candidate key is {ab}
So, all the non-key attributes only partially depend on the prime attributes of the candidate
key(a and b). So, it is not in 2NF.
Solution: Option C
In the E-R model, all the relations produced are default in 3NF.
Solution: Option A
1
Solution: Option D
Refer the videos related to 3NF mentioned in the lectures.
Solution: Option D
BCNF satisfied all the conditions that are followed from 1NF and 2NF and is more
strict than 3NF in the sense for the FD: X Y, BCNF states X must be a candidate
key, unlike 3NF.
Next consider the following set of decompositions for the relation schema R:
D1= {R1,R2,R3,R4}: R1={M,N,O,P}, R2={M,P,Q}, R3= {N,R}, R4={R,S,T}
D2= {R1,R2,R3,R4}: R1={M,N,O}, R2= {P,Q}, R3= {N,R}, R4= {R,S,T}
Which of the above decomposition (1) has/ have lossless join property?
A. Only D1 B. Only D2 C. Both D1 and D2 D. Neither D1 nor D2
Solution: Option A
Consult the videos regarding checking of lossless join and functional dependency
preserving. Study some of the examples as well for further practice.
7. Consider the following set of functional dependency on the scheme (A, B,C)
ABC, BC, A B, ABC
Solution: Option A
Canonical cover of a set of FD’s are the minimum no. of FD’s required to cover all
2
the other remaining FD’s.
For Option B:
A BC
A C
It can cover A B but not B C (by decomposition rule)
For Option C:
A BC
A B
It cannot cover AB C or B C
For Option D:
A B
B C
By transitivity rule: A C and by
A B and A C
Union rule is: A BC
but cannot cover: AB C
But Option A cover all the FD’s:
A BC ----(i)
B C ----(ii)
(i) can be decomposed to:
A B
A C-----(iii)
(ii) and (iii) by pseudo transitive rule, it can be written as:
AB C
Solution: Option D
Consider the functional dependency: X Y.
3NF permits this dependency if Y is a primary key attribute and X is not a
candidate key. However, BCNF doesn’t permits this. It insists that X be a
candidate key.
9. The following functional dependency hold for relations R (A,B,C) and S(B,D,E):
B A, A C
The relation R contains 200 tuples and the relation contains 100 tuples. What is the maximum
3
number of tuples possible in natural join R S?
Solution: Option A
Since A is functionally dependent on B, you can derive the value of A from the
value of B. Since C is functionally dependent on A, you can derive the value of
C from the value of A. So, in essence, if you know the value of B, you will know
the values of A and C. If 2 rows of a relation R have the same value for
attribute B, the 2 rows become identical, and they have become duplicate rows.
Since, relational doesn’t store duplicate rows (in general), all the 200 tuples of
relation R are different. Since natural join is the equi join on common
attribute B, it will have maximum 100 tuples.
10. Which normal form is considered adequate for relational database design?
A. 2NF B. 3NF C. 4NF D. BCNF
Solution: Option B
3NF is considered adequate, as BCNF is just stricter form of 3NF, and 4NF
stands for multivalued dependency.
Solution: Option A
Take for ex. A realtion R (A, B) A B
For this relation: a1 b1
A A will always hold again a2 b2
AB A will always hold as well a1 b3
12. If every non-key attribute is functionally dependent on the primary key then the relation will
be in:
A. 1NF B. 2NF C. 3NF D. 4NF
Solution: Option C
A table or relation is said to be in 3NF if:
It satisfies 2NF
Every non-prime attribute in the table should depend on primary key.
The functional transitive dependency is removed from the table. This
helps in reducing data duplication and achieving data integrity.
4
Which of the following does not hold good?
A. X Z B. W Z C. X WY D. None of these
Solution: Option B
From relation:
X Y
Y Z
By IR3 (transitive rule):
XZ-----(A)
From:
X W
X Y
By IR5 (Union rule):
X W-----(C)
But option (B) does not hold under any rule.
Solution: Option D
Candidate key= S, T, U, V
Decomposition is in both 2NF and 3NF. Because S is a candidate key and there
is no partial dependency and transitive dependency held.
Solution: Option B
If closures of F and G are available, then by BCNF definition we can identify the
decomposition.
5
16. The relation schema: student_performance (name, course_number, roll_number, grade) has
the following functional dependencies:
name, course_number grade
roll_number, course_number grade
nameroll_number
roll_number name
The highest normal form of this relation schema is:
A. 2NF B. 3NF C. BCNF D. 4NF
Solution: Option B
The candidate keys are {name, course_number} and {course_number, roll_number}
Dependency 3 and 4 are transitive but they are prime, so we will break this relation
upto 3NF.
17. Relation R has attributes A, B, C, D, E, F, G, H, I and J and satisfies the following functional
dependencies:
ABD E
CJ
B G
CI I
B F
G HI
Solution: Option A
Refer the videos of finding candidate key.
18. Consider the 2 relation schema: R1= (A, B, C, D, E) and R2= (A, B, C, D, E). Statement 1 is
the FD of R1 and statement 2 is the FD of R2.
1. A B, AB C, D AC, D E
2. A BC, D AE
Solution: Option A
R1: AB
AB C
6
D AC
D E
Candidate key for R1 is AD closure of FD is :
{A B, AB C, A C, D AC, D A, D C, D E}
R2: A BC
D AE
Candidate key for R2 is AD and closure of FD is:
{AB, AC, ABC, DA, DC, DE, DAC}
Alternative approach:
Find closure of each attribute in R1 and R2 respectively. If they match then they
are equivalent else not. If both R1 and R2 contains atleast one different attribute
then they would be incomparable.
Solution: Option A
First find candidate key and refer the video and examples and then solve the
problem.
20. A relation empdtl is defined with attribute empcode(unique), name, street, city, state and
pincode. For any pincode, there is only one city and state. Also for any given street, city and
state there is just one pincode. In normalization, empdtl is a relation in:
A. 1NF
B. 2NF and hence also in 1NF
C. 3NF and hence also in 2NF and 1NF
D. BCNF and hence also in 3NF, 2NF and 1NF
Solution: Option A
From the given relations, the following FD’s can be inferred:
Pincode city state
City state street pincode
Key for relation is thus {empcode, name, pincode, street}
Therefore, Prime attribute= {empcode, name, pincode, street}
Now the Fd’s :
Pincode city state} 1NF
City state street pincode 1NF