~/talk

Foreign keys, isolation levels, and Van Halen

Talkat RoachFest 2023 · 2023-10-03..10-04· [databases]
links:none on file
slides:none on file

Claim: foreign keys are a practical litmus test—like the brown M&M rule—for whether a database actually enforces transactional invariants. Demonstrates using manual existence checks, application-level status checks, and explicit FOR SHARE lock semantics versus relying on database-enforced foreign key constraint checks. Points out SERIALIZABLE guarantees the manual pattern works without racing, while weaker isolation requires locks. Notes many sharded systems forbid foreign keys, which is a concrete red flag about correctness and operational tradeoffs.

AI-written summary · about

  1. 0:00Welcome/Introduction
  2. 0:15What was Van Halen brown M&M's policy in their rider?
  3. 2:02Why foreign key constraints are similar to Van Halen's brown M&M rule
  4. 2:20What are foreign key constraints?
  5. 4:49INSERT with foreign key constraints
  6. 5:21Manual foreign key constraints
  7. 6:55Application level constraints
  8. 7:57Concurrency (Safe in SERIALIZABLE isolation)
  9. 9:23Explicit locking
  10. 11:26What do foreign key constraints have to do with Van Halen?
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.