In traditional data models, where reads and writes are in synchronization every now and then with databases, it becomes very necessary to maintain the “ACID” properties pertaining to the data. Here comes the role of CQRS which stands for “Command Query Responsibility Segregation” which specifies that different data models should be used to for updating the database and read from the database. Command and Query are two operations that stand for read and writes respectively.
Traditional operations such as CRUD – create, read, update and delete are mainstream operations carried out on databases regularly. But as our needs become more sophisticated, we turn on to new and efficient ways of working with data. By separating the command and query operations means that operations run on separate logical processes, probably on a separate hardware. A change initiated in a database routes to the command model for updating the database and then later the query model for reading from database.
The main use of “CQRS”model being using it in high-performance applications to scale read and write operations. Thus, every method should either be a command or be a query that performs separate actions but not both simultaneously.
Attention reader! Don’t stop learning now. Get hold of all the important CS Theory concepts for SDE interviews with the CS Theory Course at a student-friendly price and become industry ready.
Recommended Posts:
- How to Become a Software Architect?
- Top Programming Languages for Internet of Things
- How to Keep Your Skills Updated As a Software Developer?
- How to Get Started With Open Source Contribution ?
- Top 10 Open-Source NoSQL Databases in 2020
- Top 7 Reasons to Learn Hadoop
- AWS vs Azure - Which One You Should Choose?
- Top 10 DevOps Tools That You Can Try in 2020
- 6 Tips to Supercharge Google Search Network Performance
- Plan Your Placement Strategy With Love Babbar
- 7 Best Languages to Learn IoT Development in 2020
- Top 4 Advanced Project Ideas to Enhance Your AI Skills
- How to Deal with the Changed Scenario of Jobs and Careers After COVID-19 Pandemic?
- Why Golang is so Popular Among Developers?
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.

