Skip to Main Content
MySQL® Administrator's Bible
book

MySQL® Administrator's Bible

by Sheeri K. Cabral, Keith Murphy
May 2009
Intermediate to advanced content levelIntermediate to advanced
888 pages
20h 33m
English
Wiley
Content preview from MySQL® Administrator's Bible

Chapter 9. Transactions in MySQL

When reading about relational database management systems (RDBMSs), you will see the terms transaction and ACID compliance. A transaction is a set of SQL statements that are executed as if they were one statement. For a transaction to be finished and save data changes permanently, all the statements in the transaction have to be completed. If a transaction is not completed for any reason, the changes to the dataset that the transaction already made are removed, placing the database in its original state before the transaction began.

A transaction is a transaction only if it is ACID-compliant. ACID is an acronym that stands for atomicity, consistency, isolation, and durability. A proper implementation of these properties guarantees reliable processing of database transactions. The properties of ACID are explained in detail in the next section.

To begin understanding what transactions are and why they are important, it will be helpful to walk through an example of how transactions are used. The classic transaction example is the database system used by a bank. Consider the following situation: Ziesel wants to move $1,000 from her checking account to the checking account of her neighbor Hudson, who is selling Ziesel his car.

If Ziesel has an account id of 145356 and Hudson has an account id of 118254, ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

MySQL® Administrator's Guide

MySQL® Administrator's Guide

MySQL AB
Microsoft® SQL Server 2005 Management and Administration

Microsoft® SQL Server 2005 Management and Administration

MCDBA Ross Mistry, MCSE Chris Amaris, MCSE Alec Minty

Publisher Resources

ISBN: 9780470416914Purchase book