GATE 2021 Questions
GATE 2021 Questions
PQ→X;P→YX;Q→Y;Y→ZWPQ→X;P→YX;Q→Y;Y→ZW
Consider the decomposition of the relation RR into the constituent relations
according to the following two decomposition schemes.
D1:R=[(P,QS,T);(P,T,X);(Q,Y);(Y,Z,W)]D1:R=[(P,QS,T);(P,T,X);
(Q,Y);(Y,Z,W)]
D2:R=[(P,Q,S);(T,X);(Q,Y);(Y,Z,W)]D2:R=[(P,Q,S);(T,X);(Q,Y);
(Y,Z,W)]
1. ((R1∩R2)→(R1−R2))((R1∩R2)→(R1−R2)) is in F+F+ or
2. ((R1∩R2)→(R2−R1)((R1∩R2)→(R2−R1) is in F+F+
D1:R=[r1(PQST),r2(PTX),r3(QY),r4(YZW)]D1:R=[r1(PQST),r2(PTX),r3(Q
Y),r4(YZW)]
Thus x2=(QYZW)x2=(QYZW)
D2:R=[r1(PQS),r2(TX),r3(QY),r4(YZW)]D2:R=[r1(PQS),r2(TX),r3(QY),r4(
YZW)]
Option AA is correct.
1. Consider a relational table R that is in 3NF, but not in BCNF. Which one of the following
statements is TRUE?
Option (D) multiple values in a cell . i.e not atomice ( not even 1-NF)
Option (B) says X is not a super key and Y is not a prime attribute . Therefore not 3-NF
Ans (A) : Says X is not a super key but Y is a prime attribute . Satisfies one of the condition
of 3-NF formal definition
3. Which one of the following statements is NOT correct about the B+ tree data structure
used for creating an index of a relational database table?
A. B+ Tree is a height-balanced tree
B. Non-leaf nodes have pointers to data records
C. Key values in each node are kept in sorted order
D. Each leaf node has a pointer to the next leaf node
Ans. B
Sol.B+ tree non leaf node have pointer to data records is false statement. B+ tree non leaf
node consists of only keys and tree pointers (node pointers). Below is the structure of B+ tree
non leaf node
4. Consider the following two statements about database transaction schedules:
I. Strict two-phase locking protocol generates conflict serializable schedules that are
also recoverable.
II. Timestamp-ordering concurrency control protocol with Thomas’ Write Rule can
generate view serializable schedules that are not conflict serializable.
Which of the above statements is/are TRUE?
A. I only B. II C. Both I and II D. Neither I nor II
Ans. C
Sol. I. Strict 2PL guaranteed conflict serializable because of 2PL condition and also strict
recoverable.
II. Thomas Write timestamp ordering ensures serializable. Thomas write rule timestamp
ordering allowed to execute schedule which is view equal serial schedule based on
timestamp ordering.
.Ans. (5)
Total 5 different student names all 5 group records in result.(In where condition no condition
over Roll_no so query produces all groups.)
Ans. B
GATE-2013
11.Relation R has eight attributes ABCDEFGH. Fields of R contain only atomic values.
F={CH→G, A→BC, B→CFH, E→A, F→EG} is a set of functional dependencies (FDs) so
that F + is exactly the set of FDs that hold for R.
Explanation:
In a relational database, a key helps to uniquely identify each record within a table . A key is
a combination of one or more fields/attributes in a table. If a relational schema has multiple
keys,each key is a candidate key. One of the candidate keys is chosen as the primary key.
To find the candidate keys, we need to find the closure of each attribute. (If x ia an
attribute(field), set of attributes determined by x under a set F of functional dependencies is
the closure of x under F, denoted x+ ).
Thus,
A+:ABCFHGE
B+: BCFHEGA
C+:C
D+:D
E+: EABCFHG
F+:FEGABCH
G+:G
H+ : H
A+,B+,E+,F+ contains all attributes except D. Thus there are 4 candidate keys DA,DB,DE
and DF.
Consider F->G; G is a non-prime attribute and F is a proper subset of a candidate key (refer
the above question). This is a case of partial dependency. Hence 2NF condition is violated.
similarly A->C and B->CH also violates 2NF condition, hence R is not in 2NF.
So Every entity in E1 is associated with exactly one entity in E2. So options A is correct options.
Suppose a database schedule S involves transactions T ,......., T . 1 n Construct the precedence graph
of S with vertices representing the transactions and edges representing the conflicts. If S is
serializable, which one of the following orderings of the vertices of the precedence graph is
guaranteed to yield a serial schedule?
A. Topological order
B. Depth-first order
C. Breadth-first order
ANS:A
2014
prerana-gate-classes-2020-21@mgit.ac.in
prerana-gate-2018-22@mgit.ac.in
Here, RX stands for “Read(X)” and WX stands for “Write(X)”. Which one following
schedules is conflict equivalent to the above schedule?
Ans. D
Sol. R2(B) is conflicting with W1(B) so, W1(B) should always come after R2(B) W2(B) is
conflicting with W1(B) similarly, W1(B) should always come after W2(B) R2(D) is
conflicting with W1(D), so, W1(D) should always come after R2(D) R1(C) is conflicting
with W2(C) so, W2(C) should always come after R1(C)
Therefore the transaction will be:
7.
How many tuples will be returned by the following relational algebra query?
.Ans. (1)