The ACID properties
Database transactions should be compliant to the so-called ACID properties. Such systems are called transactional and ensure that every operation, including read, write or update comply to ACID properties. ACID acronym stands for Atomiciy, Consistency, Isolation and Durability.
Atomicity: This property refers to a transaction that is treated as a single unit of work. If any operation defined within the transaction fails, then no operation will be committed and previously executed operations will be rolled back (if any) and the underlying system will be reverted back to its previous state. Atomicity prevents data loss or data corruption since transactions will only be committed if every single statement is applied successfully.
Consistency: This property ensures that all transactions adhere predefined rules such that every transaction is executed in a predictable way that will always leave the underlying system in a consistent state once it gets committed.
Isolation: A transactional database system allows multiple users to interact with it at the same time. This property ensures that concurrent transactions initiated by multiple users won’t interfere with each other such that data integrity is maintained. Any operation within a single transaction will therefore not be visible outside of that context, until the transaction is committed.
Durability: This last property ensures that whenever a transaction gets committed it will be saved and its effects will be permanent even in the event of a system failure.