| Approach | Notes |
|---|---|
| Copy-on-write snapshot per transaction | take a full snapshot at each begin — simple to reason about but O(N) memory per transaction |
| Undo log / undo buffer | record the previous value of each key before overwriting; on rollback, replay the undo log in reverse — O(writes) memory, the production-grade answer). |