GATE / CS ARCHIVE

GATE CSE 2025 SET 2 / QUESTION 27

GATE CSE 2025 Set 2 Q27

Database Management Systems · Transactions & Concurrency Control · Full GATE CSE 2025 Set 2 paper

GATE 2025 Set 2, Q27 1 mark · MSQ
Report issue

Transactions & Concurrency Control

Question 27, GATE 2025: Two joint holders simultaneously transfer ₹10000 each from account A to B. Both transactions read A's initial balance as ₹11000 and are allowed to finish. B receives two ₹10000 credits, but A is debited only once and ends at ₹1000. Which ACID properties are certainly violated?
Options: A. atomicity; B. consistency; C. isolation; D. durability.
Tap to enlarge
Select all that apply
Answer & solution

Official answer: B, C

A typical interleaving is: T1 reads A=11000; T2 reads A=11000; each computes 11000−10000=1000; T1 writes A=1000 and T2 overwrites it with the same value. Both credits to B survive. This is a lost update.

Isolation fails because the result is not equivalent to executing the two valid transfers serially. After the first transfer, a serial second transaction would observe A=1000, not the original 11000; it could be rejected for insufficient funds or, if overdraft were permitted, debit to −9000. Neither serial behavior produces the reported one-debit/two-credit result.

Consistency also fails: A decreases by only 10000 while B increases by 20000, so the transfer has created 10000 of aggregate balance rather than conserving it. Atomicity need not fail: both transactions may have executed all their own read/write steps and committed, with the race occurring between otherwise complete transactions. Durability is about retaining committed results despite later failures, and no such loss after a failure is described. Thus only B and C are certain.

Original paper, page 22 · Answer key