• Courses
  • Tutorials
  • Jobs
  • Practice
  • Contests

Transactions and concurrency control

Question 11

Consider the following partial Schedule S involving two transactions T1 and T2. Only the read and the write operations have been shown. The read operation on data item P is denoted by read(P) and the write operation on data item P is denoted by write(P). Q39 Suppose that the transaction T1 fails immediately after time instance 9. Which one of the following statements is correct?
  • T2 must be aborted and then both T1 and T2 must be re-started to ensure transaction atomicity
  • Schedule S is non-recoverable and cannot ensure transaction atomicity
  • Only T2 must be aborted and then re-started to ensure transaction atomicity
  • Schedule S is recoverable and can ensure atomicity and nothing else needs to be done

Question 12

Which level of locking provides the highest degree of concurrency in a relational data base?
  • Page
  • Table
  • Row
  • Page, table and row level locking allow the same degree of concurrency

Question 13

Consider the following schedule S of transactions T1 and T2:
T1 T2
Read(A)A = A - 10 Read (A)Temp = 0.2*A Write(A) Read(B)
Write(A)Read(B) B = B + 10 Write(B) B = B + TempWrite(B)
  • S is serializable only as T1, T2
  • S is serializable only as T2, T1
  • S is serializable both as T1, T2 and T2, T1
  • S is serializable either as T1 or as T2
  • None of these

Question 14

Which one of the following is NOT a part of the ACID properties of database transactions?
  • Atomicity
  • Consistency
  • Isolation
  • Deadlock-freedom

Question 15

Consider the following two phase locking protocol. Suppose a transaction T accesses (for read or write operations), a certain set of objects {O1,...,Ok}. This is done in the following manner: Step 1. T acquires exclusive locks to O1, . . . , Ok in increasing order of their addresses. Step 2. The required operations are performed. Step 3. All locks are released. This protocol will
  • guarantee serializability and deadlock-freedom
  • guarantee neither serializability nor deadlock-freedom
  • guarantee serializability but not deadlock-freedom
  • guarantee deadlock-freedom but not serializability

Question 16

Suppose a database schedule S involves transactions T1, ....Tn. 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?
  • Topological order
  • Depth-first order
  • Breadth-first order
  • Ascending order of transaction indices

Question 17

Consider the following database schedule with two transactions, T1 and T2.
S = r2(X); r1(X); r2(Y); w1(X); r1(Y); w2(X); a1; a2;
where ri(Z) denotes a read operation by transaction Ti on a variable Z, wi(Z) denotes a write operation by Ti on a variable Z and ai denotes an abort by transaction Ti . Which one of the following statements about the above schedule is TRUE?
  • S is non-recoverable
  • S is recoverable, but has a cascading abort
  • S does not have a cascading abort
  • S is strict

Question 18

Consider the following three schedules of transactions T1, T2 and T3. [Notation: In the following NYO represents the action Y (R for read, W for write) performed by transac­tion N on object O.]
(S1)	2RA	2WA	3RC	2WB	3WA	3WC	1RA	1RB	1WA	1WB
(S2)	3RC	2RA	2WA	2WB	3WA	1RA	1RB	1WA	1WB	3WC
(S3)	2RA	3RC	3WA	2WA	2WB	3WC	1RA	1RB	1WA	1WB
Which of the following statements is TRUE?
  • S1, S2 and S3 are all conflict equivalent to each other
  • No two of S1, S2 and S3 are conflict equivalent to each other
  • S2 is conflict equivalent to S3, but not to S1
  • S1 is conflict equivalent to S2, but not to S3

Question 19

Which of the following statement is/are incorrect?
  1. A schedule following strict two phase locking protocol is conflict serializable as well as recoverable.
  2. Checkpoint in schedules are inserted to ensure recoverability.
  • Only 1
  • Only 2
  • Both 1 and 2
  • None

Question 20

For the schedule given below, which of the following is Correct?
1   Read A
2                               Read B
3   Write A
4                               Read A
5                               Write A
6                               Write B
7   Read B
8   Write B 
  • This schedule is serialisable and can occur in a scheme using 2PL protocol.
  • This schedule is serialisable but cannot occur in a scheme using 2PL protocol.
  • This schedule is not serialisable but can occur in a scheme using 2PL protocol.
  • This schedule is not serialisable and cannot occur in a scheme using 2PL protocol.

There are 48 questions to complete.

Last Updated :
Take a part in the ongoing discussion