Skip to content
EduVerse

ACID

In depth

Concept

Four properties (Atomicity, Consistency, Isolation, Durability) that guarantee reliable database transactions.

ACID, explained

Written by EduVerse

What it is

ACID is a set of four guarantees a database gives for transactions: Atomicity, Consistency, Isolation and Durability. A transaction is a group of changes that belong together, and ACID describes how the database keeps those changes correct, even when many users write at once or the server crashes halfway through.

Why teams use it

Picture a bank transfer: money leaves one account and arrives in another. Atomicity means both steps happen or neither does, consistency means rules like “a balance can’t go negative” still hold, isolation keeps parallel transfers from seeing each other’s half-finished work, and durability means a committed transfer survives a crash.

An example from work

In a Spring service you put @Transactional on a method that creates an order and lowers the stock. During testing the stock update fails with a runtime exception, and when you check the database, the new order isn’t there either: the whole transaction was rolled back, so you never end up with an order for stock that was never reserved.

Our own explanation, not a quote from the book.

Where it fits

Transaction management in relational databases

Coverage in the book

In depth

Covered in depth: multiple pages with explanations, examples and simulations.

Appears in