Previous year Gate DBMS Questions


1.Consider a B+ tree in which the maximum number of keys in a node is 5.What is the minimum number of keys in any non-root node?
a)4 b)3 c)2 d)1.

2.Which of the following concurrency control protocols ensure both conflict serializibilty and freedom from deadlock?
1.2 phase locking.
2.Time stamp ordering.
(a)1 only (b)2 only ©Both 1 and 2 (d)Neither 1 nor 2.

3.The following functional dependencies 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 S contain 100 tuples ,what is the maximum number of tuples possible in the natural join of R and S?
a)100 b) 200 c)300 d)2000

  1. Maximum number of keys = 5. Hence, max children = 6. Min children = 6 / 2 = 3. So, min keys = 3 - 1 = 2 .

  2. 2 phase locking may contain deadlock. Time stamp ordering is deadlock free as well as serialize.

  3. B becomes candidate key for R. So, there are 200 tuples in R. Natural join of R and S happens
    on B. But s contains only 100 tuples. So, maximum 100 tuples can be obtained in natural join
    of R and S.

  1. Answer is “c”
    Order = 5+1 = 6
    Minimum children in a non root node = ⌈⌈ Order2Order2 ⌉⌉ = ⌈⌈ 6262 ⌉⌉ = 3
    Keys = Minimum children in a non root node - 1 = 2

2 .Answer is B.

2PL ensures conflict serializability but is not deadlock free.

Timestamp ordering ensures conflict serializability because if any action causes violation in serializability order that was being followed from beginning of schedule, then the transaction is rolled back and again started with new timestamp.

It also ensures freedom from deadlock because there are no locks… which means no mutual exclusion.

3.Answer: (A)


From the given set of functional dependencies, it can be observed that B is a candidate key of R. So all 200 values of B must be unique in R. There is no functional dependency given for S. To get the maximum number of tuples in output, there can be two possibilities for S.

  1. All 100 values of B in S are same and there is an entry in R that matches with this value. In this case, we get 100 tuples in output.
  2. All 100 values of B in S are different and these values are present in R also. In this case also, we get 100 tuples.