Cord Powell Hot Dog Tracker database schema
The Cord Powell Hot Dog Tracker database schema by Colton Bristow has 9 tables (eaters, venues, events, hot_dog_styles and 5 more), 59 columns and 10 relationships, documented column by column.
- Tables
- 9
- Columns
- 59
- Relationships
- 10
- Enums
- 4
Tables (9)
| Table | Columns | Description |
|---|---|---|
| eaters | 7 | Cord plus his benchmarks. Deliberately NOT tied to an application user account: a rival needs to be logged, not signed up -- requiring a login to record someone would silently cap the rival set at "people who installed the app", which is the wrong set. Cord needs to log the guy who beat him at a fair, and that guy will never install anything. is_principal is what makes this a Cord Powell app rather than a generic tracker. |
| venues | 5 | Where it happened. Separate from events because the same venue hosts many events, and because "Cord is bad at this one bar" is a question worth being able to ask. |
| events | 7 | Shared context for many sessions (one event, several competitors). Optional: a session with no event is casual eating, which is most of the data. |
| hot_dog_styles | 7 | A competition dog and a gas-station roller dog are not the same unit of work. Without this table, every cross-session comparison quietly assumes they are. |
| condiments | 2 | Small lookup. Exists so condiment use can be correlated with pace, which is the entire reason anyone argues about condiments. |
| sessions | 13 | One sitting. hours_fasted and body_weight_kg are here because "why was that run good?" is unanswerable after the fact -- they cost two columns now and cannot be reconstructed later. |
| session_dogs | 9 | THE CORE TABLE -- one row per hot dog. This grain is the whole point of the schema. sequence_no + seconds_from_start give the pace curve and locate "the wall" (the dog number where the gap between consecutive dogs blows up), which is the real physical limiter. fraction_eaten keeps the final partial dog honest. Expect this table to dominate row count. That is fine and intended: a 70-dog contest is 70 rows. |
| session_dog_condiments | 2 | Hangs off the individual dog, not the style or the session: condiment use changes mid-run (dog 1 is dressed, dog 40 is not), and that change is exactly the signal worth capturing. |
| personal_records | 7 | 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. |
Enums (4)
- session_kind
- contest, practice, casual
- session_status
- in_progress, completed, abandoned, reversal
- bun_condition
- dry, dunked_water, dunked_liquid, discarded
- record_kind
- most_dogs, fastest_10, best_pace_5min, longest_streak
Document your own schema
This page is published from DB Planner, a collaborative ER diagram tool. Write the schema in the DBML editor or import it from SQL, then publish docs like these from the project's sharing settings.