A transaction is a single operation or set of operations that succeed or fail together, thereby ensuring consistency of data should unforeseen circumstances arise. An example 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:
1. You select a car.
2. You pay for it.
3. 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 in order for our transaction to succeed. The four principles help ensure that the state of our data is atomic, consistent, isolated, and durable regardless of the success or failure of the transaction. These properties are covered in the next topic.
|
No responses found. Be the first to respond and make money from revenue sharing program.
|