Transaction handling is one of the most important elements of an enterprise application.
A transaction is a unit of work that provides an all or nothing property to the operation that is running within its scope. Furthermore, it guarantees that shared resources (for example, database records or messages in a messaging broker) are protected from access by multiple users that try to change them concurrently. The transaction is in a block of inseparable sequences of operation—to guarantee the integrity of the data, all of the operations, included in a transaction, must be terminated with a successful change of the state of your data (in this case, the transaction is defined as committed). Otherwise, none of them must take effect (in this case, the transaction is rolled back, or aborted).
You can think of a transaction as a sort of mechanical aid to achieve data...