Question:easy

Consider concurrent execution of two transactions \(T_1\) and \(T_2\) in a DBMS, both of which access a data object \(A\). For these two transactions to not conflict on \(A\), which one of the following statements must be true?

Show Hint

A conflict needs at least one write among the two operations; two transactions that only read the same item never conflict, but any pairing with a write does.
Updated On: Jul 22, 2026
  • Both \(T_1\) and \(T_2\) only read \(A\)
  • \(T_1\) reads \(A\) and \(T_2\) writes \(A\)
  • \(T_1\) writes \(A\) and \(T_2\) reads \(A\)
  • Both \(T_1\) and \(T_2\) write \(A\)
Show Solution

The Correct Option is A

Solution and Explanation

This question is about when two transactions touching the same data item A can be considered non-conflicting. In concurrency control, an operation pair conflicts only when the two operations belong to different transactions, act on the same item, and at least one of them is a write, because only then does the execution order affect the result.

  1. Both $T_1$ and $T_2$ only read $A$: reading never changes the value stored in A, so however the two reads are interleaved, both transactions see the same value and the database state after both operations is identical either way. There is no dependency on order, so this pair does not conflict.
  2. $T_1$ reads $A$ and $T_2$ writes $A$: whether $T_1$'s read happens before or after $T_2$'s write changes what value $T_1$ actually sees, the old value or the new one. Since the outcome depends on order, this is a conflicting read-write pair.
  3. $T_1$ writes $A$ and $T_2$ reads $A$: this is the same situation with the roles reversed; $T_2$'s read result depends on whether it runs before or after $T_1$'s write, so it also conflicts.
  4. Both $T_1$ and $T_2$ write $A$: the value left in A at the end depends on which write executes last, so swapping the order of the two writes changes the final state of the database. This is a conflicting write-write pair.

Only the read-read case is free of conflict, because it is the only pairing where neither operation can alter what the other one observes or leaves behind.

Let's summarize:

  • A conflict needs at least one write among the two operations; a pure read-read pair can never conflict.
  • Read-write, write-read and write-write are all conflicting because their outcome changes with execution order.

So the statement that must be true for $T_1$ and $T_2$ to not conflict on A is that both only read A, option (A).

Was this answer helpful?
0

Questions Asked in GATE CS exam