Database
Manage DB
Browse collections and tables, and watch the CQRS timing pipeline.
Scored Split Timesscored_split_times
Materialized leaderboard standings, cumulative elapsed times, dwell seconds, and regularity penalties.
π‘
Operational Purpose & Edge Invariants
The Read Plane of ChekkPoint. Worker processes match raw pulses against race sequences to materialize scored split records. Contains millisecond-precision elapsed seconds, station dwell duration (IN to OUT), segment pace (sec/km), and TSD regularity deviations. Indexed heavily for instantaneous leaderboard rendering and live athlete tracking.
Relational Connections (4)
β Belongs ToentrantId
entrants βCompetitor who achieved this split.
β Belongs TocourseSplitId
courseSplits βMilestone where split was scored.
β Belongs TogoverningRawEventId
rawTimingEvents βRaw pulse that verified this split.
β Has ManysplitTimeId
splitTimeAudits βForensic modification log for any steward adjustments.
Table Columns & Types (16)
scored_split_times| Column | PostgreSQL Type | Constraints | Default | Documentation |
|---|---|---|---|---|
| id | uuid | NOT NULLPK | gen_random_uuid() | Unique scored split identifier. |
| entrantId | uuid | NOT NULLFK -> entrants.id | β | Competitor. |
| courseSplitId | uuid | NOT NULLFK -> courseSplits.id | β | Milestone checkpoint. |
| lap | integer | NOT NULL | 1 | Lap number for multi-lap events. |
| subSplitKind | subSplitKindEnum | NOT NULLEnum | β | 'in' (arrival), 'out' (departure), or 'point' (flying line). |
| absoluteTimeUtc | timestamp(3) with time zone | NOT NULL | β | Official UTC timestamp of checkpoint crossing. |
| elapsedSeconds | double precision | NOT NULL | β | Total elapsed time from start in seconds. |
| dwellSeconds | integer | nullable | β | Time spent resting inside checkpoint between IN and OUT. |
| segmentPaceSecondsPerKm | double precision | nullable | β | Calculated pace over the preceding course segment. |
| tsdDeviationSeconds | double precision | nullable | β | Motorsport TSD regularity target variance (Actual - Ideal). |
| penaltyPoints | double precision | NOT NULL | 0 | Accrued regularity or infraction penalty points. |
| stoppedHere | boolean | NOT NULL | false | Indicates competitor terminated race effort at this station. |
| dataStatus | dataStatusEnum | NOT NULLEnum | 'valid' | Status: 'provisional', 'valid', 'questionable', 'bad', 'confirmed'. |
| governingRawEventId | uuid | nullableFK -> rawTimingEvents.id | β | Raw telemetry pulse that verified this split. |
| createdAt | timestamp with time zone | NOT NULL | now() | Projection calculation timestamp. |
| updatedAt | timestamp with time zone | NOT NULL | now() | Last adjustment timestamp. |
PostgreSQL Enums (1)
enum "data_status"
| Value | Label | Domain Meaning |
|---|---|---|
| 'provisional' | Provisional | Newly calculated, pending reconciliation. |
| 'valid' | Valid | Clean, chronological, plausible velocity. |
| 'questionable' | Questionable | Pace anomaly or skipped upstream split. |
| 'bad' | Bad | Mathematically impossible (negative duration). |
| 'confirmed' | Confirmed | Manually verified and locked by Timing Director. |
Database Indexes (3)
| Index Name | Columns | Type | Query Performance Rationale |
|---|---|---|---|
| scored_split_unique_idx | (entrantId, courseSplitId, lap, subSplitKind) | UNIQUE | Guarantees that each entrant can only have one recorded split per milestone and lap. |
| scored_split_elapsed_idx | (courseSplitId, elapsedSeconds) | INDEX | High-speed index for generating instant milestone leaderboards. |
| scored_split_entrant_idx | (entrantId) | INDEX | Speeds up athlete journey and split matrix loading on individual result pages. |