What is a database transaction?

前端 未结 11 2212
耶瑟儿~
耶瑟儿~ 2020-11-27 09:34

Can someone provide a straightforward (but not simpler than possible) explanation of a transaction as applied to computing (even if copied from Wikipedia)?

11条回答
  •  离开以前
    2020-11-27 10:20

    A transaction is a sequence of one or more SQL operations that are treated as a unit.

    Specifically, each transaction appears to run in isolation, and furthermore, if the system fails, each transaction is either executed in its entirety or not all.

    The concept of transactions is motivated by two completely independent concerns. One has to do with concurrent access to the database by multiple clients, and the other has to do with having a system that is resilient to system failures.

    Transaction supports what is known as the ACID properties:

    • A: Atomicity;
    • C: Consistency;
    • I: Isolation;
    • D: Durability.

提交回复
热议问题