February 2018
Intermediate to advanced
406 pages
9h 55m
English
Materialized views are the simplest form of CQRS. If we assume that the updates to products happen less frequently as compared to the reads on the product and category, then we can have two different models supporting the getProduct (for an ID) and getProducts (for a given category).
The search query getProducts goes against this view, while the traditional getProduct based on the primary key goes to the regular table.
This should be pretty easy if supported by a database such as Oracle. If a database does not support a materialized view by default, it can be done manually if there is a need, by manually updating statistics or summary tables when the main product table is updated using triggers ...
Read now
Unlock full access