Definition: A business transaction is a real-world business action or process that accomplishes a specific business goal, often involving an exchange of money, products, information, or services. (ScienceDirect)
In software, one business transaction can involve multiple operations or systems that together complete that business action—for example, buying a product. (IBM)
3 examples
-
Buying a product
Place order ↓ Check inventory ↓ Take payment ↓ Create order ↓ Send confirmationAll of this together represents the business transaction: “Purchase Product.”
-
Booking a flight
Select flight ↓ Reserve seat ↓ Process payment ↓ Issue ticketThe business goal is “Book a flight.”
-
Bank transfer
Account A: -$100 Account B: +$100Both changes belong to the business action “Transfer $100 from A to B.” If you’re talking specifically about the database transaction, the two changes should be handled as one atomic unit so they don’t partially succeed. (Microsoft Learn)
Business transaction vs. database transaction
This distinction is very important:
Business transaction = what the business wants to accomplish.
Database transaction = how database operations are grouped to safely make changes.
For example, “Buy a laptop” is a business transaction, while the database might use several transactions/operations to update the order, inventory, payment record, etc. A business transaction can therefore be larger than a single database transaction, especially when multiple services or systems are involved. (ScienceDirect)