Serializability Questions with Answers

25 practice questions on Serializability (DBMS) with answers and step-by-step solutions. Try 10 samples below, then practise all 25 free in the AptiNest app.

Sample questions

Question 1Easy

A precedence (serialization) graph is used to test for:

  1. Cascading rollback
  2. Lossless decomposition
  3. Conflict serializability
  4. Deadlock between two transactions

Answer: C. Conflict serializability

Explanation

Nodes are transactions and edges are conflicting operation pairs; an acyclic graph means the schedule is conflict serializable.

Step-by-step solution

  1. One node per transaction.
  2. An edge Ti -> Tj for each conflict where Ti's operation comes first.
  3. If the graph is acyclic, the schedule is conflict serializable.

Why the other options are wrong

  • A. Cascading rollback is checked by looking at reads of uncommitted data.
  • B. Lossless decomposition uses FDs, not schedules.
  • D. Deadlocks are found with a wait-for graph.

Tip: Precedence graph = serializability; wait-for graph = deadlock.

Question 2Easy

A serial schedule is one in which:

  1. All operations are reads
  2. Transactions run one after another without interleaving
  3. Transactions run in timestamp order with interleaving
  4. No transaction commits

Answer: B. Transactions run one after another without interleaving

Explanation

Serial schedules are always correct (consistent) but give no concurrency.

Step-by-step solution

  1. In a serial schedule, one transaction runs all its operations before the next starts.
  2. No operations from different transactions are interleaved.

Why the other options are wrong

  • A. A serial schedule can contain writes.
  • C. Any interleaving makes it non-serial, even in timestamp order.
  • D. Transactions in a serial schedule normally commit.

Tip: Serial means no interleaving at all.

Question 3Easy

Two operations from different transactions conflict when they access the same data item and:

  1. Both are writes only
  2. At least one of them is a write
  3. They belong to the same transaction
  4. Both are reads

Answer: B. At least one of them is a write

Explanation

Read-read pairs never conflict; read-write, write-read and write-write pairs do, because swapping them can change the result.

Step-by-step solution

  1. Operations conflict if they are from different transactions,
  2. access the same data item,
  3. and at least one of them is a write.

Why the other options are wrong

  • A. Read-write pairs also conflict.
  • C. Operations within one transaction never conflict in this sense.
  • D. Two reads never conflict.

Tip: RR = no conflict; RW, WR, WW = conflict.

Question 4Easy

A schedule is called serializable when it is:

  1. Executed on a single CPU
  2. Free of reads
  3. Always deadlock-free
  4. Equivalent to some serial schedule

Answer: D. Equivalent to some serial schedule

Explanation

Serializability is the standard correctness criterion for concurrent schedules.

Step-by-step solution

  1. An interleaved schedule may still produce the same result as running the transactions one at a time.
  2. If it is equivalent to some serial order, it is serializable.
  3. Equivalence is usually checked as conflict or view equivalence.

Why the other options are wrong

  • A. A single CPU can still interleave operations unsafely.
  • B. Serializable schedules can contain reads.
  • C. Serializability is about the final effect, not about deadlock.

Tip: Serializable means equivalent to some serial schedule.

Question 5Medium

Classify the following schedule (Ci means Ti commits):

W1(A) R2(A) C2 C1
  1. Recoverable but not cascadeless
  2. Cascadeless but not strict
  3. Not recoverable
  4. Strict

Answer: C. Not recoverable

Explanation

T2 reads A written by the uncommitted T1 and commits before T1, so if T1 aborts, T2's committed result is based on data that never existed.

Step-by-step solution

  1. T2 reads A written by T1 (uncommitted).
  2. T2 commits before T1 commits.
  3. If T1 later aborted, T2's commit could not be undone: not recoverable.

Why the other options are wrong

  • A. Recoverable needs T1 to commit before T2.
  • B. Cascadeless forbids reading uncommitted data.
  • D. Strict is even stronger than cascadeless.

Tip: Reader commits before writer = not recoverable.

Question 6Medium

The following schedule is conflict serializable. Which serial order is it equivalent to?

R1(A) R2(B) W1(A) R3(A) W2(B) W3(A) R1(B)
  1. T3 -> T1 -> T2
  2. T1 -> T3 -> T2
  3. T2 -> T3 -> T1
  4. T2 -> T1 -> T3

Answer: D. T2 -> T1 -> T3

Explanation

Precedence graph edges: T1 -> T3, T2 -> T1. The only topological order is T2 -> T1 -> T3.

Step-by-step solution

  1. On A: R1(A), W1(A) come before R3(A), W3(A): T1 -> T3.
  2. On B: W2(B) before R1(B): T2 -> T1.
  3. Edges T2 -> T1 -> T3: the order is T2, T1, T3.

Why the other options are wrong

  • A. T1 must come before T3.
  • B. T2 must come before T1.
  • C. T1 must come before T3.

Tip: Topological sort of the precedence graph = serial order.

Question 7Medium

Is the following schedule conflict serializable?

R1(A) W1(A) R2(A) W2(A) R1(B) W1(B) R2(B) W2(B)
  1. Yes
  2. No
  3. Only if T1 commits first
  4. It is view serializable only

Answer: A. Yes

Explanation

Precedence graph edges: T1 -> T2. The graph is acyclic, so the schedule is conflict-equivalent to T1 -> T2.

Step-by-step solution

  1. Every conflict on A has T1 first (R1, W1 before R2, W2).
  2. Every conflict on B also has T1 first.
  3. Only edge T1 -> T2: conflict serializable as T1, T2.

Why the other options are wrong

  • B. There is no edge from T2 to T1.
  • C. Serializability does not depend on commit order.
  • D. It is conflict serializable, which also makes it view serializable.

Tip: All edges one way = serializable.

Question 8Medium

Is the following schedule conflict serializable?

R1(A) R2(A) W1(A) W2(A)
  1. Yes
  2. No
  3. Only if T1 commits first
  4. It is view serializable only

Answer: B. No

Explanation

Precedence graph edges: T1 -> T2, T2 -> T1. The graph has a cycle, so the schedule is not conflict serializable.

Step-by-step solution

  1. R1(A) before W2(A): T1 -> T2.
  2. R2(A) before W1(A): T2 -> T1.
  3. Cycle, so not conflict serializable.

Why the other options are wrong

  • A. The precedence graph has a cycle.
  • C. Commit order does not change conflict serializability.
  • D. Both transactions read the initial A, which no serial order allows, so it is not view serializable either.

Tip: R1 R2 W1 W2 on one item = lost update = not serializable.

Question 9Hard

Which statement about strict schedules is correct?

  1. Strict schedules are always serial
  2. Every strict schedule is cascadeless, and every cascadeless schedule is recoverable
  3. Every recoverable schedule is strict
  4. Cascadeless schedules may be non-recoverable, because they still permit reads of uncommitted data

Answer: B. Every strict schedule is cascadeless, and every cascadeless schedule is recoverable

Explanation

Strict ⊂ cascadeless ⊂ recoverable. Strict 2PL produces strict schedules.

Step-by-step solution

  1. Recoverable: a transaction commits only after the transactions it read from commit.
  2. Cascadeless: transactions read only committed data, which also makes them recoverable.
  3. Strict: no read or overwrite of uncommitted data, which also makes them cascadeless.
  4. So strict is a subset of cascadeless, which is a subset of recoverable.

Why the other options are wrong

  • A. Strict schedules can interleave; they only restrict access to uncommitted data.
  • C. Recoverable schedules may still allow dirty reads, so they need not be strict.
  • D. Cascadeless schedules forbid reading uncommitted data.

Tip: Strict is a subset of Cascadeless, which is a subset of Recoverable.

Question 10Hard

Classify the following schedule (Ci means Ti commits):

W1(A) W2(A) C1 C2
  1. Strict
  2. Recoverable but not cascadeless
  3. Not recoverable
  4. Cascadeless but not strict

Answer: D. Cascadeless but not strict

Explanation

No transaction reads uncommitted data, so it is cascadeless; but T2 overwrites A while T1 is still uncommitted, so it is not strict.

Step-by-step solution

  1. No transaction reads uncommitted data, so it is cascadeless (and recoverable).
  2. W2(A) overwrites A written by uncommitted T1.
  3. Strict forbids reading or writing an item until its last writer commits, so it is not strict.

Why the other options are wrong

  • A. T2 writes A before T1 commits.
  • B. There is no read of uncommitted data.
  • C. There are no reads at all, so recoverability holds.

Tip: Strict = no read or write of uncommitted data.

Practise all 25 questions free

The full question bank with timed practice, progress tracking and Vidya, your AI tutor. Free, no ads.

Open this topic in the app →

Related topics

See all DBMS topics · All topics