
By treating the recording of multiple entries as an atomic transactional unit of work the system maintains the integrity of the data recorded. Credit €100 to Groceries Expense AccountĪ transactional system would make both entries - or both entries would fail.If one writes a check for €100 to buy groceries, a transactional double-entry accounting system must record the following two entries to cover the single transaction: In double-entry accounting every debit requires the recording of an associated credit. When this happens it is often important to ensure that all such processing leaves the database or data store in a consistent state.Įxamples from double-entry accounting systems often illustrate the concept of transactions.

A single transaction consists of one or more independent units of work, each reading and/or writing information to a database or other data store. Further, the system must isolate each transaction from other transactions, results must conform to existing constraints in the database, and transactions that complete successfully must get written to durable storage.ĭatabases and other data stores which treat the integrity of data as paramount often include the ability to handle transactions to maintain the integrity of data. Transactions provide an "all-or-nothing" proposition, stating that each work-unit performed in a database must either complete in its entirety or have no effect whatsoever. Database practitioners often refer to these properties of database transactions using the acronym ACID. Without isolation the programs' outcomes are possibly erroneous.Ī database transaction, by definition, must be atomic, consistent, isolated and durable.


