Chapter 3. Transaction Management

Substances owe their special importance in the enterprise of identification to the fact that they survive through time. But the idea of survival is inseparable from the idea of surviving certain sorts of change—of position, size, shape, colour, and so forth. As we might expect, events often play an essential role in identifying a substance... Neither the category of substance nor the category of change is conceivable apart from the other.

Donald Davidson The Individuation of Events

This quote from Donald Davidson comes from a paper he wrote in the field of event theory. Event theory is an entire subdiscipline of philosophy focused on the question of what it means to be an event. As a software architect for a database application, your job is to be an event theorist. Specifically, you identify what changes will occur in your database and how they combine into indivisible sequences that will not leave the database in an inconsistent state.

This is the practice of event management. You then package those indivisible events into a database operation called a transaction. A transaction is a group of database events that must execute without interference from other transactions; and they must execute together or not at all. The transaction helps you guarantee the integrity of the data in your database.

The classic example of a database transaction is the transfer of money from one bank account to another. When executing a transfer, a banking application ...

Get Java Database Best Practices 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.