All lessons in Software Engineering: Programs, Systems, and Maintainable Software

Transactions, Isolation, and Concurrent Borrowing

Demonstrate a conflicting loan attempt and preserve the one-active-loan invariant.

45 minutes · Members lesson · preview

What you will learn

  • Explain atomicity and isolation as different guarantees.
  • Trace a concurrent borrowing conflict and identify its enforcement point.
  • Choose an engine-specific transaction strategy and verify its failure behavior.

The application checks that copy C17 is free, then inserts a loan. A second connection performs the same check before the first commits. Both checks are accurate at the time they run, yet the combined outcome can violate the one-active-loan rule unless the write boundary enforces it.

Transactions group operations, but the word transaction alone does not specify every concurrency guarantee. You need the isolation behavior, constraints, and failure handling of the database actually in use.

Choose another lesson