Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8479891
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T19:09:31+00:00 2026-06-10T19:09:31+00:00

As I understand CQRS advocates separating read models from domain models and having a

  • 0

As I understand CQRS advocates separating read models from domain models and having a particular read model for every necessary domain model projection.

From usage point, how the read model is stored and retrieved should be transparent – you issue a query and get a read model without caring about how it is made.

Many examples and articles use separate tables for storing read models and re-generating them by response to domain model changes.

I do not really like this approach because of the following reasons:

  • Not all possible read models will be needed often;
  • Requirement changes might invalidate existing read models so all of them will need to be regenerated;
  • If for some reason read model contains properties that cannot be stored on generation but need to be calculated you are forced to use stored procedures/functions/views;
  • Since read models are separate from domain models in case application-level caching is used on domain model change you need to inform all applications that old read models need to be evicted from cache;
  • Sometimes it is not possible nor desirable to denormalize complex object graph fully therefore you need to have read models that are consistent for particular domain entity version, that is they need to be generated in same transaction;
  • Some domain entities have properties that change frequently but need to be included in every read model.

Based on this I am thinking of having query services should:

  • For read models that need to be generated frequently and/or are simple projections of domain entities: do not store them but produce them via ORM by querying domain model entities in database;
  • For read models that don’t need to be generated frequently and are complicated domain entity projections generate them and store in database tables.

Also I see some people suggest storing read models as blobs. The problem with storing read models as blobs is that in case you will need to search on them you will need to extract properties for indexing and if you need full text search even you have to store them in a format that can be understood by full text tools.

As you can see, I will basically want to have read model that exists after query execution only and is not generated based on domain change events. Is this solution acceptable for CQRS? The reason I am looking into CQRS is to improve application architecture by separating cacheable view models from user action handling, have AJAX enabled web applications with asynchronous updates after user actions, and reduce the room for junior developers to produce unmaintainable code by placing business logic all over the place and even non-faithful implementation of CQRS to me seems like good step into right direction.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T19:09:33+00:00Added an answer on June 10, 2026 at 7:09 pm

    CQRS does not require that the read model is stored in separate tables (or documents if you use a document database), although this often is a good approach and works well in combination with event sourcing. A read model can be backed by a database view or ORM query for instance.

    This might be a good approach when introducing CQRS to parts of a legacy system.

    The approach you’re suggesting here has been suggested before, for instance see this post by Ayende; I think it’s called “thin read model” or similar. I’d say go for it.

    You might be interested in reading

    • Jimmy Bogard’s article on myths in CQRS.
    • Ayende’s “limit your abstractions” series of posts, starting here
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I understand, from MSDN, that ClassInitialize is to mark a method that will do
I understand these are necessary...of course to write proper code, but is there a
I understand what read and write do when used as a properties but I'm
One of the basic tenets of CQRS, as I understand it, is that commands
Getting into CQRS and I understand that you have commands (app layer) and events
I understand the purpose of both kernel and user mode, and how transitions from
I understand Dart compiles to JavaScript, and I read the Dart Language Spec on
We are currently evaluating CQRS and Event Sourcing architectures. I am trying to understand
I understand the main function of the lock key word from MSDN lock Statement
I understand that passwords should be encrypted in databases to protect them from hackers

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.