Atomicity, Consistency, Isolation & Durability

Computer Science: OCR A Level, topic 3.2.9

Atomicity, Consistency, Isolation and Durability (ACID)

ACID ensures all transactions complete successfully, or if they fail, the data is left as it was before.

Atomicity

Atomicity

  • Atomicity is the classification of transactions as a single task that either passes or fails.
Consistency

Consistency

  • Consistency ensures that the data being committed as part of the transaction complies both with validation rules and referential integrity.
  • This means a record cannot be added or updated if it uses a value in a foreign key field that doesn’t exist in the linked table.
Isolation

Isolation

  • The isolation part of the principals ensures that the data is locked whilst a transaction is processing.
  • The data in the database should look the same as if all transactions happened sequentially instead of concurrently.
Durability

Durability

  • Durability ensures that once a transaction is completed, it is committed to the database and will stay in the database for good.
  • When booking your cinema tickets, the DBMS will make use of a buffer and record locks to store the individual parts of a transaction until it is all completed.
  • At this point, the transaction is committed to the database permanently.

Test yourself on Atomicity, Consistency, Isolation & Durability

  • During which principle of ACID is the transaction committed to the database permanently?

  • What does ACID stand for?

Practise this topic for free