A | ATOMICITY | all or nothing rule. If a part of the transaction fails, whole/entire transaction fails. Atomic nature of transactions. All operations in a transaction succeed or every operation is rolled back. All transaction operations are a whole unit or atom. An atomic transaction is either fully completed, or is not begun at all. e.g.: transfer money from account A to account B. if system fails after subtracting from A, money gets returned to A. |
C | CONSISTENCY | Only valid data is written to the database. When a transaction results in invalid data, the database reverts to its previous state, which abides by all customary rules and constraints. On the completion of a transaction, the database is structurally sound. A transaction cannot leave the database in an inconsistent state. e.g.: Looking again at the account transfer system, the system is consistent if the total of all accounts is constant. If an error occurs and the money is removed from account A and not added to account B, then the total in all accounts would have changed. The system would no longer be consistent. By rolling back the removal from account A, the total will again be what it should be, and the system back in a consistent state. |
I | ISOLATION | multiple transactions occurring at the same time not impact each other’s execution. No interference. Does not ensure their order. Transactions do not contend with one another. Contentious access to data is moderated by the database so that transactions appear to run sequentially. If transactions are executed concurrently, the result is equivalent to their serial execution. |
D | DURABILITY | ensures that any transaction committed to the database will not be lost. Db backups and transaction logs facilitate restoration. Completed transactions persist, even when servers restart etc. The results of applying a transaction are permanent, even in the presence of failures. |