The Story That Explains View Serializability
So if a chaotic, interleaved sequence of read/write actions produces the same final whiteboard as some simple "one person at a time" sequence, the chaotic version is effectively view equivalent to the orderly one. The boss can't tell them apart from the photo.
That is exactly the idea of view serializability — a more forgiving correctness criterion than conflict serializability. It accepts more schedules as "safe" because it cares about what the data looks like, not the exact order of every conflict.
A schedule S is view serializable if it is view equivalent to some serial schedule of the same transactions. View equivalence is defined by three strict rules about reads and writes, covered in the next section. The class of view-serializable schedules is strictly larger than the class of conflict-serializable schedules — every CS schedule is VS, but some VS schedules are not CS.
Academic view: some clearly correct schedules contain "useless" intermediate
writes that create false cycles in the precedence graph, making them look unsafe to the
conflict test even though their final result matches a serial one. View serializability is
the precise mathematical fix for that.
Industry view: view serializability is not used as the runtime
check in real databases because testing it is NP-complete. It's a
theoretical tool that tells us how much concurrency we are leaving on the table by sticking
to the cheaper conflict-serializability test.
The Three Rules of View Equivalence
Two schedules S1 and S2 (over the same transactions) are view equivalent if and only if all three conditions hold for every data item:
"Same first read, same who-wrote-what-you-read, same last write." If all three match between your schedule and some serial ordering of the same transactions, it is view serializable.
Blind Writes — The Star of This Topic
A blind write is a Write operation on a data item by a transaction that has not previously Read that same item. The transaction is "blind" to the current value — it just overwrites it.
| Step | Operation |
|---|---|
| 1 | T2: W(X) = 50 |
| (no R(X) anywhere before in T2) |
| Step | Operation |
|---|---|
| 1 | T2: R(X) |
| 2 | T2: W(X) = R(X) + 10 |
Without blind writes, view serializability and conflict serializability are equivalent. Every schedule that is view serializable is also conflict serializable — and vice versa. Blind writes are the only source of the gap between the two classes. Every "VS but not CS" example you will ever meet contains at least one blind write.
What Is a Blind Write? — Examples Table
Section 03 introduced the idea. This section is a reference table you can come back to whenever an exam question or interview asks "is this write blind?". The formal definition first, then a worked-example table you can memorise.
A blind write Wi(X) is a write operation on data item X by transaction Ti such that Ti has not executed Ri(X) before Wi(X) within the same transaction. The "blindness" refers to Ti not knowing the current value of X — it simply overwrites whatever was there.
Worked Examples — Spot the Blind Writes
Each row below shows the operation sequence of one transaction. The third column tells you whether each Write in that sequence is blind, and why.
| # | Transaction Operations | Blind? | Reason |
|---|---|---|---|
| 1 | W(A) | YES | The transaction writes A with no prior read of A anywhere. Pure blind write. |
| 2 | R(A), W(A) | NO | R(A) precedes W(A) in the same transaction → informed write. |
| 3 | R(B), W(A) | YES | Reading B does not "inform" the write on A. Blindness is checked per item. |
| 4 | R(A), R(B), W(A), W(B) | NO · NO | Each item read before being written. Neither write is blind. |
| 5 | W(A), R(A), W(A) | YES · NO | The first W(A) is blind (no prior R). The second W(A) follows R(A), so it is informed. Each Write is evaluated independently. |
| 6 | R(A), W(B), W(A) | YES · NO | W(B) is blind (no R(B) anywhere). W(A) is informed because R(A) precedes it. |
| 7 | W(A), W(A) | YES · YES | Both writes are blind — an earlier write by the same transaction does not count as a "read", because writing does not inform you of the prior value. |
| 8 | R(A) in T1, then W(A) in T2 | YES | Different transactions! Blindness is checked within one transaction. T2 did not read A → W(A) by T2 is blind. |
Trap 1: Blindness is per item — reading B never makes W(A) informed (row 3). Trap 2: Blindness is per transaction — another transaction's read does not inform your write (row 8). When in doubt, ask: did THIS transaction read THIS item before this Write?
Industry Examples — Where Blind Writes Show Up in Real SQL
Most application code does not produce blind writes, but a few common SQL patterns do. Recognising them helps you anticipate where the CS-vs-VS gap can actually matter in production.
| SQL Statement | Blind? | Why |
|---|---|---|
| INSERT INTO orders VALUES (…) | YES | Inserts create new rows — no prior read possible. Every INSERT is a blind write. |
| UPDATE accounts SET balance = 0 WHERE id = 7 | YES | The new value (0) does not depend on the old. No SELECT precedes it → blind. |
| UPDATE accounts SET balance = balance + 100 WHERE id = 7 | NO | The right-hand side reads balance first to compute the new value. Implicit read → not blind. |
| SELECT … FOR UPDATE then UPDATE | NO | The explicit SELECT supplies the prior read. This is the safe, common pattern. |
| DELETE FROM cache WHERE key = 'x' | YES | DELETE writes (removes) without needing to read the value first → counts as blind. |
In real systems, blind-write-heavy workloads — bulk INSERTs, cache invalidations, audit log appends — are exactly the cases where the gap between view and conflict serializability could theoretically buy you more concurrency. Engines do not exploit it (the NP-complete test is too expensive), but knowing the pattern helps you understand why these workloads sometimes scale better under weaker isolation levels.
The Hierarchy — Where Does VS Sit?
Each ring strictly contains the smaller ones. The ring difference VS − CS is non-empty only because of blind writes.
| Class | Test Cost | What It Catches | Used In Practice? |
|---|---|---|---|
| Serial | O(1) — obvious | Trivially safe | Too slow to be useful |
| Conflict Serializable | Polynomial (precedence graph) | Most useful safe schedules | Yes — 2PL, SSI |
| View Serializable | NP-complete | A few extra schedules with blind writes | No — only theoretical |
| All Schedules | — | Includes anomalous ones | Not safe |
The Algorithm — How to Check View Serializability
Numerical 1 — VS But NOT CS (The Classic Blind-Write Example)
Consider this widely cited textbook schedule with three transactions and one data item A:
| Time | Transaction 1 | Transaction 2 | Transaction 3 |
|---|---|---|---|
| t1 | R(A) | ||
| t2 | W(A) | ||
| t3 | W(A) | ||
| t4 | W(A) |
Step 1 — Conflict Serializability Check
Red arrows: cycle T1 ↔ T2 → conflict-serializability fails. But before giving up, we must check for blind writes.
The cycle T1 ↔ T2 rules out conflict serializability. We cannot stop here — the schedule may still be view serializable. Next step: look for blind writes.
Step 2 — Blind Write Check
Blind writes exist → the schedule might still be view serializable. Now we test each of the 3! = 6 serial orders against the three view-equivalence rules.
Step 3 — Find a View-Equivalent Serial Schedule
In S1: the first read of A is by T1, and the last write of A is by T3. No transaction reads a value written by another (there is only one read overall, and it happens before any write). So any serial schedule satisfying these is view equivalent to S1.
S1 is view equivalent to the serial schedule T1 → T2 → T3. The "useless" intermediate write W2(A) is overwritten by W3(A) and never read — its order doesn't actually matter for any reader. This is the gap between VS and CS in action.
Numerical 2 — NOT View Serializable (No Blind Writes)
Consider this schedule:
| Time | Transaction 1 | Transaction 2 |
|---|---|---|
| t1 | R(A) | |
| t2 | R(A) | |
| t3 | W(A) | |
| t4 | W(A) |
Step 1 — Conflict Serializability
Cycle T1 ↔ T2 → not conflict serializable. Check blind writes next.
Step 2 — Blind Write Check
Cycle in precedence graph and no blind writes anywhere. By the rule from Section 03, the schedule cannot be view serializable. Stop here — no need to try the six serial orders. This is also the classic lost update anomaly.
Numerical 3 — Three Transactions, Blind Write Saves the Day
Consider:
| Time | Transaction 1 | Transaction 2 | Transaction 3 |
|---|---|---|---|
| t1 | R(A) | ||
| t2 | W(A) | ||
| t3 | R(A) | ||
| t4 | W(A) |
Step 1 — Conflict Serializability
Cycle T1 ↔ T2 in red. Conflict-serializability fails — investigate blind writes.
Step 2 — Blind Write Check
Step 3 — Find a View-Equivalent Serial Schedule
Observations about S3 we must preserve:
Now look for a serial order that preserves all three. Try T2 → T3 → T1:
Rule 1 fails. Try T1 → T2 → T3:
Rule 3 fails. The last write in S3 is T1, but no serial order ending in T1 can let T3 read T2's value and have T1's read come first — you can verify by trying T2 → T1 → T3 and the remaining permutations. Every one fails at least one rule.
Despite the presence of a blind write in T2, no serial order of {T1, T2, T3} is view equivalent to S3. The blind write made it possible for VS to hold — but possibility is not certainty. This is the educational point: blind writes are necessary but not sufficient for VS-but-not-CS.
Side-by-Side Recap — The Three Verdicts
Academic View vs Industry View
| Aspect | Detail |
|---|---|
| Definition | View equivalence to some serial order |
| Rules | Initial read, updated read, final write |
| Class size | Strictly larger than CS |
| Test cost | NP-complete in general |
| Source of extra class | Blind writes |
| Aspect | Detail |
|---|---|
| Used at runtime? | No — too expensive to verify |
| What engines use | Conflict serializability (2PL, SSI) |
| What is lost | A few extra valid schedules with blind writes |
| Practical impact | Negligible — blind writes are rare in real workloads |
| Use today | Teaching, theory of concurrency |
Real databases never compute view serializability. The NP-completeness alone kills it; on top of that, blind writes are uncommon in well-written application code (most writes either follow a read of the same row or are inserts). The polynomial conflict-graph test catches essentially everything that matters, and locks/SSI prevent cycles before they occur. View serializability survives as a teaching device that shows where the theoretical ceiling sits.
Rapid-Fire Concept Check
| Question | Answer |
|---|---|
| The three rules of view equivalence | Initial read, updated read, final write |
| A write without a prior read in that transaction is called | Blind write |
| If a schedule is conflict serializable, is it view serializable? | Yes (always) |
| If a schedule is view serializable, is it conflict serializable? | Not necessarily |
| Without blind writes, VS = ? | CS |
| The complexity of testing view serializability | NP-complete |
| Cycle in precedence graph and no blind write → verdict? | Not view serializable |
| Cycle in precedence graph and blind write → verdict? | Might or might not be VS — test serial orders |
| Number of serial orders to try for k transactions | k! |
| What real-world DBMS engines use instead | Conflict serializability (2PL, SSI) |