Data - (Transaction|Action) Atomicity


An atomic action is one that effectively happens all at once.

  • An atomic action cannot stop in the middle: it either happens completely, or it doesn't happen at all.
  • No side effects of an atomic action are visible until the action is complete.


An example of atomicity is ordering an airline ticket where two actions are required: payment, and a seat reservation. The potential passenger must either:

  • both pay for and reserve a seat; OR
  • neither pay for nor reserve a seat.



In the context of a transaction , either all the tasks in a transaction must happen, or none of them. The transaction must be completed, or else it must be undone (rolled back).

A transaction groups task (such as SQL statements) so that they are either all committed, which means they are applied to the data, or all rolled back, which means they are undone from the data.

In database systems, atomicity (or atomicness) is one of the ACID transaction properties. In an atomic transaction, a series of database operations either all occur, or nothing occurs.

The implementation of atomicity is done through a rollback journal.


Documentation / Reference

Powered by ComboStrap