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.
- Top 5 CyberSecurity Companies in 2020
- How to convert an existing callback to a promise in Node.js ?
- What is Search Engine and Google Page Ranking?
- How to use a div as content for Twitter's Popover?
- How to change favicon dynamically?
- How to count number of notification on an icon?
- Demur-rage currencies in Blockchain
- Role of Computers in Crime
- How does BlockChain support Crowdfunding ?
- Creating a simple JSON based API using Node.js
- Top 7 Free Keyword Research Tools in 2020
- How to detect Browser Language in PHP?
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to firstname.lastname@example.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.