Event sourcing stores every change as an immutable event instead of just current state.
Traditional: Store current account balance ().
Event sourced: Store all events (deposited , withdrew , withdrew ).
Benefits:
- Complete audit trail
- Replay to any point in time
- Debug by replaying exact sequence
Challenges:
- Schema evolution for old events
- Eventual consistency (projections lag)
- Storage grows indefinitely
Use when audit trail is required or you need temporal queries.