personal_records table

The personal_records table in the Cord Powell Hot Dog Tracker schema has 7 columns, keyed by id, with 2 foreign keys to eaters and sessions.

CACHE, not source of truth -- every row here is derivable from session_dogs. It exists so the leaderboard does not re-scan the full history on every page load. Recompute on session completion AND on any status change to a reversal, or records go stale in the one direction nobody thinks to check. Rows exist for rivals too, so "Cord vs the field" is one query against one table.

Columns (7)

Columns of the personal_records table
ColumnTypeConstraintsDescription
iduuidprimary key
eater_iduuidnot null, references eaters.id
kindrecord_kindnot null
valuenumeric(8,2)not nullUnits depend on kind -- see the record_kind enum. fastest_10 is seconds, where lower wins.
session_iduuidreferences sessions.idThe run that set it. Keeps the record auditable.
achieved_attimestamptznot null
updated_attimestamptznot null

Indexes (2)

  • (eater_id, kind) unique
  • (kind)

Relationships