Read Model
ELI5 — The Vibe Check
A read model is a database view optimized specifically for reading — denormalized, pre-computed, and shaped exactly how the UI needs it. It's the display copy of your data, separate from the source of truth. Like a store window vs. the warehouse.
Real Talk
In CQRS, the read model is a data structure optimized for query operations, typically denormalized and pre-computed for fast reads. Read models are built by projecting events or changes from the write model, and can use different storage technologies (search index, cache, materialized view) optimized for specific query patterns.
When You'll Hear This
"The read model is a flat table with all the fields the dashboard needs — no joins required." / "Rebuild the read model from events whenever the query requirements change."
Related Terms
CQRS
CQRS says: the way you write data and the way you read data should be separate systems. Writing (commands) goes to one model optimized for transactions.
Event Sourcing
Instead of storing 'balance: $100', event sourcing stores 'deposited $200, withdrew $50, withdrew $50'.
Projection
A projection transforms raw events into a useful read model. Every time an 'OrderPlaced' event fires, the projection updates the dashboard table.
Write Model
The write model is the authoritative version of your data that handles all the business rules and commands. It's the master copy in the vault.