6.3View serializability
The idea
View serializability is a weaker requirement: the schedule must give each read the same source and each item the same final writer as some serial schedule.
Think of it like this: Two accountants may reach the same final books by different routes; only the numbers that were read and the final entries matter.
Why it exists
You must tell apart conflict, view and neither, and know blind writes are the key.
How it works
- Reads-from: each read reads from the same write (or the initial value).
- Final write: each item is last written by the same transaction.
- Try the serial orders: if one matches, the schedule is view serializable.
- Conflict serializable ⊂ view serializable; the difference needs blind writes.
Worked example: r1(A) w2(A) w1(A) w3(A)
The graph has a cycle (T1 ↔ T2) but order T1 T2 T3 is view equivalent: it is view serializable, not conflict serializable.
Now play with it
- →Load the blind-writes example and compare the conflict and view verdicts.
- →Remove T3's write and see what changes.
| time → | 1 | 2 | 3 | 4 | 5 | 6 | 7 |
|---|---|---|---|---|---|---|---|
| T1 | R(A) | W(A) | Commit | ||||
| T2 | W(A) | Commit | |||||
| T3 | W(A) | Commit |
Two schedules are view equivalent if (1) every read reads from the same write (or the initial value), and (2) every item is last written by the same transaction. Conflict serializable ⊂ view serializable. A view serializable schedule that is not conflict serializable must contain a blind write (a write without a read).
Check yourself
Which is true?
Exam notes (the dense version)
Schedules are view equivalent if (1) each read reads from the same write (or the initial value), and (2) each item has the same final writer. A schedule is view serializable if it is view equivalent to some serial schedule. Conflict serializable ⊂ view serializable; a view-but-not-conflict serializable schedule must have blind writes. Testing view serializability is NP-complete.
Previous year questions: Transactions & Concurrency Control (15)
PYQs are grouped by topic, so this is the full set for Transactions & Concurrency Control; try the ones that match this subtopic. Open all 15 on the topic page.