DBMS Transaction MCQs: 12 solved questions on ACID, serializability and locking

DBMS transaction MCQs with solutions: 12 solved GATE PYQ questions on ACID properties, conflict serializability, graphs, recoverability, and 2PL locking.

Prashant Jain

KnowledgeGate AI educator

13 Jul 20266 min read

Transactions carry heavy marks in GATE because the questions are procedural: name the ACID property, build the precedence graph, decide conflict serializability, and reason about 2PL and recovery. Miss one edge in the graph and the whole answer flips. Below are 12 solved MCQs from KnowledgeGate's published question bank, most of them previous-year questions with the exam and year noted. Attempt each before the explanation, which stays short on purpose. If a step is unclear, the full theory sits in the DBMS learn module. A note on the deep links: GATE PYQs carried inside the course link to their exact solved page; the others live in the same module's practice sets, so the module link above is your entry point for those.

ACID properties and transaction states

Q1. Which one of the following is NOT part of the ACID properties of database transactions? (GATE 2016)

  • (a) atomicity

  • (b) consistency

  • (c) isolation

  • (d) deadlock-freedom

Answer: (d). ACID stands for atomicity, consistency, isolation and durability, the four guarantees a transaction offers. Deadlock-freedom is a concurrency-control concern, not one of these properties. So (d) is the odd one out (see the solved page).

Q2. Once the DBMS reports a transaction as successfully completed, its effect persists even if the system crashes before all changes reach disk. This property is (GATE 2024)

  • (a) durability

  • (b) atomicity

  • (c) consistency

  • (d) isolation

Answer: (a). Durability guarantees that a committed transaction's effects survive any later failure, which is why systems flush the commit record and rely on write-ahead logging. Atomicity is about all-or-nothing execution, and isolation is about concurrent non-interference. Persistence after commit is durability (see the solved page).

Q3. For the transaction read(x); x = x - 50; write(x); read(y); y = y + 50; write(y), the requirement that the sum of x and y stays constant is a matter of (GATE 2015)

  • (a) atomicity

  • (b) consistency

  • (c) isolation

  • (d) durability

Answer: (b). A rule like "x plus y is unchanged" is an integrity constraint on database state. Consistency is the property that each transaction moves the database from one valid state to another, preserving such constraints. So keeping the sum fixed is a consistency concern (see the solved page).

Q4. The ACID properties of a transaction are (ISRO 2017)

  • (a) atomicity, consistency, isolation, database

  • (b) atomicity, consistency, isolation, durability

  • (c) atomicity, consistency, integrity, durability

  • (d) atomicity, consistency, integrity, database

Answer: (b). The four letters expand to atomicity, consistency, isolation and durability. "Integrity" and "database" are common distractors that replace isolation or durability. Only option (b) lists all four correctly.

Schedules, serializability and recoverability

Q5. Which scenario may lead to an irrecoverable error in a database system? (GATE 2003)

  • (a) a transaction writes a data item after it is read by an uncommitted transaction

  • (b) a transaction reads a data item after it is read by an uncommitted transaction

  • (c) a transaction reads a data item after it is written by a committed transaction

  • (d) a transaction reads a data item after it is written by an uncommitted transaction

Answer: (d). Reading a value written by a transaction that has not yet committed is a dirty read. If the writer later rolls back and the reader has already committed on that value, the schedule cannot be recovered. That dirty-read case is (d) (see the solved page).

Q6. Which of the following schedules on a single item x is conflict serializable? (GATE 2014)

  • (a) r1(x); r2(x); w1(x); r3(x); w2(x)

  • (b) r2(x); r1(x); w2(x); r3(x); w1(x)

  • (c) r3(x); r2(x); r1(x); w2(x); w1(x)

  • (d) r2(x); w2(x); r3(x); r1(x); w1(x)

Answer: (d). Draw the precedence graph for schedule (d): w2(x) precedes r3(x) and r1(x) giving edges T2 to T3 and T2 to T1, and r3(x) precedes w1(x) giving T3 to T1. Those edges form no cycle, so the schedule is conflict serializable. The other three each produce a cycle (see the solved page).

Q7. With P and Q initialized to zero, T1 does read(P); read(Q); if P = 0 then Q = Q + 1; write(Q), and T2 does read(Q); read(P); if Q = 0 then P = P + 1; write(P). Any non-serial interleaving leads to (GATE 2012)

  • (a) a serializable schedule

  • (b) a schedule that is not conflict serializable

  • (c) a conflict serializable schedule

  • (d) a schedule for which a precedence graph cannot be drawn

Answer: (b). Each transaction reads the variable the other writes, so any overlap creates conflicting read-write pairs in both directions between T1 and T2. That produces a cycle in the precedence graph. Hence every non-serial interleaving is not conflict serializable (see the solved page).

Q8. For S: R4(x), R2(x), R3(x), R1(y), W1(y), W2(x), W3(y), R4(y), which serial schedule is conflict equivalent to S? (GATE 2022)

  • (a) T1, T3, T4, T2

  • (b) T1, T4, T3, T2

  • (c) T4, T1, T3, T2

  • (d) T3, T1, T4, T2

Answer: (a). On y, R1(y) and W1(y) precede W3(y), giving T1 before T3, and W3(y) precedes R4(y), giving T3 before T4. On x, the reads by T3 and T4 precede W2(x), placing T2 last. Ordering these constraints yields T1, T3, T4, T2 (see the solved page).

Concurrency control and locking

Q9. Which level of locking gives the highest degree of concurrency in a relational database? (GATE 2004)

  • (a) page

  • (b) table

  • (c) row

  • (d) page, table and row give the same concurrency

Answer: (c). Coarser locks, at table or page level, block more transactions because they cover more data. Row-level locking is the finest granularity, so two transactions touching different rows never block each other. Finest granularity means highest concurrency, which is row (see the solved page).

Q10. For the schedule T1: Read(A); T2: Read(B); T1: Write(A); T2: Read(A); T2: Write(A); T2: Write(B); T1: Read(B); T1: Write(B), which is correct? (GATE 1999)

  • (a) serializable and can occur under 2PL

  • (b) serializable but cannot occur under 2PL

  • (c) not serializable but can occur under 2PL

  • (d) not serializable and cannot occur under 2PL

Answer: (d). On A, T1 acts before T2, giving edge T1 to T2; on B, T2 acts before T1, giving edge T2 to T1. Those two edges form a cycle, so the schedule is not conflict serializable. A schedule that is not serializable can never be produced by 2PL, so (d) (see the solved page).

Q11. For salesinfo(salespersonid, totalsales, commission), commissions are enhanced by 2% up to 50000, by 4% above 50000 up to 100000, and by 6% above 100000, run as three UPDATE transactions T1, T2, T3 on those slabs. Which order updates everyone correctly exactly once? (GATE 2005)

  • (a) T1 then T2 then T3

  • (b) T2 then T3, with T1 concurrent throughout

  • (c) T3 then T2, with T1 concurrent throughout

  • (d) T3 then T2 then T1

Answer: (d). Running low slabs first pushes a person's commission up into the next slab, so they get enhanced twice. Processing the highest slab first, then the middle, then the lowest, means each raised value has already passed the higher tests and cannot be re-selected. Only T3, T2, T1 avoids double counting (see the solved page).

Q12. A locked database file can be (ISRO 2009)

  • (a) accessed by only one user

  • (b) modified by users with the correct password

  • (c) used to hide sensitive information

  • (d) updated by more than one user

Answer: (a). Locking exists to prevent conflicting concurrent access, so a locked file is restricted to a single user session at a time. It is not a password or a way to hide data, and it specifically stops simultaneous updates. Exclusive single-user access is the point of the lock.

How transactions are examined

The set follows the exam's rhythm. The ACID block (Q1 to Q4) is fast recall, and the trap is always a plausible fifth property like integrity or deadlock-freedom slipped into the acronym. The serializability block (Q5 to Q8) is pure precedence-graph work: list conflicts, draw edges, test for a cycle, and read the topological order if it is acyclic. The concurrency block (Q9 to Q12) rewards knowing that finer locks raise concurrency, that a non-serializable schedule is impossible under 2PL, and how ordering avoids double updates.

For the theory that ties these together, work through our Transactions and Concurrency Control in DBMS deep dive, then drill the graphs in the DBMS learn module. GATE aspirants get the full DBMS sequence inside GATE Guidance by Sanchit Sir. Solve, redraw every graph by hand, and return to the set a week later; the second pass is where speed comes from.