awesome-everything RU
↑ Back to the climb

Databases

Relational model: free-recall review

Crux Free-recall prompts across the relational-model unit. Answer each in your own words first, then reveal the model answer and compare.
Your altitude — climbing toward senior
ZeroJuniorMiddleSenior
You are at senior altitude — in orbit
◷ 14 min

Retrieval beats re-reading. For each prompt, say or write a full answer from memory before you open the model answer — the effort of recall is what makes the schema-design instincts stick.

Goal

Reconstruct the unit’s core mechanisms — keys, 3NF, the JSONB decision rule, FK economics, physical storage, and zero-downtime schema change — without looking back at the lessons.

Recall before you leave
  1. 01
    What is the difference between a candidate key and a primary key, and why is the 2026 default a surrogate primary key plus a UNIQUE NOT NULL on the business key?
  2. 02
    Why is 3NF the production-default normal form, and what are the two legitimate directions to leave it?
  3. 03
    State the decision rule for JSONB versus a typed column versus a side table, with one example of each.
  4. 04
    What does a foreign key actually cost, what does it buy, and under what specific conditions is disabling it a defensible engineering choice?
  5. 05
    Explain the TOAST mechanism and the two performance implications it has for schema and query design.
  6. 06
    Describe the expand-then-contract pattern and explain why it is required to rename a column on a large shared-schema table with zero downtime.
Recap

If you reconstructed each answer from memory, you hold the unit’s spine: identity lives in an immutable surrogate key while business keys are guarded by UNIQUE NOT NULL; 3NF stops two rows from disagreeing and denormalization is a measured exception with explicit reconciliation; the JSONB/typed-column/side-table choice is driven entirely by how you query the value; foreign keys are cheap insurance you keep unless a specific scale constraint forces otherwise; physical storage (TOAST, page alignment) makes SELECT * on wide rows expensive; and a live schema changes through expand-then-contract, never an in-place break.

Continue the climb ↑Relational model: design and migrate a multi-tenant schema
shortcuts expand
search
K
prev piece
k
next piece
j
cycle tier
t
this menu
?
sources3
expand
  1. 01
  2. 02
  3. 03

Trademarks belong to their respective owners. Editorial reference only.