Command Query Responsibility Segregation (CQRS) is an architectural pattern that separates the data models and pathways for updating information (commands) from those for reading information (queries). This fundamental division allows each side to be independently optimized, scaled, and evolved. Commands, which mutate state, are processed through a command model that enforces business rules and publishes domain events. Queries, which are idempotent reads, are served by a dedicated query model often denormalized for performance, such as a materialized view in a separate database.
