Concurrency and ACID

Concurrency is when many users are interacting with a system or many changes are being made at once.

A DBMS needs to use concurrency. However, the database needs to prevent two people using the data in a conflicting way. For example, two people visiting an online shop might try to buy the final product in store. The database would need to make sure only one person could buy it.

ACID rules

A change in a database is called a transaction. Changes to databases must conform to ACID rules:

  • Atomicity - the transaction must be completed fully. If it is not completed fully it will not be recorded.
  • Consistency - any change must not break the database. It must be consistent with how it was before the change.
  • Isolation - a transaction must be isolated and not interfere with another transaction.
  • Durability - a transaction must remain in the database.
Move on to Test
next