Recognizing conflicting transaction operations
Transactions & Concurrency Control

Answer & solution
Official answer: A
Givens and goal
Two distinct concurrent transactions T1 and T2 both access object A. Which access pattern avoids a conflict on A? A both only read; B T1 reads,T2 writes; C T1 writes,T2 reads; D both write.
Approach
Apply the same-object, different-transaction, at-least-one-write definition.
Step-by-step solution
1. Two operations conflict when they are from different transactions, access the same data item, and at least one is a write. The first two conditions are already given here.
2. Two reads do not change the object. Swapping their order does not change either observed value, so read-read is the nonconflicting pair.
3. In read-write or write-read, swapping order can change the value read. In write-write, it can change which written value remains. Hence B, C, and D all contain a conflict.
4. Therefore all accesses by both transactions to A must be reads, giving A. This local absence of conflict on A does not establish that the complete transactions have no conflicts on other objects.
























