Transaction in Database? ACID. 什么是数据库事务?
A transaction symbolizes a unit of work performed within a database management system, and it is independent with other transactions but they are coherent and reliable. So in short, it represents any changes in the database.
It has four properties: ACID
Atomicity(we do it all or don‘t do it at all),
consistency(the results of some concurrent operations and sequential operations must be the same),
isolation(make sure the transactions are not impacted by others),
durability(even if something is wrong, we have to guarantee that the results).
The ACD part is guaranteed by the log file in DBMS
The I part is guaranteed by the lock mechanism of DBMS.

浙公网安备 33010602011771号