What Is a Transaction?
A transaction is a single operation or set of operations that succeed or fail together as a whole, thereby ensuring consistency of data should unforeseen circumstances arise. One scenario might be a financial transaction. For example, let’s say you buy a car. The single transaction of buying a car consists of three distinct operations:
You select a car.
You pay for it.
You drive the car off the lot.
Skipping any of these steps could cause major angst to one or more of the parties involved. This is a simple example of a set of steps that must always occur together in a consistent manner.
Transactions allow us to ensure consistency in our data through four basic principles. These principles provide a set of rules that must be followed ...
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.
Read now
Unlock full access