ACID — is a set of properties that guarantee the reliability of transactions in databases. Each transaction is a fundamental building block of data handling, and ACID ensures that it is executed correctly and without data loss even in the event of a failure.
ACID — is an acronym created from the words:
A - Atomicity
C - Consistency
I - Isolation
D - Durability
The first principle, atomicity(more details about atomic transactions I have written earlier), guarantees that a transaction is either fully completed or not executed at all. If an error occurs, all changes made during this transaction are rolled back, returning the database to its previous state. For example, if you make a payment and a network failure occurs, it will not be the case that the money was not deducted from the sender but was credited to the recipient due to the failure,
Consistency means that each transaction transforms the database from one valid state to another. Even if there are complex conditions or dependencies between records, the result of the transaction execution will always be correct.
Isolation of transactions ensures that they do not interfere with each other. If two transactions are executed simultaneously, the result of their execution will be the same as if they were executed sequentially. This is important when many actions are performed on the database at the same time.
The last principle, durability, ensures that once a transaction is completed, its results are preserved even in the event of a system failure. If the data has been written, it will not be lost upon system reboot.
Спрощена схема концепції ACID
ACID is a fundamental principle that ensures reliability, consistency, and security in transaction handling in databases, regardless of external conditions.