Transactions

Summary: An abstraction layer that groups several reads and writes into a single logical unit of execution.

Sources: chapter7

Last updated: 2026-04-17


A transaction is a way for an application to group several reads and writes together into a logical unit (source: chapter7). Conceptually, all the reads and writes in a transaction are executed as one operation: either the entire transaction succeeds (commit) or it fails (abort, rollback).

The purpose of transactions is to simplify the programming model for applications accessing a database. By using transactions, the application can ignore certain potential error scenarios and concurrency issues, because the database takes care of them (source: chapter7).

Key Characteristics

Transactions are typically defined by the acid properties. However, not every application needs transactions, and sometimes there are advantages to weakening transactional guarantees to achieve higher performance or availability.