GATE_DPP 1
GATE
Computer Science & Information Technology
Database Management System DPP: 1
Relational model and Normal forms
Q1 Consider the student relation shown below with (A) The cardinality is defined as the number of
schema stud (Sname, Sage, Smail, Smarks), attributes in a relation.
Stud (B) Degree of the relation is the number of tuples
Sname Sage Smail Smarks in the relation.
Rohit 28 [email protected] 68 (C) Relation instance is the set of tuples of a
Kanika 25 [email protected] 75 relation at a particular instance of time.
(D) All of the above
Pankaj 25
[email protected] 75
Rohit 28
[email protected] 88 Q6 Choose the correct statements from the
Anjali 26
[email protected] 75 following:
For the above given instance how many set of (A) There can be many primary keys for a
attributes of size two can determine each row relation.
uniquely? (B) There can be many alternate keys for a
relation.
Q2 Consider a relation schema R(A, B, C, D, E, F, H)
(C) All the candidate keys are also super keys.
with the given Functional dependency set:
(D) All the super keys are also the candidate keys.
{A → BC, C → AD, DE → F, C → F}
The attribute closure that contains all the Q7 Consider the following statements:
attributes of the relation R is? S1: A key in DBMS is an attribute (or a set of
(A) AE+ attributes) that helps in uniquely identifying each
(B) CE+ tuple (or row) in a relation (or table).
(C) AEH+ S2: There should be only one candidate key in
(D) All of the above relation, which is chosen as the primary key.
(A) Only S1 is true.
Q3 Consider the following set of FD’s:
(B) Only S2 is true.
{V → W, W → XZ, X → YZ} for relation
(C) Both S1 and S2 are true.
R(V, W, X, Y, Z)
(D) Neither S1 nor S2 is true.
Then the attribute closure of YZ+ contains how
many elements? Q8 Consider the following statements:
(A) 0 (B) 1 S1: Primary key has no duplicate values it has
(C) 2 (D) 3 only unique values.
S2: Primary key is not necessarily formed using
Q4 For the given FD set: {P → QT, Q → SU, V → U} of
a single column of the table, more than one
a relation R(P, Q, T, S, U, V). Find the set of
column of the table can also be used to form a
attributes that is Super key but not a Candidate
primary key of the table.
key?
(A) Only S1 is true.
(A) PTQ (B) PV
(B) Only S2 is true.
(C) PQV (D) QV
(C) Both S1 & S2 are true.
Q5 Choose the correct statement from the following. (D) Neither S1 nor S2 are true.
Android App | iOS App | PW Website
1 of 4 17/10/24, 15:29
GATE_DPP 1
GATE
Q9 Assume a relation R (P, Q, R, S, T). If PR and RT are Q10 Assume a relation R (P, Q, R, S, T, U, V).
the only candidate keys of the relation R, then If PQ, RS, and TU are the only three candidate
how many total super keys exist in relation R. keys of relation R, then how many total super
keys exist in relation R?
Android App | iOS App | PW Website
2 of 4 17/10/24, 15:29
GATE_DPP 1
GATE
Answer Key
Q1 1 Q6 (B, C)
Q2 (C) Q7 (A)
Q3 (C) Q8 (C)
Q4 (C) Q9 12
Q5 (C) Q10 74
Android App | iOS App | PW Website
3 of 4 17/10/24, 15:29
GATE_DPP 1
GATE
Hints & Solutions
Q1 Text Solution: I. There exists exactly at most one primary key
We can clearly observe that none of the attribute for any relational table while there can be
can determine a tuple uniquely (Single attribute), multiple alternate keys for a relation.
if we check for 2-attribute set then only (Sname, II. All the candidate keys are super keys, but it is
Smarks) not compulsory that all super key are candidate
can determine a row uniquely for the instance. keys.
So, the answer is 1. NOTE: A candidate key is minimal set of
attributes that determine relational table
Q2 Text Solution:
uniquely. Also, every candidate key is a Super
The attribute closure AE+ = {A, B, C, D, E, F}.
key but every Super key need not be Candidate.
The attribute closure CE+ = {C, E, A, B, D, F}.
But the attribute H is missing from the closure. Q7 Text Solution:
The attribute closure AEH+ = {A, B, C, D, E, F, H}. S1: True: A key in DBMS is an attribute (or) a set
Therefore, C is the correct answer. of attributes that help to uniquely identify a
tuple (or row) in a relation (or table).
Q3 Text Solution:
S2: False: There can be more than one candidate
The attribute closure of YZ+ = {Y, Z} no other
key in relation out of which one can be chosen as
attribute can be determined by YZ+ . Therefore
primary key.
only 2 elements that is Y and Z are in the YZ+
closure. Q8 Text Solution:
Q4 Text Solution: • Primary key has no duplicate values it has only
The key for the given FD set. unique values. Hence S1 is true.
{P → QT, Q → SU, V → U} • Primary key is not necessarily to be a single
PV+ = {P, Q, T, V, U, S} column more than one column can also be a
PVQ+ = {P, Q, T, V, U, S} primary key for the table. Hence S2 is true.
PTQ+ = {P, T, Q}
QV+ = {Q, V, S, U} Q9 Text Solution:
we have PV+ as the candidate key and also it is PR RT Common
the super key. PVQ+ ↓ ↓ ↓
is the super key but it is not a Candidate Key (not ∙ 25-2 + 25-2 – 25-3
minimal set) ∙ 23 + 23 – 22
• 8 + 8 – 4 ⇒ 16 – 4 = 12
Q5 Text Solution: Q10 Text Solution:
Common between
• Cardinality is defined as the number of tuples
two keys
in a relation. PQ RS TU ⏐
⏐
⏐
• Degree is defined as the number of attributes ↓ ↓ ↓ ⏐
↓
7–2 7–2 7–2 7–2 7–4
in a relation. 2 +2 +2 +– (2 +2 + 27–4 )
• Relation instance is the set of tuples of a Common between
relation at a particular instance of time. all three keys
⏐
⏐
⏐
Q6 Text Solution: ⏐
↓
7–6
+ 2
Android App | iOS App | PW Website
4 of 4 17/10/24, 15:29