Transactions provide a powerful abstraction for multiple threads to operate on data concurrently because they have the following properties:
These properties greatly simplify the reasoning required for writing concurrent applications. Developers can reason about transactions as if they run single-threaded and independently.
When the data operations in a transaction are complete, the application will normally commit it. This causes it to "take effect." In keeping with the atomicity property, a transaction that fails during execution, or that fails to commit due to a conflict with another running transaction, is then aborted and any changes it may have made are rolled back.