ACID properties:
- Atomicity:-
- Execution of a transaction should be either complete or nothing should be executed at all i.e. either all the operations of transaction should be executed or none of them.
- No partial transactions are allowed.
- Consistency:-
- Execution of transaction in isolation preserves the consistency of DB.
- It is a state in which only valid data will be returned to database.
- If due to some reasons, a transaction violates the DB consistency, entire transaction will be rollback and DB will be resorted to a consistent state.
- Isolation
- This property ensures that each transaction must remain unware of other concurrently executing team.
It keeps multiple transaction separated from each other until they are completed.
For e.g.: When transaction changes bank account balance other transaction connect see the new balance until transaction commits.
- Durability
- This property guarantees that the database will keep track of change in such a way that server can recover from abnormal termination.
After a transaction completes successfully, the changes it has made to database persist, even if the system fails.