Members' shelf
All 9 nodes on Naming & Classification are for members only.
Pay with the email you sign in with here, so the Pass is linked to this account.
Members' shelf
All 16 nodes on System Protection & Threat Modeling are for members only.
Pay with the email you sign in with here, so the Pass is linked to this account.
Command query responsibility segregation (CQRS)
- Holds when
- When one part of a model is bent by the pull between convenient reads and strict writes, and only that part is split.
- Evidence
- Conceptual framework; Bibliography checked
- Breaks down when
- Treated as part of event sourcing, or applied to a whole system: places that never needed it pay its cost anyway.
1. What happened
Whether reading and writing should share one model or have one each is a trade-off to judge part by part. When one model serves reads and writes at once, it has to satisfy two sets of requirements pulling against each other. The write side wants strictness: normalised data, invariants that hold, every change passing its checks. The read side wants convenience: views assembled from several places, a different shape prepared for each purpose, and speed.
A model pulled from both sides ends up distorted, either loosening its structure for the sake of reading or making every query take the long way round for the sake of writing. The claim of this pattern is plain: split one model into two along the boundary between reading and writing[2]Young, G. (2010-11). CQRS Documents (PDF). Bibliographic details checked against the official record. Claims matched against the full text. A practitioner document, self-published by its author, that systematises the pattern. It says that the pattern was at first treated simply as command query separation applied at a higher level, and was deemed a different pattern only after much confusion between the two.. The write side concentrates on behaviour and consistency; the read side concentrates on projections optimised for querying.
Its ancestry is the command query separation of Meyer's 1988 classic Object-Oriented Software Construction: a method either changes state and returns nothing, or returns a value and has no side effects[1]Meyer, B. (1988). Object-Oriented Software Construction (1st ed.). Prentice Hall. Bibliographic details confirmed by two sources. The attribution of command query separation and its terms follows secondary accounts that agree with one another. The classic statement of command query separation: a method either changes state and returns nothing, or returns a value and has no side effects. It is the source of the command and query vocabulary. The relevant chapters were not checked word for word here.. That rule governs the method level, and this pattern raises the same cut to the model level.
The cut also has a scope. A 2011 piece stresses that the pattern should be applied locally, to the part actually being distorted by the conflict between reading and writing, rather than as a uniform architecture across a whole system[3]Fowler, M. (2011-07-14). CQRS. martinfowler.com/bliki/CQRS.html. Bibliographic details checked against the official record. Claims matched against the full text. The original sentence says this is a pattern the author first heard described by Greg Young. The same piece argues that it should be used only on specific portions of a system, not on the system as a whole..
2. Why this matters to you
You are already using this pattern. You have simply not brought its discipline along with it.
Anything derived for people to look at is a read model: a monthly report, a board, a page of public explanation, a summary fed to a model. Their originals live elsewhere. The reason you made them is precisely that the original's shape does not suit that purpose, which is the reason for separating, and the reason is a good one.
Separating costs exactly one thing, and that thing is structural: a projection will always lag its original. How far behind depends on how often you regenerate it, and being behind emits no signal at all. A board generated three weeks ago looks exactly like one generated today.
So this page offers three practices, and the third is the one almost nobody does.
First, before deciding whether to separate, ask whether the readers and the writers are the same people. If they are one person (your own record of decisions, say), separating is probably just one more thing to maintain. If they are not (a public page, an explanation handed to a collaborator, context fed to a model), separating is nearly always right.
Second, stamp every projection with the time it was generated. That is admitting the lag rather than pretending to be in step.
Third, and this is what the page really wants to leave you with: a projection may be prettier than the original and may never claim more than the original. Deriving makes it very easy to add something: turning a vague grade into a definite phrase, tidying a passage full of reservations into one clean conclusion. Tidying is what a projection is for. Strengthening is not. And strengthening is especially dangerous on an automatically generated surface, because it happens consistently and silently on every single page.
Lab cases 2 first-hand cases from our studio
A projection may be prettier than the source. It may not be bolder than the source.
Situation: our public knowledge pages are built with writing and reading kept apart. The write side is one content data file per node and governs the facts; the read side is the page a build program generates and governs how it reads. Every page carries a verification badge, and a lookup table picks its wording from the verification status field in the data: when the status is “completed”, the badge reads “Verified · cross-model ✓”.
Decision point: on 6 August 2026, while preparing a twelve-node shelf in management, we checked each node's verification records again. Two nodes had “completed” in the status field, but the facts could not support that wording. In one, the verification was inherited from another concept, and no round had been run for the node itself. In the other, the core content had been cross-checked by two models, while a passage added later had been checked by one model only. The lookup table would have printed the cross-model badge on both pages, and the build program's safeguard reads only the status field, so no error would have appeared.
There were at least four workable options. One, hand-write the badge on those two pages to override the derived value. Two, change the lookup table so that “completed” always prints a weaker wording. Three, lower the status field of the two nodes. Four, add an explicit verification method field to the content data and let the badge read that first.
What we did and what happened: we took the fourth option. The field had been added to the build program when another shelf was built, and 33 nodes were already using it. We filled it in for all twelve nodes: nine as cross-model and three, the two nodes included, at the lower level, preferring to under-report. The status field copies the upstream verification record, and this site does not change it; a hand-written badge risks drifting from the data later. Once rendered, all three showed the weaker badge, “Verified · multi-source ✓”. The wording has since been narrowed twice more; current pages show the minimum depth to which sources were checked: bibliographic record, abstract or full text.
Take-away: if a projection rule infers its wording from a single summary level, and that level in fact covers different situations, give the write side an explicit field so that the projection reads the fact. Do not hand-edit the output page.
When to split into two models, and when not to
At the end of August 2026 the case sections on this site's English pages all showed Chinese. The whole case block had been placed in the fact layer, and the English text may not rewrite the fact layer. There were at least four ways to get English wording in, and they differ in what goes to the English text and what stays with the source. We made the same trade-off once more for the Simplified Chinese pages and once for the coordination board.
Trigpoint Pass content · includes applicable criteria
Full access to the lab cases. Trigpoint Pass ▸
- A common account says this pattern is part of event sourcing. They are two concepts: command query responsibility segregation can sit on ordinary data access, with no need to convert to event sourcing first. Both original sources present them separately. Young's 2010 document says the two are most interesting when combined and support each other; Fowler's 2011 piece says the pattern fits well with event-based programming models. Neither says they must be used together. #
- A common account says that separating means two databases and accepting eventual consistency. The minimal form needs only two models and does not require two stores. Treating the eventual consistency of split stores as mandatory turns an optional enlargement into the definition. #
- A common account says that practitioner invented it in 2010. This site marks Young's document of November 2010 as a systematisation of the pattern; it is not the starting point. Separating reads from writes at the architectural level was written up in 2008, and the acronym was used throughout a public article in December 2009, while the vocabulary of command and query comes from Meyer's 1988 classic, Object-Oriented Software Construction. Arguing for applying it only locally belongs to Fowler's piece of July 2011, which this site also marks as the one that carried the pattern into mainstream architecture discussion. Invention, naming, the origin of the vocabulary and popularisation have to be recorded separately. #
Records how far each claim was checked, not a guarantee that it is true.
Corrections- Year of the first talk: the two first-person accounts set side by side in an earlier version (2006 and 2007) could not be checked against his own words, and the page now gives no year.
How to read the source notes “Bibliographic details checked” means author, year, title and venue were confirmed. It does not mean the source's claims were checked. “Matched against the full text” means the claim was compared with the text of the source itself. “Follows secondary accounts” means the claim rests on sources that report it, not on the original document. Definitions as of 2026-09-20.
Tell me when a new shelf opens
Tell me when a new shelf opens
Shelf notices are sent only when a new shelf opens or when the reading rules change.
Tell the editor privately: a correction, a counter-example or where it applies
Submissions are read only by the editor, and nothing is published before they are handled. Once a note is handled, a summary and response written by the editor are published. No sign-up is needed, and the nickname may be left blank.
We have your note