Database
Manage DB
Browse collections and tables, and watch the CQRS timing pipeline.
Course Splitscourse_splits
A logical milestone along a course at a cumulative distance, pointing to a physical TimingPoint.
π‘
Operational Purpose & Edge Invariants
CourseSplit links cumulative distance along a course to a physical TimingPoint. For example, on an out-and-back course, 'Mile 39.5 Outbound' and 'Mile 60.5 Inbound' are two distinct courseSplits with different sequence orders, but both point to the same physical timingPoint ('TWIN_LAKES').
Relational Connections (4)
β Belongs TocourseId
courses βCourse track containing this split.
β Belongs TotimingPointId
timingPoints βPhysical ground station where this split is recorded.
β Has ManycourseSplitId
scoredSplitTimes βMaterialized split times achieved by competitors at this station.
β Has ManysplitId
timeAllowances βMedical or hazard holds applied at this station.
Table Columns & Types (11)
course_splits| Column | PostgreSQL Type | Constraints | Default | Documentation |
|---|---|---|---|---|
| id | uuid | NOT NULLPK | gen_random_uuid() | Unique course split identifier. |
| courseId | uuid | NOT NULLFK -> courses.id | β | Course track. |
| timingPointId | uuid | NOT NULLFK -> timingPoints.id | β | Physical timing station. |
| name | text | NOT NULL | β | Split milestone name (e.g. "Twin Lakes Inbound"). |
| sequenceOrder | integer | NOT NULLUnique with courseId | β | 1-based chronological checkpoint progression order. |
| distanceFromStartMeters | double precision | NOT NULL | β | Cumulative distance from start line in meters. |
| subSplitBitmap | integer | NOT NULL | 1 | Bitmask: 1=IN (arrival), 2=OUT (departure), 3=IN+OUT (dwell tracked). |
| cutoffDurationSeconds | integer | nullable | β | Mandatory station departure cutoff duration relative to event gun start. |
| tsdIdealDurationSeconds | double precision | nullable | β | Target ideal elapsed seconds for TSD regularity rally scoring. |
| isSecretCheckpoint | boolean | NOT NULL | false | Secret regularity stage checkpoint hidden from competitor roadbooks. |
| createdAt | timestamp with time zone | NOT NULL | now() | Creation timestamp. |
Database Indexes (2)
| Index Name | Columns | Type | Query Performance Rationale |
|---|---|---|---|
| course_splits_order_idx | (courseId, sequenceOrder) | UNIQUE | Guarantees strict sequential ordering of checkpoints along a course. |
| course_splits_course_dist_idx | (courseId, distanceFromStartMeters) | INDEX | Accelerates distance-based milestone queries and elevation profile charting. |