Time Left - 20:00 mins

GATE CS : Databases Champion Quiz 4

Attempt now to get your rank among 697 students!

Question 1

Which of the following concurrency control protocols ensure both conflict serializability and freedom from deadlock?
I. 2-phase locking
II. Time-stamp ordering

Question 2

Consider the following log sequence of two transactions on a bank account, with initial balance 12000, that transfer 2000 to a mortgage payment and then apply a 5% interest.
1) T1 start
2) T1 B old=1200 new=10000
3) T1 M old=0 new=2000
4) T1 commit
5) T2 start
6) T2 B old=10000 new=10500
7) T2 commit
Suppose the database system crashes just before log record 7 is written. When the system is restarted, which one statement is true of the recovery procedure?

Question 3

Consider two transactions T1 and T2, and four schedules S1, S2, S3, S4 of T1 and T2 as given below:

Which of the above schedules are conflict-serializable?

Question 4

Consider three data items D1, D2, and D3, and the following execution schedule of transactions T1, T2, and T3. In the diagram, RD. and WD. denote the actions reading and writing the data item D respectively.

Which of the following statements is correct?

Question 5

Consider the following four schedules due to three transactions (indicated by the subscript) using read and write on a data item x, denoted by r(x) and w(x) respectively. Which one of them is conflict serializable?

Question 6

Consider the following functional dependencies in a database.
Date_of_Birth →Age,
Age →Eligibility ,
Name → Roll_number,
Roll_number →Name,
Course_number → Course_name,
Course_number →Instructor,
(Roll_number, Course_number) →Grade
The relation (Roll_number, Name, Date_of_birth, Age) is

Question 7

Consider the following schedule for transactions T1, T2 and T3:

Which one of the schedules below is the correct serialization of the above?

Question 8

If an instances of simultaneous transactions becomes infrequent, then which Concurrency Control Locking Strategy is applied?

Question 9

Consider the relation account (customer, balance) where customer is a primary key and there are no null values. We would like to rank customers according to decreasing balance. The customer with the largest balance gets rank 1. Ties are not broke but ranks are skipped: if exactly two customers have the largest balance they each get rank 1 and rank 2 is not assigned.


Consider these statements about Query1 and Query2.

1) Query1 will produce the same row set as Query2 for some but not all databases.
2) Both Query1 and Query2 are correct implementation of the specification
3) Query1 is a correct implementation of the specification but Query2 is not
4) Neither Query1 nor Query2 is a correct implementation of the specification
5) Assigning rank with a pure relational query takes less time than scanning in decreasing balance order assigning ranks using ODBC.

Which two of the above statements are correct?

Question 10

Consider the transactions T1, T2, and T3 and the schedules S1 and S2 given below:
T1: r1(X); r1(Z); w1(X); w1(Z)
T2: r2(Y); r2(Z); w2(Z)
T3: r3(Y); r3(X); w3(Y)
S1:r1(X);r3(Y);r3(X);r2(Y);r2(Z);w3(Y);w2(Z);r1(Z);w1(X);w1(Z)
S2:r1(X);r3(Y);r2(Y);r3(X);r1(Z);r2(Z);w3(Y);w1(X);w2(Z);w1(Z)
Which one of the following statements about the schedules is TRUE?
  • 697 attempts
  • 4 upvotes
  • 15 comments
Jul 5GATE & PSU CS