ACID

Atomicity

  • A user can think of a transaction as always executing all its actions in one step, or not executing any actions at all

  • DBMS logs all actions so that it can undo the actions of aborted transactions

  • A transaction might commit after completing all its actions, or it could abort (or be aborted by the DBMS) after executing some actions

Consistency

  • Users are responsible for ensuring transaction consistency

    • When run to completion against a consistent database instance, the transaction leaves the databases consistent

  • Database consistency - the property that every transaction sees a consistent database instance

Isolation

  • Guarantee that even though transactions may be interleaved, the net effect is identical to executing the transactions serially

  • For example, if transactions T1 and T2 are executed concurrently, the net effect is equivalent to executing

    • T1 followed by T2, or

    • T2 followed by T1

  • The DBMS provides no guarantee of effective order of execution

Durability

  • DBMS uses the log to ensure durability

  • If the system crashed before the changes made by a completed transaction are written to disk, the log is used to remember and restore these changes when the system is restarted

  • This is handled by the recovery manager