tournament_scoring_systems

Tournament scoring configuration header table
SQL Tournaments Configuration
tournament_scoring_systems

Purpose

Stores named tournament scoring systems. Each scoring system is a reusable header record that defines a ruleset through its associated scoring bands.

Role in the system

tournament_scoring_systems
 └── tournament_scoring_system_bands
      ↑
tournaments.scoring_system_id

Columns

Column Type Null Notes
idint unsignedNoPrimary key
codevarchar(100)NoUnique system code
namevarchar(200)NoDisplay name
descriptiontextYesOptional descriptive text
game_systemtinyint unsignedNoGame system discriminator, default 1
is_activetinyint(1)NoAvailability flag
created_atdatetimeNoCreation timestamp
updated_atdatetimeNoLast update timestamp

Keys and indexes

  • PRIMARY KEY (id)
  • UNIQUE KEY uq_tournament_scoring_systems_code (code)
  • KEY idx_tournament_scoring_systems_game_system (game_system)
  • KEY idx_tournament_scoring_systems_active (is_active)

Relationships

Relationship Type Notes
tournament_scoring_system_bands.scoring_system_id → tournament_scoring_systems.idOne-to-manyBand/range definitions
tournaments.scoring_system_id → tournament_scoring_systems.idOne-to-manyTournaments use one scoring system

Used by

  • TO event edit/save flows
  • Tournament standings calculations
  • Admin tournament configuration

Design notes

  • This is a reusable configuration table, not event-specific data
  • The actual points-difference-to-tournament-points logic lives in child bands
  • game_system is numeric, so meaning should be documented centrally in application logic

Risks

  • Changing a scoring system in place can alter the meaning of tournaments already using it
  • game_system values are opaque without external documentation

Recommended future improvements

  • Version scoring systems rather than editing in place for live events
  • Document game_system value meanings explicitly