- Traditionally we store the state in the database, and read from that database itself
- In CQRS, we store series of command in some kind of event store.
- Basically we save the history, and from this history we can "aggregate". and find the current value of the state
- But since, rebuilding the state from the history is expensive. We have some kind of "projection" that keep the current state
- If we use the same database we can use Materialized Views
- Or if we use separate database, we need some kind of service to keep the sync between the events/history to the "projection"
- Hence this pattern is related to
- Resource