Home > Articles > Data > MySQL

  • Print
  • + Share This
This chapter is from the book


Transactions are groups of operations performed as one single work unit. The four basic properties of transactions are atomicity, consistency, isolation, and durability, which form the acronym "ACID."

To use transactions in MySQL, you must use a transaction-safe table type, such as BerkeleyDB or InnoDB. If you own NuSphere Enhanced MySQL, the transaction-safe table type is called Gemini.

A transaction fails if any operation within it fails. If none of the operations fail, then you can COMMIT the transaction, which finalizes all the changes made while it was active. If a transaction fails, use the ROLLBACK command to return all affected tables to their previous state.

  • + Share This
  • 🔖 Save To Your Account