Mysql transaction is a set of atomic SQL queries, or an independent unit of work. All statements within the transaction must be executed successfully or failed; the transaction must comply with "atomicity" and "consistency" sex”, “isolation”.
#A transaction is a set of atomic SQL queries, or an independent unit of work. Statements within a transaction either all execute successfully or all fail.
ACID characteristics: atomicity, consistency, isolation, and durability
Recommended: "mysql tutorial"
Transactions are one of the important features that distinguish the database system from all other file systems
A transaction is a set of atomic SQL statements, or an independent unit of work
Transactions need to meet the following characteristics:
Atomicity (ATOMICITY), definition:
A transaction must be regarded as an indivisible minimum unit of work. All operations in the entire transaction are either submitted successfully or all fail. For a transaction, it is impossible to only Execute some of the operations
Consistency (CONSISTENCY), definition:
Consistency means that the transaction transforms the database from one consistency state to another consistency state. At the beginning of the transaction The integrity of the database data before and after the transaction is not destroyed
Isolation (ISOLATION), definition:
Isolation requires that a transaction modify the data in the database before it is submitted. It is invisible to other transactions
Recommended: "mysql tutorial"
The above is the detailed content of What does mysql transaction mean?. For more information, please follow other related articles on the PHP Chinese website!