3.2. Tightly Coupled Single-Resource Transactions

I'll start with the simplest transaction variety, the tightly coupled single-resource transaction. Because all single-resource transactions are tightly coupled, I'll simplify the terminology by calling them single-resource transactions. Let me take you through a typical single-resource transaction involving a database.

Consider writing an application to withdraw money from a checking account. Let's say that “withdrawing money from a checking account” means the following:

1.
Finding the specific account record in the CheckingAccount table.
2.
Reading the CurrentBalance field.
3.
Deducting the amount from the current balance.
4.
Logging the withdrawal in a Logging table.

Imagine the problems that ...

Get Software Fortresses: Modeling Enterprise Architectures now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.