Skip to content

Transaction

  • a transaction is the SQL unit of work
  • it consists of queries, updates, etc.
  • the transaction must end with
    • Commit - store updates made by the transaction
    • Rollback - ignore any updates made by the transaction
  • an atomic transaction is one that is either fully executed or fully rolled back

ACID properties

  • Atomicity - happens as a whole or none at all
  • Consistency - consistency is maintained before and after the consistency
  • Isolation - transactions can occur independently of each other simultaneously
  • Durability - changes are written to the permanent storage even if power failure occurs during writing