Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

The term "segregation" is used in the CQRS pattern.

What's the difference between segregation versus separation in this case?

share|improve this question
The difference is the word... The words are synonyms. They mean the same in this context. – Oded Sep 17 '12 at 8:54
I hate that, yes they are synonymous, but only partly. Segregate is separation into sets, it's the end result, the categories that is important. Separation is one step of segregating. Step one, identify the members of the sets, step two separate along those bounds. – Ian Sep 17 '12 at 9:24
up vote 8 down vote accepted

To try and answer your question, lets look at where the pattern came from.

Command Query Separation (CQS) where the querying will not change the state of the object (Only the commands would). The key point (in this context) is a class would consist of both Commands and Queries.

Command Query Responsibility Segregation (CQRS), holds the same principal logic (commands can alter the state and queries do not alter the state) and takes it one step further. Where the Commands are in different classes (even a different model) to the Queries.

As mentioned the Separation and Segregation are synonymous in the English language, however the patterns model their classes slightly differently to achieve this goal.

this is my understanding, and hopefully this may shed light on the context.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.