Define the unit of work
A transaction can include reads and writes. Committing makes its successful changes final within the database's transaction rules. Rolling back abandons the changes made by that transaction. The boundary determines which operations belong to the same unit.
Atomicity describes the all-or-nothing property of that unit. Consistency concerns preserving defined database rules. Isolation concerns how concurrent transactions interact. Durability concerns retaining committed changes through failure. Together these properties are commonly called ACID.
Hypothetical example: moving an item
Imagine a collection database that records which shelf holds an item. Moving an item requires removing its association with one shelf and adding its association with another. If only the removal were saved, the item could appear to have no location.
Grouping the related updates in a transaction allows them to succeed together or be rolled back together. This example describes records in a database. It does not mean that a physical item moves automatically or that a mistaken physical move can be undone by software.
The boundary has limits
A database transaction does not by itself make every surrounding activity atomic. A message sent to another system, a printed label or a physical action may sit outside its control. Understanding where the transaction ends is essential to understanding its promise.
Isolation also needs context. Database systems offer different isolation levels, with different behavior for concurrent work. A general explanation of transactions cannot replace the rules documented for a particular system and configuration.
Check what completion means
Write down the condition that must hold afterward: in the shelf example, the intended recorded location. Then consider interruptions. Ask what a reader could see during the change and what should happen if confirmation is lost. The answers reveal assumptions about completion.
General educational material. Examples do not describe company operations.