Transactions: Taking The Plunge

A few days ago Tim Ford (blog | twitter) put forth a challenge to describe a transaction in a non-technical fashion.  I could have replied to the post directly, but I figured it would be rather wordy.  Instead I decided to follow the lead of Janice Lee (blog | twitter) and write a post about it, providing Tim with a neat and tidy hyperlink instead.

One thought I had is that committing a transaction is like jumping off a diving board.Diving Board

It's Atomic, meaning it happens or it doesn't, there is no in-between.  If you jump off the board, you'll land in the water; the transaction is committed.  If you don't, you'll still be on the diving board as if nothing ever happened.  So long as gravity is in effect, there's no way you can jump off the board and not land in the water.

It's Consistent with respect to physics.  Matter was neither created nor destroyed, and if you left the board and are now in the water, you'll be displacing that water.  As we used to say in Physics Van, Newton's Laws of Motion are guaranteed to work at least 362 days a year, so you should be covered.

It's Isolated as each dive event is not affected by others, even if they occur at the exact same time.  Safety Bear says that no more than one person can be on a diving board at a time, so there won't be any interference from another diver on your board.  A pool may have more than one diving board, but they're always spaced such that it's not possible to interfere with the others.

Finally it's Durable, because you can't ever undo the fact that you did that dive.  Even if you exit the pool immediately and dry off there will still be evidence that you did it, such splash marks on the pool deck.  The pool will also contain slightly less water as further evidence that it happened.

And that's about it for my horrible transaction analogy.  Stay tuned until next time, where I'll compare negotiating with a SAN Administrator to removing your own spleen with a nail clipper!