As we know, knowledge about database is important for backend engineer, because our daily job desk is about handling data, one of the resource is database.
In database system, especially in sql, transaction is one thing that we must concern about it. That why ACID exists. ACID stands for Atomicity, Consistency, Isolation and Durability. ACID is set standard that guarantee database transaction and processed reliability. ACID tell us how behavior of transaction, so we can recovers from any failure that might occurs in transaction process.
Then, lets talk about each component of ACID.
Atomicity guarantee that transaction that happen is succeed or failed. If there any part of transaction that fail, so all the transaction will fail at all, and will be succeed if all the transaction process is succeed.
Consistency guarantee that transaction keep the data consistent. All data will be valid according the rule like trigger and cascade.
Isolation guarantee that one transaction will not affect to another transaction until the transaction committed. So each transaction will occurs in isolation.
Durability guarantee that the transaction that succeed, will remain in the system. Even any crash or something following the transaction. So if system said the transaction succeed, that means the transaction must be in fact succeed.
Then we know that ACID concept handle when any failure occurs. Kind of failure that might happen is like this sample
Transaction failure could happen when there any invalid input or the transaction violate the data consistency.
System failure could happen when any bug on RDBMS system, operating system fault, or hardware issue.
Media failure could happen when there any fail when doing write/read from the media storage like hard disk. That caused by the media storage itself.
That is all about ACID and failure that might happen, so ACID will really important to understand.