AI Hints
Home›System Design Tutorial›Choosing Storage
System Design · Lesson 54 of 120

Databases Quiz

Test yourself.

⏱ 2 min read▶ Video at 1:03:36🎓 Free
Watch this lesson in the System Design courseWatch on YouTube ↗Full System Design course

Let's review databases. Pause after each question, and answer before I do.

Databases Quiz
From the video: Databases Quiz
  • 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