Atomicity: operations in a transaction either all succeed or all fail.


Consistency: The database always transitions from one consistent state to another consistent state. The integrity of the database is not broken before the transaction starts and after the transaction ends. This means that the material written must fully comply with all pre-defined constraints, triggers, cascade rollbacks, etc.


Isolation: changes made by one transaction are invisible to other transactions until they are finally committed


Persistence: once a transaction is committed, the changes made are permanently stored in the database

Atomicity is ensured by the undo log, which records log information that needs to be rolled back, and transaction rollback undoes the SQL that has been executed successfully
Consistency is ensured by the other three characteristics, the program code should ensure business consistency
Isolation is ensured by MVCC (Multiversion Concurrency Control)
Persistence is ensured by memory + redo log. mysql modifies data and records the operation in memory and redo log at the same time, so that it can be recovered from redo log in case of downtime.

Translated with www.DeepL.com/Translator (free version)


0 Comments

Leave a Reply

Avatar placeholder

Your email address will not be published. Required fields are marked *