CS FundamentalsModerateGATE CS · DBMS
Two transactions each read X = 100. T1 sets X = X − 30 and commits; then T2 sets X = X + 50 and commits. The final value is 150. Which anomaly occurred and which isolation property was violated?
- A. Unrepeatable read; durability
- B. Dirty read; atomicity
- C. Phantom read; consistency
- D. Lost update; isolation
Correct answer: D. Lost update; isolation
T2 overwrote T1's committed change using a stale read, so T1's update is lost (the serial result would be 120). This is an isolation failure — the interleaving is not serializable.
More DBMS and SQL questions
- Classify the schedule R2(B), W1(A), W2(A), W3(A), R1(B), W1(B), R3(A), R3(B).
- Under basic two-phase locking, a conflict-serializable schedule is equivalent to the serial schedule that orders transactions by their:
- A weak entity set Dependent (partial key dname) is owned by Employee (key eid) through the identifying relationship HasDep. Which table…
- R(A, B, C, D, E, F) has functional dependencies B → C, AF → E, AC → E, CE → A. How many prime attributes does R have?
- R(A, B, C, D, E) has functional dependencies E → AB, A → D, D → BE. Which decomposition of R is lossless-join?
- TS(T1) = 30, TS(T2) = 20, TS(T3) = 10; all read/write timestamps start at 0. Under basic timestamp ordering (no Thomas write rule), which…