CQRS
Version 1.0.0 · Updated 2026-07-30
CORE DEFINITION
Command Query Responsibility Segregation. It separates the system's 'read' (Query) operations and 'write' (Command) operations into different models or even databases.
SCAFFOLDING EFFECT
Reduce cognitive load
Performance decoupling. If not separated, complex queries can slow down writes, and complex writes can block queries. By separating them, each can be optimized independently: 'reads' can be cached, 'writes' can be queued.
Anchor fast decisions
CQRS is an architectural extension of CQS (Command Query Separation). The core assumption is that the optimization goals of the read model and the write model are different: writes focus on consistency and business rules, while reads focus on performance and presentation. After separation, both sides can scale and model independently: the read side can be redundant and cached, and the write side can be asynchronously queued. Essentially, it is a responsibility decoupling of the contradictory needs of 'read' and 'write'.
MINIMUM ACTION
In progress 0/6Practice this model in one real situation:
account_treeGenealogyexpand_more
menu_bookReferencesexpand_more
Source support: Explicit
- en.wikipedia.orghttps://en.wikipedia.org/wiki/Command_Query_Responsibility_Segregationverified
PRIVATE NOTES · Only visible to you
SAVED Q&A
ENTRY Q&A · Private saving available
Ask with a clear boundary
thinkingmodels answers from published entry context only.
Your question is sent to thinkingmodels. The answer uses public entry context only.
RELATED MODELS