System Design · Lesson 54 of 120
Databases Quiz
Test yourself.
Let's review databases. Pause after each question, and answer before I do.

- Databases quiz
- Pause and think
- Then check
Question 1
Reads are slow because the database checks every row. What usually helps? An index on the searched column.
Quick check
Every row is checked:
Question 2
Copies of the database that answer reads are called what? Read replicas.
Quick check
Copies that serve reads?
Question 3
Which shard key is best for a shop's orders? Customer ID. It spreads evenly, and keeps each customer's orders together.
Quick check
Best shard key:
Question 4
During a network split, a CP system does what? It refuses some requests, rather than return stale data.
Quick check
A CP system, during a split:
Question 5
Where should product photos live? In object storage, with a CDN in front.
Quick check
Product photos go in...
Summary
Brilliant. Next, a new section on caching, starting with why caches matter so much.
Key takeaways- Indexes
- Replicas and shards
- Object storage
Next up: Why Caching — memory beats disk