What is Event Sourcing?
A persistence pattern that stores every state change as an immutable event, deriving current state by replaying the log.
Definition
Event sourcing records what happened—OrderPlaced, PaymentCaptured, ItemRefunded—as an append-only sequence, rather than overwriting rows with the latest state. Current state is a fold over the events, usually accelerated by snapshots, and read models are projections rebuilt at will, which pairs naturally with CQRS. The event log doubles as a complete audit trail and enables temporal queries ("what did this account look like on March 3rd?") and retroactive bug fixes by replaying with corrected logic. EventStoreDB is purpose-built for it; Kafka and Postgres tables are common substrates. The hard parts are event schema versioning and eventual consistency in projections.

