# Transactions and serializability: GATE CS question with solution

From the GATE Daily set of 26 October 2026, question 10 of 10 (https://gatedaily.in/q/2026-10-26-schedule-recoverable-but-not-cascadeless/). Difficulty: standard.

### Q.10 · Databases · Transactions and serializability · MSQ, 1 mark (choose every correct option)

Consider the following schedule $S$ of two transactions $T_1$ and $T_2$. Here $r_i(Z)$ and $w_i(Z)$ denote a read and a write of data item $Z$ by $T_i$, and $c_i$ denotes the commit of $T_i$. Assume a single-version database in which each read returns the value of the latest preceding write to that item, or its initial value if no write precedes it.

$$S:\ r_1(X);\ w_1(X);\ r_2(X);\ r_1(Y);\ w_1(Y);\ c_1;\ r_2(Y);\ w_2(X);\ c_2$$

Which of the following statements about $S$ is/are TRUE?

(A) $S$ is conflict serializable.
(B) $S$ is recoverable.
(C) $S$ is cascadeless (it avoids cascading aborts).
(D) $S$ is strict.

**Answer:** (A) $S$ is conflict serializable; (B) $S$ is recoverable

**Solution.** **Method: check serializability separately, then check recoverability, cascadelessness and strictness from their definitions.**

*Conflict serializability.* Conflicting pairs (same item, different transactions, at least one write):

- $w_1(X)$ before $r_2(X)$, $r_1(X)$ and $w_1(X)$ before $w_2(X)$: edge $T_1 \to T_2$.
- $w_1(Y)$ before $r_2(Y)$: edge $T_1 \to T_2$.

No edge goes from $T_2$ to $T_1$, so the precedence graph is acyclic and $S$ is equivalent to $T_1 T_2$. (a) is true.

*Recoverable.* A schedule is recoverable if every transaction commits only after every transaction it read from has committed. $T_2$ reads $X$ (and later $Y$) written by $T_1$, and $c_1$ comes before $c_2$. (b) is true.

*Cascadeless.* A transaction may read a value written by **another** transaction only after that writer commits. $r_2(X)$ reads $T_1$'s value of $X$ while $T_1$ is still active. Had $T_1$ aborted at that point, $T_2$ would have to be rolled back too. (c) is false.

*Strict.* After a transaction writes an item, no **other** transaction may read or write that item until the writer commits or aborts. Strict implies cascadeless, so (d) is false as well.

**Trap.** A dirty read alone does not make a schedule unrecoverable; what matters is the **commit order** of reader and writer. Here the writer commits first, so the schedule is recoverable but still exposed to cascading aborts.

**What was tested:** the chain strict ⊂ cascadeless ⊂ recoverable, and that serializability is a separate question from recoverability.

**Remember:** Recoverable: a reader commits only after the writer it read from. Cascadeless: no transaction reads another's uncommitted write. Strict: no transaction reads or overwrites another's uncommitted write. Each is stronger than the one before.

**Why each option:**
- (A) True: every conflicting pair has T1's operation first, so the precedence graph is the single edge T1 to T2.
- (B) True: T2 reads X written by T1, and T1 commits before T2 commits.
- (C) False: r2(X) reads T1's write before T1 has committed, which is exactly a dirty read.
- (D) False: strict schedules are cascadeless, and this one reads uncommitted data, so it cannot be strict.
