0% found this document useful (0 votes)
32 views

Database Management System Weekly Test 01 Test Paper

Yhu

Uploaded by

nick peak
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
32 views

Database Management System Weekly Test 01 Test Paper

Yhu

Uploaded by

nick peak
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

1

DS & AI (Hinglish)

WEEKLY TEST – 01
Subject : Database Management System
Topic : Introduction of DBMS and FD's
and Normalization Maximum Marks 15

Q.1 to 5 Carry ONE Mark Each


[NAT]
1. From the given below characteristics, choose the [MCQ]
number of characteristics of a primary key: 3. The candidate key other than primary key is called an
I. Minimal attribute _____.
II. Unique (a) Super key (b) Foreign key
III. Non-Null (c) Alternate key (d) None
IV. Null
V. Duplicate values [MCQ]
4. Choose the correct statement from the following
regarding a composite key:
[MSQ]
(a) Any key such as primary key, candidate key can
2. Choose the correct statement from the following. be called composite key if it has more than one
(a) A functional dependency X →Y is trivial attribute.
functional dependency if y is a subset of x. (b) A super key can be called as a composite key if it
has more than one attribute.
(b) A functional dependency X → Y is trivial
(c) A key that has more than one attribute is known
functional dependency if y is a proper superset
as composite key.
of X.
(d) All the statement are true.
(c) A functional dependency X → Y is called non-
trivial functional dependency if Y is not a subset [MSQ]
of X. 5. Given a relation R (X, Y, Z, W, U, V) with (X, Z) and
(d) A functional dependency X → Y is called non- {W, U, V} as the only candidate keys, then choose the
trivial functional dependency if Y is proper super keys for the given relation.
subset of X. (a) {X, Z} (b) {X, Z, U}
(c) {X, Y} (d) {W, U, V}

Q.6 to 10 Carry TWO Mark Each

[NAT]
6. Given the following FD set over a relation R(A, B, C,
D, E, F, G, H, I)
{A→ DE, D → BCE, B → AFI, AH → GI}
The number of non-prime attributes for the above FD
set is/are?
2

[MCQ] 9. Consider a relation R(P, Q, R, S, T) and the set of


7. Consider a relation R(P, Q, R, S, T, U) with the functional dependency set {P → ST, S → Q, and
following functional dependencies: T → R} if we project R (and therefore its FD sets onto
PQ → R, S → TU, R → P, QT → R, QR → S, schema R1 (P, Q, R). Then choose the correct option in
RU → QS, PRS → Q, RT → PU the following?
Which of the following is/are true? (a) Only PQR is a key
(a) The closure of QR is {P S T U} (b) Only P is key
(b) All attributes present in R are in the closure of QR (c) Only ST is a key
(c) QR is the only candidate key of R (d) None of the above
(d) PQR is a key of R
[MSQ]
[NAT] 10. Consider relation R(P, Q, R, S, T, U) with following
8. Find the number of candidate keys possible for the functional dependencies:
given functional dependency set on relation (a) P → Q (b) RS → T
R (p, q, r, s, t, u, v) (c) T → P (d) Q → S
{p → qr, r → st, s → quvp} How many candidate keys does R have?_____.

[MCQ]
3

Answer Key
1. (3) 6. (5)
2. (a, c) 7. (b)
3. (c) 8. (3)
4. (d) 9. (b)
5. (a, b, d) 10. (4)
4

Hints and Solutions

1. (3) combination of candidate key + other non-prime


A primary key is a minimal set of attributes, that attributes.
uniquely identify a tuple in a relation So super keys are {X, Y}, {W, U, V}, and {X, Z, U}.
A primary key is minimal, unique and allows no null
values
6. (5)
2. (a, c) There exists 3 candidate keys for the given FD set:
A+ = {A, D, E, B, C, F, I}  not candidate key
A trivial functional dependency is of the form X → Y
AH+ = {A, D, E, B, C, F, I, H, G} ✓ candidate key
where Y  X
A non-trivial functional dependency is of the form BH+ = {B, A, F, I, D, E, H, G, C} ✓ candidate key
X → Y where Y  X =  or Y  X. DH+ = {D, H, B, C, E, A, F, I, G} ✓ candidate key
Prime attribute = {A, B, D, H} = 4
3. (c) So, non-prime attributes are 9 – 4 = 5.
The candidate key other than the primary key is called
an alternate key.
7. (b)
Example:
(a) False, the closure of QR contains all the attributes.
EMP_ID as well as EMP_PHNO both are candidate
key for relation student but EMP_PHNO will be an (b) True, since QR+ contains all the attributes.
alternate key. Therefore, it is candidate key of R.
(c) False, PQ is also a candidate key.
4. (d) (d) False, since PQ is candidate key of R.
Any key such as a primary key, candidate key, or super Therefore, PQR is super key of R.
key can be called composite key if it has more than one
attribute. 8. (3)
5. (a, b, d) Candidate key’s p+ = {p, q, r, s, t, u, v}
Every candidate key is a super key s+ = {s, q, u, v, p, r, t}
r+ = {r, s, t, q, u, v, p}
qtuv+ = {q, t, u, v} 
Only 3 candidate key’s possible.

9. (b)
P is not present in RHS of any FD. So P must be the
part of a candidate key. So we check/validate it from
taking closure of P(P+).
P+ = {P, Q, R, S, T}
As already mentioned in the question, there exists Closure of P contain all the attributes of the relation
only 2 candidate keys for the given relation i.e. {X, Z} thus P is the only key
and {WUV}, then the super keys will be a Hence option (b) is correct.
5

10. (4) (Q R U)+ = {P, Q, R, S, T U}


P→Q (S R U)+ = {P, Q, R, S, T U}
RS → T (T R U)+ = {P, Q, R, S, T U}
T→P Hence there are 4 candidate keys
Q→S
(P R U)+ = {P, Q, R, S, T U}

For more questions, kindly visit the library section: Link for web: https://smart.link/sdfez8ejd80if

PW Mobile APP: https://smart.link/7wwosivoicgd4

You might also like