Implement a Database with Commit and Rollback
Implement a simple in-memory database that supports nested transactions using begin, commit, and rollback operations. Rollback should only revert the current transaction, while commit should persist all nested transaction changes.
Asked at:
IBM
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
All Regions
Early May, 2026
IBM
Senior
You can have nested begin, rollback only reverts current one. And commit commits everything.
Hello Interview Premium
Your account is free and you can post anonymously if you choose.