0% found this document useful (0 votes)
98 views28 pages

FD's & Normalization - DPP 07 (Extra DPP) 2

The document contains multiple-choice questions (MCQs) and multiple-select questions (MSQs) related to Database Management Systems, specifically focusing on functional dependencies, normalization, and candidate keys. It includes various schemas and scenarios for determining the correctness of statements regarding normal forms and attributes. An answer key and hints for solutions are also provided for the questions presented.

Uploaded by

om717102
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
98 views28 pages

FD's & Normalization - DPP 07 (Extra DPP) 2

The document contains multiple-choice questions (MCQs) and multiple-select questions (MSQs) related to Database Management Systems, specifically focusing on functional dependencies, normalization, and candidate keys. It includes various schemas and scenarios for determining the correctness of statements regarding normal forms and attributes. An answer key and hints for solutions are also provided for the questions presented.

Uploaded by

om717102
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 28

1

Branch : CSE & IT Batch : Hinglish


Database Management system
FD's & Normalization DPP 07

[MCQ]
1. Consider the following two relational schemas [MCQ]
Schema 1: R (P, Q, R, S) 4. Consider the following statements
Schema 2: R1(P, Q, R) R2(Q, S) and the following S1: If the proper subset of candidate key determines
statements. non-prime attribute, then it is violation case of
S1: If the only functional dependencies that hold on 2NF.
the relation in the schema 1 are P → Q, R → S, S2: If P→Q and Q→R are two FD’s then P→Q is
then relation R is in BCNF. known as transitive dependency
S2: If the only FD that hold on the relation in the Which of the statements are/is true?
schema 2 are P→Q, P→R, Q→P, P→S then the (a) Only S1 (b) Only S2
relation R1 and R2 are in BCNF. (c) Both S1 and S2 (c) Neither S1 nor S2
Which of the following statements are true?
(a) Only S1 is true [MCQ]
(b) Only S2 is true. 5. Consider the following statements about Boyce – Codd
(c) Both S1 & S2 are true Normal Form (BCNF)
(d) Neither S1 nor S2 are true S1: The determinant for each functional dependency
must be a super key.
[MCQ] S2: Transitive dependencies does not result in
2. Assume that a relation is in 3NF under which of the abnormalities in a relation in BCNF.
following conditions R can violate BCNF? (a) Only S1 is true
(a) The table consists two candidate keys that share a (b) Only S2 is true
common attribute. (c) Both S1 and S2 are true
(b) The table consists of two non-overlapping (d) Neither S1 nor S2 is true
candidate keys.
(c) The table has a unique candidate key consisting of [MCQ]
one attribute. 6. Consider a table/Relation R has one candidate key, then
(d) The table consists of two candidate keys each which of the following is always true?
consisting of one attribute. (a) If R is in 2NF, then it is also in 3NF
(b) If R is in 3NF, then it is also in BCNF
[MCQ] (c) If R is in 2NF, but it is not in 3NF
3. Consider a relation R(P, Q, R, S, T, U, V, W) with the (d) None of the above.
following functional dependencies:
{RW→V, P→QR, Q→RUW, T→P, U→TV}, then the [MSQ]
relation R is in _______. 7. Let’s suppose, dependencies have to be preserved and
(a) 1NF (b) 2NF BCNF decomposition is not possible. Which of the
(c) 3NF (d) BCNF following normal forms can be still achievable (while
preserving dependencies)?
(a) 1NF (b) 2NF
(c) 3NF (d) 4NF
2

[MCQ]
8. Consider a relation R(P, Q, R, S, T) with the set of FD’s
{PQR→ ST and T → QRS} which of the following
statements is true?
(a) R is not in 2NF
(b) R is in 2NF but not in 3NF
(c) R is in 3NF but not in BCNF
(d) R is in BCNF
3

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

Hints & Solutions


1. (b) S1(True):
S1(False): A determinant must be either a candidate key or a super
The candidate key of schema 1 is PR, therefore both key for each functional dependency.
FD violates the BCNF property, so schema 1 is not in S2(True):
BCNF. In 3NF we remove transitive dependency, and every
S2(True): BCNF is in 3NF.
The candidate key of R1 is P, Q and R2 is Q in schema2,
6. (b)
therefore, relation R1 & R2 are in BCNF
If there is only one candidate key and relation is 3NF,
that means all functional dependency determinants is
2. (a) Candidate key thus relation is in BCNF, Hence, option
Let us take an relation R(P, Q, R, S) with FD Set = (b) is true.
P{P→QR, QR→PS, S→Q}. The table has two
candidate keys that share a common attributes QR and
7. (a, b, c)
RS. Therefore, relation is in 3NF, but not in BCNF, as
FD S→Q violates BCNF. Hence it is in 3NF but not in 1NF, 2NF and 3NF are always achievable even while
BCNF. there is a need of preserving dependencies. Since 4NF
implies BCNF, 4NF is not achievable in this case.
3. (a)
8. (a)
RW→V
PQR→ST
P→Q
T→QRS
P→R (PQR)+ = {P, Q, R, S, T}
Q→R (PT)+ = {P, Q, R, S, T}
Q→U Candidate key = {PQR, PT}
Q→W PQR→ST
T→P PQR is candidate key therefore PQR→ST
U→T Satisfy BCNF
U→V T→QRS
As we can see in the 3rd FD P→R, P is prime attribute T→Q
and Q is non-prime attribute, therefore this relation T→R
does not satisfy 2NF and higher normal form. So, the T→S
highest normal form satisfied by the above relation is Violate 2NF.
1NF. So not in 2NF

4. (a)
P→Q and Q→R are two FD’s then P→R is known as
transitive dependency, hence S2 is false.

5. (c)

Any issue with DPP, please report by clicking here:- https://forms.gle/t2SzQVvQcs638c4r5


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

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


1

Branch : CSE & IT Batch : Hinglish

i i n DPP 01

[MSQ] phone → {phone}


1. According to RDBMS rules, choose the correct mail → {Rid, course}
statement from the following. name → {phone, mail, course}
(a) A relation in RDBMS can have multiple attributes
The number of non-trivial FD’s in the given FD set
(b) A relation in RDBMS is a set of rows and columns
is/are?
(c) A tuple in a relation can have multiple values for
an attribute. [MCQ]
(d) All of the above
5. Consider the following set of FD’s:
{V → W, W → XZ, X → YZ} for relation
[NAT]
R(V, W, X, Y, Z)
2. Consider the student relation shown below with
Then the attribute closure of YZ+ contains how many
schema stud (Sname, S age, S mail, S marks),
elements?
Stud
(a) 0 (b) 1
Sname Sage Smail Smarks
(c) 2 (d) 3
Rohit 28 [email protected] 68
Kanika 25 [email protected] 75
[MCQ]
Pankaj 25 [email protected] 75
6. For the given FD set: {P → QT, Q → SU, V → U} of
Rohit 28 [email protected] 88
a relation R (P, Q, T, S, U, V). Find the set of attributes
Anjali 26 [email protected] 75
that is Super key but not a Candidate key?
(a) PTQ (b) PV
For the above given instance how many 2-set of
(c) PQV (d) QV
attributes can determine a row uniquely?
[MCQ]
[MSQ]
7. In a schema with attribute X, Y, Z, W, V, the
3. Consider a relation schema R(A, B, C, D, E, F, H) with
following set of functional dependencies are given:
the given Functional dependency set:
{Y → X, Y → Z, ZW → V, X → W, V → X}.
{A → BC, C → AD, DE → F, C → F}
Which of the following FD is not implied by the
The attribute closure that contains all the attributes of
above set?
the relation R is?
(a) YX → ZW
(a) AE+
(b) XV → YZ
(b) CE+
(c) AEH+ (c) ZW → V
(d) All of the above (d) XV → XW

[NAT] [MSQ]
4. Consider the below relation schema Stud (Rid, name, 8. Choose the correct statement from the following.
course, mail, phone) with FD set as: (a) The cardinality is defined as the number of
Rid → {Rid} attributes in a relation.
Rid → {name, mail} (b) Degree of the relation is the number of tuples in
the relation.
course → {course, phone}
2

(c) Relation instance is the set of tuples of a relation (d) All of the above
at a particular instance of time.

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

Hints & Solutions


1. (a, b) 5. (c)
A relation in RDBMS can have multiple The attribute closure of YZ+ = {Y, Z} no other attribute
attributes/fields/Columns but every tuple should be can be determined by YZ+. Therefore only 2 elements
unique. Thus, according to RDBMS guidelines, A
that is Y and Z are in the YZ+ closure.
tuple in a relation cannot have multiple values for an
attribute.
A relation is a table and a table is a set of rows and 6. (c)
columns. The key for the given FD set.
{P → QT, Q → SU, V → U}
2. (1) PV+ = {P, Q, T, V, U, S}
We can clearly observe that none of the attribute can
PVQ+ = {P, Q, T, V, U, S}
determine a tuple uniquely (Single attribute), if we
check for 2-attribute set then only (Sname, Smarks) PTQ+ = {P, T, Q, S, U}
can determine a row uniquely for the instance. So the QV+ = {Q, V, S, U}
answer is 1. we have PV+ as the candidate key and also it is the
super key. PVQ+ is the super key but it is not a
3. (c) Candidate Key (not minimal set)
The attribute closure AE+ = {A, B, C, D, E, F}. NOTE: A candidate key is minimal set of attributes that
The attribute closure CE+ = {C, E, A, B, D, F}.
determine relational table uniquely. Also, every
But the attribute H is missing from the closure.
The attribute closure AEH+ = {A, B, C, D, E, F, H}. candidate key is a Super key but every Super key need
Therefore, C is the correct answer. not be Candidate.
7. (b)
4. (3) YX+ = {Y, X, Z, W, V}
Trivial FD’s: 2 ie Rid → Rid and phone → phone. XV+ = {X, V, W}
Non-trivial FD’s: 3 i.e. Rid → {name, mail}, ZW+ = {Z, W, V, X}
mail → {Rid, course) and name → {phone, mail, XV+ = {X, V, W}
course}.
8. (c)
Semi-non trivial FD’s: 1 i.e. course → {course,
• Cardinality is defined as the number of tuples in a
phone}.
relation.
• Degree is defined as the number of attributes in a
relation.
• Relation instance is the set of tuples of a relation at
a particular instance of time.

Any issue with DPP, please report by clicking here:- https://forms.gle/t2SzQVvQcs638c4r5


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

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


1

Branch : CSE & IT Batch : Hinglish

FD's & Normalization DPP 02

[MSQ] [MCQ]
1. Choose the correct statement from the following: 5. Choose the incorrect statement from the following
(a) There can be many primary keys for a relation. (a) All super keys cannot be primary key.
(b) There can be many alternate keys for a relation. (b) We choose the minimal candidate key to be a
(c) All the candidate keys are also super keys. primary key.
(d) All the super keys are also the candidate keys. (c) The number of super keys are equal to the number
of primary keys for a relation.
[NAT] (d) None of the above.
2. Consider the below instance of relation:
Employee: [NAT]
Emp_rating Emp_name Emp_mail Emp_sal 6. Suppose a relation R has 9 attributes, then the
1 Rohit p@pw 40000 maximum possible number of candidate keys are?
2 Kanika c@pw 60000
1 Rohit Null 50000 [MSQ]
3 Pankaj g@pw 60000 7. For all given set of FD’s find the primary key from
The maximum possible number of alternate keys for the options below, for relation R (A, B, C, D, E, F)
the above relational instance is/are _____. {A → D, C → BDE, B → F, B → C}
(a) AC could be the primary key.
[MCQ] (b) There are two candidate keys AC and AB.
3. Consider the set of functional dependencies for a (c) BC is the primary key.
relation R(D, N, C, S) (d) No primary key exists for the relation.
{D→N, D→C, D→S, C→S}
Then choose the correct statement regarding the above [MCQ]
set. 8. Consider a relation R (A B C D E F), on this relation
(a) {D} is the superkey for the relation. how many maximum number of candidate keys are
(b) {DN} is the candidate key for the relation. possible?
(c) {DC} is the candidate key for the relation. (a) 8 (b) 12
(d) {CN} is the superkey for the relation. (c) 16 (d) 20

[NAT]
4. Consider the given FD set for relation
R (X, Y, Z, W, U, V)
{X → Y, YZ → W, U → Z, W → X}
Then the number of prime attributes for the relation
are?
3

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

Hints & Solutions


1. (b, c) Non-prime attribute is {z}.
I. There exists exactly at most one primary key for
any relational table while there can be multiple 5. (c)
alternate keys for a relation.
All super keys cannot be primary key. For a relation the
II. All the candidate keys are super keys, but it is not
compulsory that all super key are candidate number of super keys are more than number of primary
keys. keys.
NOTE: A candidate key is minimal set of attributes
that determine relational table uniquely. Also, every 6. (126)
candidate key is a Super key but every Super key For a relation with n attributes, the maximum number
need not be Candidate.
of candidate keys will be nC n
 2 
2. (3)
An alternate key is one that is not the primary key. It
n = 9, therefore 9C  9   9C 4
allows null values. So, the alternate/candidate key for  2 
given relation is/are: {Emp_mail} {Emp_rating,
Emp_sal}, and {Emp_name, Emp_sal}   8  7  6  5! 9  3 7  6
  = 42  3 = 126
4!  5! 4  3 2
3. (a)
{D → N, D → C, D → S, C → S}
the candidate keys of the relation are: 7. (a, b)
D+ = {D, N, C, S}  There can be at most one primary key for a relation.
C+ = {C, S}  There exists two candidate keys i.e. AC and AB out of
S+ = {S}  these two only one is selected to be the primary key.
N+ = {N} . So, option (a) and (b) is correct choice.
{D} is the candidate key as well as the super key.
{DN} and {DC} are the super keys not the candidate
key. 8. (d)
{CN} is not any key. n=6
 Maximum candidate keys = nC  n 
4. (5)  2 
In order to find the prime attributes, we first find the
6  5  4  3!
candidate keys for the relation as prime attributes are 6
C  6   6C 3  = 20
 2  3! 3  2  1
part of Candidate Key.
The candidate keys are: XUV, YUV, WUV
So the prime attributes are {X, Y, W, U, V}

Any issue with DPP, please report by clicking here:- https://forms.gle/t2SzQVvQcs638c4r5


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

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


1

Branch : CSE & IT Batch : Hinglish


DBMS
FD’s & Normalization DPP 03

[MCQ] B→D
1. Consider the relation R (P, Q, R, S, T) and the set of E→A
function dependencies F = {P →Q, QR →T, TS→P}. Which of the following functional dependencies is
Which of the following is not the candidate key of R? implied by the above set?
(a) RST (b) PRS (a) CD→AC (b) BC→CD
(c) QRS (d) PQR (c) AC→BC (d) BD→CD

[NAT] [MCQ]
2. Assume a relation R (P, Q, R, S, T) with the set of 6. Assume the relation R that has eight attributes
functional dependencies {P→Q, Q→R, R→Q and ABCDEFGH. Let A = {CH→G, A→BC, B→CFH,
Q→T}. how many candidate keys are possible in R? E→A, F→EG} is a set of functional dependencies
(FD). How many candidates key does the relation R
[MCQ] have?
3. Consider the following statements: (a) 2 (b) 3
S1: A key in DBMS is an attribute (or) a set of (c) 4 (d) 5
attributes that help to uniquely identify a tuple (or
row) in a relation (or table). [MCQ]
S2: There should be only one candidate key in 7. Assume the relation schema R(P, Q, R, S, T, U, V, W,
relation, which is chosen as the primary key. X, Y, Z) and the set of functional dependencies on R:
(a) Only S1 is true. F = {PQ→R, Q→UV, PT→WX, W→Y, X→Z}.
(b) Only S2 is true. Which of the following can be candidate key for R?
(c) Both S1 and S2 are true. (a) PQU (b) PQT
(d) Neither S1 nor S2 is true. (b) PQTR (d) PQTWX

[MSQ] [MCQ]
4. Choose the correct statements from the following: 8. Consider the following statements:
(a) The minimal set of attributes that can uniquely S1: Primary key has no duplicate values it has only
identify tuple is known as a candidate key. unique values.
(b) A super key is a group of single or multiple keys S2: Primary key are not necessary to be a single
that identifies rows in a table. It supports NULL column more than one column can also be a
values. primary key for table.
(c) Primary key is not a unique key. (a) Only S1 is true.
(d) None of the above. (b) Only S2 is true.
(c) Both S1 & S2 are true.
[MSQ] (d) Neither S1 nor S2 are true.
5. Consider a schema with attributes A, B, C, D & E
following set of functional dependencies are given,
A→B
A→C
CD→E
2

[MSQ]
9. Choose the correct statements about candidate key.
(a) Candidate key is a super key with maximum
attributes.
(b) It must contain unique values.
(c) A table can have multiple CK’s but only one
primary key.
(d) It is a super key with no repeated data which is
called a candidate key.
3

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

Hints & Solutions


1. (d) (b) Closure of BC = ABCDE, therefore BC→CD can
RS is not present in RHS of all the FDS therefore RS be derived from the given set of FD’s.
must be the part of candidate key. So, using option
(c) Closure of AC = ABCDE, therefore AC→ BC can
elimination, option (d) is eliminated because PQR does
not contain RS therefore it cannot be a candidate key, be derived from the given set of FD’s
hence option “d” is the answer. (d) Closure of BD = BD, therefore BD→CD can’t be
derived from the given set of FD’s.
2. (1)
P→Q 6. (c)
Q→R NOTE: If closure of any attribute includes all the
R→Q attributes of a table then it is a superkey and minimal
Q→T
superkey is called a candidate key, find closure of each
So {PS}+ = {P Q R S T} so PS is candidate key.
Only PS is candidate key, hence 1 is the answer. attribute set. D cannot be derived using the left side of
FD. hence, D will definitely be part of the candidate
3. (a) key.
S1: True: A key in DBMS is an attribute (or) a set of AD+ = ABCDEFGH
attributes that help to uniquely identify a tuple (or BD+ = ABCDEFGH
row) in a relation (or table).
S2: False: There can be more than one candidate key CD+ = CD
in relation out of which one can be chosen as D+ = D
primary key. ED+ = ABCDEFGH
FD+ = ABCDEFGH
4. (a, b)
GD+ = GD
(a) Candidate key: It is a minimal set of attributes that
HD+ = HD
can uniquely identify a tuple is known as
Thus, there are 4 candidates keys AD, BD, ED and FD.
candidate key.

7. (b)
Example: Passport_No, Employee_ID, Roll_No
Simply find the closure of all the options given, as we
(b) Super key: super key is an attribute (or set of
can see PQT cannot be derived from any of the above
attributes) that is used to uniquely identify all
FDS which states that P, Q & T must be present in the
attributes in a relation.
key. Hence, we need to verify only b, c & d by taking
Note: The difference between superkey and a closure set PQT+ derives all attributes in relation R. so
primary key is as follows: it is candidate key.
(i) Super key’s attributes can contain NULL. NOTE: option (c) & (d) are the super keys, since
(ii) Primary key is a minimal super key hence all adding zero or more attributes to C.K generates super
super keys can’t be primary key. key.

(c) primary key is a unique key. 8. (c)


• Primary key has no duplicate values it has only
5. (a, b, c) unique values. Hence S1 is true.
Find the closure set of left side of each FD of every • Primary key is not necessarily to be a single
option given. If the closure set of left side contains the column more than one column can also be a
right side of the FD, then the particular FD is implied primary key for the table. Hence S2 is true.
by the given set.
(a) Closure of CD = ABCDE, Therefore CD→AC 9. (b, c, d)
can be derived from the given set of FD’s. (a) candidate key is super key with minimal attributes.
5

Any issue with DPP, please report by clicking here:- https://forms.gle/t2SzQVvQcs638c4r5


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

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


1

Branch : CSE & IT Batch : Hinglish

Database Management System


FD's & Normalization DPP 04

[MCQ]
1. Consider the following two sets of functional [NAT]
dependencies 5. Let a relation R have attributes {P, Q, R, S, T} and
X = {P→Q, Q→R, R→P, P→R, R→Q, Q→P} “PQR” is the candidate key, then how many super keys
Y = {P→Q, Q→R, R→P} are possible ________?
Which of the following is true?
(a) X  Y (b) Y  X [MCQ]
(c) X  Y (c) X  Y 6. Consider the following FD sets:
S1 = {P→R, PR→S, T→PS, T→U}
[NAT] S2 = {P→S, QR→PS, R→Q, T→P, T→S, T→U}
2. Consider a relation with schema R(P, Q, R, S, T) and S3 = {P→S, R→P, R→Q, T→PU}
FD set (PQ→R, R→S, S→P). How many super keys Which of the following sets is equivalent?
in relation R contains?____. (a) S1  S2 (b) S2  S3
(c) S1  S3 (d) S1  S2  S3
[NAT]
3. Consider a relation R(P, Q, R, S, T) with the set of [NAT]
functional dependencies {P→QR, RS→T, Q→S, and 7. Consider a relation R = {P, Q, R, S, T, U, V, W} with
T→P}. How many super keys are possible in R? the functional dependency sets S = {PR→V, S→TV,
_____. QR→S, RV→QS, PRS→Q, RT→PV}
The minimum numbers of simple functional
[MCQ] dependency in the minimal cover of F is _________?
4. Consider the relation schema R(P, Q, R, S, T, U, V, W,
X, Y) and the set of functional dependencies on R are: [NAT]
F = {PQ→R, Q→TU, PS→VW, V→X, W→Y}. 8. Consider a relation R(P, Q, R, S, T) with the following
Which of the following can be the candidate key for R? functional dependencies: PQR→ST and S→PQ, then
(a) PQT (b) PQS the number of super keys in R is_______?
(c) PQSR (d) PQSVW
2

Answer Key
1. (c) 5. (4)
2. (7) 6. (b)
3. (27) 7. (6)
4. (b) 8. (10)
3

Hints & Solutions


1. (c) Point to be noted that, option (c) & (d) are the super
To check, find minimal canonical cover of both the FD keys, since adding zero or more attributes to candidate
sets. FD set Y is already a minimal cover. In X, P→Q, key generates super key.
Q→R, So P→R is redundant FD (through transitivity),
and also Q→R, R→P, So Q→P is also redundant FD. 5. (4)
so, we can remove it from F, then after removing it will PQR is candidate key, remaining attributes → S, T with
be X  Y.
S, T four possibilities hence 4 super keys are possible.

2. (7)
6. (b)
Candidate keys: PQT, QST, QRT
Super keys: Candidate key for S1 = T, closure of T+ = {P, Q, R, S,
PQT: PQT, PQRT, PQST, PQRST T, U}
QST: QST, PQST, QRST, PQRST Candidate key for S2 = RT closure of RT+ = {P, Q, R,
QRT: QRT, PQRT, QRST, PQRST S, T, U}
Total distinct super keys are PQT, QST, QRT, PQRT, Candidate key for S3 = RT closure of RT+ = {P, Q, R,
PQST, QRST, PQRST. Therefore, correct answer is 7.
S, T, U}
So, S2 as S3 are equivalent.
3. (27)
P→QR
7. (6)
RS→T
A FD A→B is a simple FD if B is a single attribute:
Q→S
Step 1:
T→P
Simplify all the given FD’s
Candidate key {P, RS, QR, T}
PR→V
{P}+ = {P Q R S T}
{T}+ = {P Q R S T} S→T
{RS}+ = {P Q R S T} S→V
{QR}+ = {Q R S T P} QR→S
So total super key on R for 5 attributes is 25 – 1 = 31 RV→S
Q, R, S and QS are not super keys RV→Q
31 – 4 = 27 PRS→Q
Hence there are 27 super keys.
RT→P
RT→V
4. (b)
Step 2:
firstly, find the closure of all the options given above.
As we can see that P, Q, and S cannot be derived from Find out extraneous attributes present in FD.
any of the above functional dependencies given which PRS → Q: (PR)+ → PRVQ, So we get Q, S is
states that P, Q and S should be present in the key. extraneous and can be safely removed, rewriting the
Therefore, we need to check only the closure set of new FD as PR→Q.
option b, c and d which contains these three. Since PR→V: P+→P, so can’t get V; R is not extraneous,
PQS+ derives all the attributes in the relation R, So R+→ R, so, count set V; P is not extraneous. Hence,
clearly, it’s a candidate key. keep this FD as it is.
4

QR→S: Q+→Q, so can’t get S R is not extraneous Step 4:


R+→R, so can’t set S, Q is not extraneous keep this FD 1) S→T
as it is. 2) S→V
RV → Q: R+→ R, so can’t get Q; V is not extraneous 3) QR→S
V → V, so, can’t get Q; R is not extraneous keep this
+
4) RV→Q
FD as it is.
5) PR→Q
RV→S; R+→R, so can’t get S; V is not extraneous
6) RT→P
V+→V so can’t get S; R is not extraneous so keep this
The minimum number of simple FDs in the minimal
FD as it is.
cover of F is 6.
If we continue the step 2, we will not find any
extraneous attribute on LHS of any FD. So, we are done
with step 2. 8. (10)
Consider a relation R have attributes {x1, x2, x3....xn}
and the candidates’ keys are “x1x2”, “x1x3” then
Step 3:
possible number of super keys = super keys of (x1, x2)
Find Redundant FD’s + super keys of (x1, x3) – super keys of (x1, x2, x3)
(PR)+ → PRQSTV; so, we got V from other FDs  2(n - 2) + 2(n - 2) – 2(n -3)
remove the entire FD from list. The candidate keys of relation are PQR and SR.
(RV)+ →RVSTPQ; So, we get Q from other FD’s The number of super keys of (PQR) = 2(5-3) = 4
remove the entire FD from the list. The number of super keys of (RS) = 2(5 - 2) = 8
(RT)+ →RTVS; so, we did not get P from other FDs, The number of super keys of (PQRS) = 2(5 - 4) = 2
so keep this FD in the lists. Then possible number of super keys = 4 + 8 – 2 = 10
ie, PQR, PQRS, PQRT, PQRST, RS, PRS, QRS, RST,
(RT)+ →RTPQSV; so we got V from other FDs, hence,
PRST, QRST.
remove this FD from the list.

Any issue with DPP, please report by clicking here:- https://forms.gle/t2SzQVvQcs638c4r5


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

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


1

Branch : CSE & IT Batch : Hinglish

Database Management System


FD's & Normalization DPP 05

[MCQ] Which of the following is True?


1. Assume a relation R = (P Q R S T U) and functional (a) 1 is lossy but 2 is lossless
dependencies: F = {PQ  RU, RT  Q, U  S}, (b) 1 is lossless but 2 is lossy
consider the following two statements: (c) Both 1 and 2 are lossless
S1: The decomposition of R into PQRT and PQSTU (d) Both 1 and 2 are lossy
is a dependency preserving decomposition.
S2: The decomposition of R into PQRT and PQSTU [MCQ]
is a lossless decomposition. 4. Consider a relation R(P, Q, R, S, T, U, V, W) be a
Which of the statement is/are TRUE? relation schema, in which of the following FD sets are
(a) Only S1 is true. known to hold = {P  Q, P  R, P  S, PT  W,
(b) Only S2 is true. T  S, T  U}. Suppose we decompose the relation
(c) Both S1 and S2 are true. into two relations, R1(PQRS), and R2(STUVW). The
(d) Both S1 and S2 are false. above decomposition is
(a) lossless join and dependency preserving.
[MCQ]
(b) lossless join but not dependency preserving.
2. Consider the following two decomposition of R(P Q R
(c) dependency preserving but not lossless join.
S T U) with the set of dependencies
(d) neither dependency preserving nor lossless join.
F = {PQ  R, PR  Q, PS  T, Q  S, QR  P,
T  U}.
[MCQ]
S1: R1(PQ), R2(QR), R3(PQST), R4(TU) 5. Let R(P, Q, R, S, T, U) be a relational schema, in which
S2: R1(PQR), R2(PRST), R3(PSU) of the following FD’ sets are known to hold {PQ  R,
Which of the statements is are dependency preserving PR  Q, PS  T, QR  R, Q  U}
and lossless-join decomposition of R? Suppose we decompose the relation R into four
(a) S1 Only (b) S2 Only relations R1(PQ), R2(QR), R3(PQST) and R4(TU).
(c) Both S1 and S2 (d) None of these Then the above decomposition is:
(a) dependency preserving and lossless join.
[MCQ] (b) lossless join but not dependency preserving.
3. Consider a relation STUDENT (Name, Subject, (c) dependency preserving but not lossless join.
Location, Marks).
(d) neither dependency nor lossless join.
Name Subject Location Marks
Madhav Operating System Noida 96 [MCQ]
Madhav DBMS Noida 100 6. Consider the following statements
S1: The decomposition R1, R2 ….. Rn for a relation
Student is decomposed into following schema R are said to be lossless if their natural
1. STU Sub 1 (Name, Subject, Location) and STU Sub 2 join results in the original relation R.
(Name, Location, Marks). S2: The decomposition R1, R2 ….. Rn for a relation
2. STU Sub 1 (Name, Location) and STU Sub 2 schema R are said to be lossy if their natural join
(Subject, Marks). results into addition of extraneous tuples with the
original relation R.
2

(a) Only S1 is true (c) TUV  W (d) U  VW


(b) Only S2 is true
(c) Both S1 and S2 are true [MCQ]
(d) Neither S1 nor S2 are true 8. Which are the major and important properties of FD’s?
(a) There should be one to one relationship between
[MCQ] attributes in FDs.
7. Consider the relation R(P, Q, R, S, T, U, V, W) with (b) FDs must be defined in schema.
the following set of functional dependencies: (c) FDs should be non-trivial.
F = {P  QRS, P  T, TUV  W and U  VW} (d) All of the above
Which one of the FD in the F is redundant?
(a) P  QRS (b) PS  T
3

Answer Key
1. (c) 5. (d)
2. (d) 6. (c)
3. (d) 7. (c)
4. (d) 8. (d)
4

Hints & Solutions


1. (c) decomposed relation and then perform joining
S1: True – PQ  R and RT  Q are preserved in operation again if there is extra tuples then that
PQSTU. decomposition is lossy.
S2: True – PQRT  PQSTU = PQT and PQT 
PQRT which is the candidate key of PQR T STUSub1
relation. Name Subject Location
Madhav OS Noida
2. (d) Madhav DBMS Noida
S1 :
P Q R S T U STUSub2
R1   Name Location Marks
R2   Madhav Noida 96
Madhav Noida 100
R3      
R4  
STUSub1 ⋈ STUSub1
This is lossless join decomposition Name Subject Location Marks
Now checking for dependency preserving Madhav OS Noida 96
Madhav DBMS Noida 100
PQ  R, only trivial FD’s hold in R, (PQ) and R2
Madhav OS Noida 96
(Q, R) and FD holds in R3 (PQST) = {T  U}. Let it
Madhav DBMS Noida 100
be F1 and FD holds in R4 (TU) = {T  U}. Let it be
F2 .
Lossy because we have extra tuples in the relation.
Now F+ = (F1  F2) +

(PQ)+ = PQR but (F1  F2)+ will not contain R. So this 4. (d)
is not dependency preserving. {P  Q, P  R, P  S, PT  W, T  S, T  U}
S2 : P Q R S T U V W
P Q R S T U R1    
R1    R2     

R2      
PT  W is not preserved
R3      Therefore, its neither dependency preserving not
R4     lossless

This is lossless join decomposition 5. (d)


Now checking for dependency preserving check for P Q R S T U
FD Q  S R1  
R2  
F+ = (Q)+ = {Q, S} this will no be preserved in any
R3    
relation as (F1  F2)+ will not contain U.
R4  

3. (d)
Neither lossless nor dependency preserving
A decomposition is lossy if after joining, relation
 (d) is correct option.
contains extra tuple, divide the table according to
5

6. (c) (c) {US}+ = VW, so remaining T and V from FD So


S1 (True): The decomposition R1, R2 …. Rn for a resultant FD is U  W
relation schema R are said to be lossless if their natural (d) U  VW = {U  V, U  W}
join results the original relation R. So, U  W is redundant because it can be derived
S2 (True): The decomposition R1, R2 …. Rn for a from FD U  VW.
relation schema R are said to be lossy if their natural
join results into addition of extraneous tuples with the 8. (d)
original relation R.
(a) There should be one to one relationship between
attribute in FD’s.
7. (c) (b) FD’s must be defined in schema
(a) P  QRS {P  Q, P  R, P  S} (c) FD’s should be non-trivial
(b) PS  T, now closure of P has S so S is extraneous Hence, option (d) is correct.
attribute. So remove S then resultant FD is P  T

Any issue with DPP, please report by clicking here:- https://forms.gle/t2SzQVvQcs638c4r5


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

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


1

Branch : CSE & IT Batch : Hinglish


Database Management System
FD's & Normalization DPP 06

[MCQ] [MSQ]
1. Assume a relation R(P, Q, R, S, T) with the following 5. Consider the following relation R(P, Q, R, S) and
functional dependencies functional dependencies F that hold over the relation
{PQ → RST, P → R, Q → S}. which of the following F = {P → QS, RS → Q, R → S, Q → PS}. The relation
decomposition of R satisfies BCNF? R is in which of the following normal form?
(a) R1 (P, R), R2(Q, S), R3(P, Q, R, S, T) (a) 1NF (b) 2NF
(b) R1(P, R), R2(Q, S), R3(P, Q, R, T) (c) 3NF (d) BCNF
(c) R1(P, R), R2(Q, S), R3(P, Q, S, T)
(c) R1(P, R), R2(Q, S), R3(P, Q, T) [MCQ]
6. Consider a relation which contains two different true
[MCQ] multivalued dependencies then which of the following
2. Assume a relation R = (P, Q, R, S) and a set F of normal form is violated automatically.
functional dependencies: (a) 2NF (b) 3NF
F = {PR → S, S → P, S → Q, S → R}, Highest normal (c) BCNF (d) 4 NF
form satisfied by the relation R is?
(a) 2NF (b) 3NF [MCQ]
(c) BCNF (d) 1NF 7. Assume a relation R(P, Q, R, S, T, U) with the
following dependencies
[MCQ] 1. PQ → RS 2. T → R 3. Q → TU
3. Assume the relation R(P, Q, R, S, T) with candidate Given the functional dependencies as shown above
key PQ is in atleast 3NF. which of the following which among the options shows the decomposition of
functional dependencies given in option are invalid? relation R is normalized to 3NF?
(a) R1(P, Q, R, S, T, U) R2(T, R) R3(Q, T, U)
(a) PQ → R (b) ST → Q
(c) PQ → S (d) RS → T (b) R1(P, Q, R, S) R2(R, T) R3(T, U, Q)
(c) R1(P, Q, R, S) R2(R, T) R3(Q, T, U)
[MSQ]
(d) R1(P, Q, S), R2(T, R) R3(Q, T, U)
4. State which of the following statements is/are true?
(a) Normal forms are used to eliminate or reduce
redundancy in database tables. [MCQ]
(b) A relation is in first normal form if every attribute 8. Given the relation ‘R’ with attributes PQRST with set
in that relation is singled valued attribute or No of functional dependencies {P → P Q R S T, Q → R}
Multivalued Attribute. which of the following is / are true?
(c) A relation is in 2NF if every candidate key is (a) R1(PRST) R2(QR) are both in BCNF and
simple candidate key. preserves lossless join.
(d) A relation R is in BCNF, if R is in 3rd normal form (b) R1(PQST), R2(QR) are both in BCNF and
and for every functional dependency, LHS is preserves lossless join
super key. A relation is in BCNF iff in eveiy non- (c) R1(PST), R2(QR) are both in BCNF and preserves
trivial functional dependency P -> Q, where P is a lossless join.
super key. (d) None of the above.
2

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

Hints & Solutions


1. (d) LHS is super key. A relation is in BCNF iff in
If decomposition is lossless and every individual every non-trivial functional dependency
relation satisfy BCNF, then decomposition satisfy P → Q, where P is a super key.
BCNF.
(a) The Decomposition R1(P, R), R2(Q, S), R3(P, Q, 5. (a, b)
R, S, T) is lossless, but individual relation R3 does The candidate key of relation is R, therefore relation
not satisfy BCNF because of FD P → R and does not contain violation of 2NF.
Q → S. Hence, highest normal form is satisfied by the relation
(b) The Decomposition R1(P, R), R2(Q, S), R3(P, Q, is 2NF, so it is also satisfies 1NF.
R, T) is lossless, but individual relation R3 does
not satisfy BCNF because of FD P → R. 6. (d)
(c) The Decomposition R1(P, R), R2(Q, S), R3(P, Q, If there consist a true / real multivalued dependencies
S, T) is lossless, but individual relation R3 does in a relation then that relation automatically violates
not satisfy BCNF because of FD Q → S. 4NF.(we need not check MVD’s in 1NF, 2NF, 3NF and
(d) The Decomposition R1(P, R), R2(Q, S), R3(P, Q, T) BCNF)
is lossless, and individual relation R3 also satisfy
BCNF. Therefore, this decomposition is in BCNF. 7. (d)
NOTE: If a relation has only two attributes then it is in For the given FD set, the minimal cover will be:
BCNF. Therefore R1 and R2 is in BCNF in all the PQ → R
options given above. PQ → S
T→R
2. (c) Q→T
PR and S are the super key of the relating. LHS of each
Q→U
FD is super key therefore highest normal form satisfied
by R is BCNF. Minimal cover:
PQ → S
3. (d) T→R
Given, PQ is a composite candidate key. hence prime Q→T
attributes are P and Q. A relation is said to be in 3NF, Q→U
if it is in 2NF and if there exists FD α → β, then either
Candidate key = {P, Q}
α is a super key or β is prime attribute. In functional
PQ → S Satisfy 3NF
dependency RS → T, neither α is super key nor β is
prime attribute. Hence this functional dependency is T → R does not satisfy 3NF
invalid. Q → T does not satisfy 3NF
Q → U does not satisfy 3NF
4. (a, b, c, d)
a: true: Normal forms are used to eliminate or reduce  Those which have same left-hand side will make
redundancy in database tables. relation.
R1(P, Q, S) R2(T, R), R3(Q, T, U)
b: true: A relation is in first normal form if every
attribute in that relation is singled valued 8. (b)
attribute. For BCNF decomposition, the relation is created for
c: true: A relation is in 2NF if every candidate key is those FD which violates BCNF property. So relation
a simple candidate key. is made for QR and remove R from relation and create
two relation R1(PQST), R2(QR) and this
d: true: A relation R is in BCNF, if R is in 3rd normal decomposition is lossless.
form and for every functional dependency,
4

Any issue with DPP, please report by clicking here:- https://forms.gle/t2SzQVvQcs638c4r5


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