Modeling for queries
On This Lesson 4 topics
This lesson is planned. The outline below lists the topics it will cover. The full lesson has not been published yet.
In this lesson
design data from the questions, and relate it to CAP and PACELC.
Planned topics
- Relational: model the facts, normalize, query anything later. NoSQL: list the queries first, shape the data for them.
- Trade-off: speed and scale for known queries versus flexibility for unknown ones.
- "Schemaless" does not mean no schema: the schema lives in your code, and migrations are your job.
- CAP: during a network partition choose consistency or availability. PACELC: else (no partition), choose latency or consistency. Verify each product's actual defaults before claiming them.
Draft outline details
Demonstration
query list for reviews: (1) latest 20 for a product, (2) average rating per product, (3) all reviews by a customer; each mapped to a structure.
Check your understanding
What does "schemaless" really mean?
Show answer
The database does not enforce the schema; your application must.
Practice
Apply this lesson with the module's lab, exercises and quiz.
Marking a lesson complete is optional and you can undo it any time. Your progress stays in this browser.