For var cat = { name: "Mittens", age: 5 }, what does cat.name give?
You hand a key-value store one key. What comes back?
- The whole value stored under that key
- A join of several tables
- A report on the data shape
A key-value store checks the shape of your data and joins tables for you.
Circle one: True False
Which question does a document design answer badly?
- Show one post with all its comments
- The average age of all cats in every city
- Fetch the profile stored under one key
Every cat record repeats its owner city, and the owner moves. What must happen?
- Every copy must be updated, or copies will disagree
- Nothing, the copies fix themselves
- Only one copy needs the new city
A cat record holds a nested owner object with name and city. Why is the read fast?
- The database joins two tables at read time
- The city is stored on a faster disk
- The whole nested thing sits together, so one lookup returns everything
A friend stores the city in every record for speed, then says updates are free too. What is the flaw?
- Duplication buys read speed but charges work and risk on every update
- Reads become slower with duplication
- Cities can never be stored in records
Readers open one blog post with its comments at a time. Which design fits, and why?
- Normalised tables, to slow down single reads
- One document per post with nested comments, for fast single-thing reads
- No storage at all, to keep things simple