Back to list
Lv.3

Transaction

Transaction

A mechanism that treats multiple operations as one unit, so they either all succeed or all fail.

In Simple Terms

A transaction is a mechanism that handles a set of operations together, so that either all of them succeed or all of them are undone. For example, when you sign up for a service, your account info and initial settings might be saved in two separate places, and signing up only counts as complete once both succeed. If an error hits partway through and only one of them gets saved, whatever was already written is automatically undone, so you never end up with a half-finished account.

Behind the Name

It comes from Latin: trans- ("through") and agere ("to do" or "to drive"), literally "carrying something through." Originally it meant a settlement, where both sides gave ground to end a dispute. It later came to mean a business or banking deal. IT borrowed it because several operations get bundled into one deal that either goes through fully or not at all.

Take a Closer Look!

A transaction is a mechanism that treats several related data operations as one unit and guarantees that they either all succeed or all get undone. It's a basic rule for keeping data accurate in databases and similar systems.
Put simply, it's a safeguard that keeps your data from being left in a half-finished state when a process stops midway.

For example, transferring 10,000 yen from bank account A to account B takes two steps: subtracting 10,000 yen from A, and adding 10,000 yen to B. If an error stops things right after the money leaves A, that money just vanishes and the numbers no longer add up.
With a transaction, the changes are only made final when both steps succeed. If something fails along the way, everything is automatically rolled back to how it was before you started.

This mechanism is widely used wherever accuracy matters, such as banking, inventory management for online shops, and ticket booking systems. It also protects against collisions when many people try to change the same data at once, so the content doesn't get corrupted.
That's why it's an essential technology behind the scenes of apps and web services that handle money or stock.