Transaction
A sequence of database operations treated as a single atomic unit. Either all operations succeed (commit) or none of them do (rollback).
What is Transaction?
A sequence of database operations treated as a single atomic unit. Either all operations succeed (commit) or none of them do (rollback).
Transaction is a foundational concept that sits in the Database Fundamentals area of system design. Engineers reach for it whenever they need to reason about real-world trade-offs in that space — not just for textbook correctness, but because real production systems at companies like Netflix, Amazon, and Google make these decisions every day.
If you want to go deeper than this definition — with diagrams, code, and a quiz to lock it in — work through the "Transaction" lesson linked below. It walks through the why, the mechanism, the trade-offs, and how the giants actually use it in production.
Learn Transaction in depth
Full interactive lesson with diagrams, code examples, real-world references, and a quiz.
Open the Transaction lessonRelated lessons
Lessons that touch on Transaction as part of a larger topic.
Distributed Transactions
Coordinating atomic operations across multiple nodes, the hardest problem in databases
advanced · distributed systems core
Transactional Outbox Pattern
Guarantee that your database write and message publish either both happen or neither does
intermediate · messaging event systems
Two-Phase Commit
The classic distributed transaction protocol, prepare, then commit, and pray the coordinator doesn't crash
advanced · distributed systems core
Saga Pattern
Long-lived transactions without distributed locking, orchestration vs choreography for microservices
advanced · distributed systems core
ACID Properties
Database transaction guarantees that keep your data correct
foundation · core fundamentals
See also
Related glossary terms you might want to look up next.
ACID
Four guarantees for database transactions: Atomicity (all or nothing), Consistency (valid states only), Isolation (no interference), Durability (changes persist).
Two-Phase Commit
A protocol ensuring all nodes in a distributed transaction either commit or abort together. Phase 1: prepare (vote). Phase 2: commit or rollback.
Isolation Level
Controls how much one transaction can see changes made by other concurrent transactions. Ranges from Read Uncommitted (fastest, least safe) to Serializable (slowest, safest).