In a database where multiple transactions run concurrently, it is possible for two transactions to write the same data item at around the same time. If both are allowed to write freely, the final result may be inconsistent or may not respect the logical order of the transactions.
The Thomas Write Rule is a simple but powerful rule used mainly in timestamp‑based protocols to optimize concurrent writes and avoid unnecessary conflict checks. It helps the DBMS decide when a write can be safely ignored instead of causing a rollback or blocking.
What Is the Thomas Write Rule?
The Thomas Write Rule says:
If a transaction with timestamp is about to write a data item, but the data item’s write timestamp is greater than , then:
The write by is obsolete (too old).
It can be ignored, as if the write never happened.
In simple terms:
A “younger” transaction has already written the item.
An “older” transaction’s write cannot change the final value, so it is dropped instead of being rejected or rolled back.
This rule optimizes concurrent writes by reducing rollbacks and allowing more transactions to proceed peacefully.
Example
Suppose data item X has:
Current write timestamp (WT) = 100.
Now two transactions arrive:
with timestamp 120 (newer):
Writes X; update WT(X) = 120.
with timestamp 90 (older):
Tries to write X.
WT(X) = 120 > 90 → by Thomas Write Rule, ’s write is ignored.
The final value of X is the one written by , which is correct because is logically younger and should override older writes.
Why Thomas Write Rule Is Used
Reduces rollbacks:
Instead of rejecting an “old” write and aborting the transaction, the system can quietly ignore the write and let the transaction continue.
Improves throughput:
More transactions can complete without being blocked or rolled back.
Compatible with serializability:
The rule respects the logical order of timestamps, so serializability is still preserved.
Common in timestamp‑based protocols:
Thomas Write Rule is especially useful in systems that already associate timestamps with transactions and data items.
How It Differs from Normal Write Rules
Ordinary timestamp rules might reject or rollback an old write that conflicts with a newer write timestamp.
The Thomas Write Rule is more lenient: it does not abort the transaction; it just discards the write when it cannot affect the final state.
This makes it an optimization of the basic timestamp rules rather than a completely different scheme.
Why It Matters for Beginners
Thomas Write Rule shows that not every conflicting write has to cause a rollback; some can just be ignored.
It helps explain how timestamp‑based concurrency control can be both correct and efficient by letting older transactions fade away when newer ones have already acted.
Summary
The Thomas Write Rule in DBMS is a concurrency‑control rule used to optimize concurrent writes in timestamp‑based protocols. It states that if a transaction’s timestamp is older than the current write timestamp of a data item, its write can be ignored as obsolete instead of being rejected or rolled back. This rule reduces unnecessary rollbacks, improves performance, and still preserves serializability by respecting the logical timestamp order between transactions.