PrepCity

Event sourcing and CQRS

Open the lab

By the last page, this is the design you will have built. Drag it, or Show all, to see every part.

Lesson · 14 pages · about 12 min

Event sourcing and CQRS

A row that holds only the current balance cannot say why it is 40 or what it was last Tuesday. Event sourcing stores every change as an append-only event and folds them into state; CQRS feeds separate read models from those events.

Words you’ll learn

  • Row
  • Event sourcing
  • Event
  • Stream
  • Snapshot
  • Time travel
  • Audit record
  • Cache
  • CQRS
  • Read model

Page by page