Atomicity (A), consistency (C), independence (I), and persistence (D) of transactions)
1. atomicity of a transaction refers to whether a transaction is executed in full or not.
2. transaction consistency means that the transaction operation does not change the data consistency in the database. for example, if the integrity constraint is a + B = 10 and a transaction changes a, then B should change accordingly. the result of transaction execution must be that the database changes from one consistent state to another consistent state.
3. The independence of a transaction means that two or more transactions do not have the status of staggered execution, because this may cause data inconsistency. The execution of a transaction cannot be disturbed by other transactions.
4. Transaction Persistence means that after the transaction runs successfully, system updates are permanent and will not be rolled back for no reason.
Transactions generally start with begin transaction and end with commit or rollback. Commit indicates commit, that is, all operations to commit a transaction. Specifically, all the updates to the database in the transaction are written back to the physical database on the disk, and the transaction ends normally. Rollback indicates rollback, that is, a fault occurs during the transaction operation, and the transaction cannot continue. The system revokes all the completed operations on the database in the transaction, roll back to the starting state of the transaction.