CloudSketch AI Logo
FeaturesTemplatesPricingEnterpriseAboutContactLog in
🌙☀️
Log inStart free
Home/Templates/Sports & Fitness

🏅 Sports & Fitness · Database ERD

Sports Player and Team Schema

A schema for a sports league: teams, players, squads per season, matches, match events and player statistics.

More Sports & Fitness templates

Opening a template is free and never counts toward your daily diagrams. Asking the AI to change it counts as one.

Drawing diagram…

What this diagram shows

  • Players join team squads per season
  • Match events (goals, cards, wickets) are stored individually
  • Statistics are aggregated from events

Prompt used

ERD for a sports league: Season has Teams through SquadMemberships of Players; Match is between a home Team and an away Team at a Venue in a Season; MatchEvent records each event (goal, card, substitution, wicket) with minute and player; PlayerStat aggregates appearances and goals per player per season.

Mermaid code
erDiagram
  SEASON ||--o{ MATCH : schedules
  TEAM ||--o{ SQUAD_MEMBERSHIP : fields
  PLAYER ||--o{ SQUAD_MEMBERSHIP : "plays for"
  SEASON ||--o{ SQUAD_MEMBERSHIP : "valid in"
  VENUE ||--o{ MATCH : hosts
  MATCH ||--o{ MATCH_EVENT : records
  PLAYER ||--o{ MATCH_EVENT : involved
  PLAYER ||--o{ PLAYER_STAT : "summarised in"
  MATCH {
    int id PK
    int season_id FK
    int home_team_id FK
    int away_team_id FK
    int venue_id FK
    datetime kickoff
  }
  MATCH_EVENT {
    int id PK
    int match_id FK
    int player_id FK
    string type
    int minute
  }
  PLAYER_STAT {
    int player_id FK
    int season_id FK
    int appearances
    int goals
  }

Inside this diagram

An entity relationship diagram with 8 tables, 15 columns and 8 relationships.

Tables and their columns

  • SEASON
  • MATCH: id (PK), season_id (FK), home_team_id (FK), away_team_id (FK), venue_id (FK), kickoff
  • TEAM
  • SQUAD_MEMBERSHIP
  • PLAYER
  • VENUE
  • MATCH_EVENT: id (PK), match_id (FK), player_id (FK), type, minute
  • PLAYER_STAT: player_id (FK), season_id (FK), appearances, goals

Relationships

  • SEASON schedules MATCH: each SEASON has zero or more MATCH, each MATCH belongs to exactly one SEASON
  • TEAM fields SQUAD_MEMBERSHIP: each TEAM has zero or more SQUAD_MEMBERSHIP, each SQUAD_MEMBERSHIP belongs to exactly one TEAM
  • PLAYER plays for SQUAD_MEMBERSHIP: each PLAYER has zero or more SQUAD_MEMBERSHIP, each SQUAD_MEMBERSHIP belongs to exactly one PLAYER
  • SEASON valid in SQUAD_MEMBERSHIP: each SEASON has zero or more SQUAD_MEMBERSHIP, each SQUAD_MEMBERSHIP belongs to exactly one SEASON
  • VENUE hosts MATCH: each VENUE has zero or more MATCH, each MATCH belongs to exactly one VENUE
  • MATCH records MATCH_EVENT: each MATCH has zero or more MATCH_EVENT, each MATCH_EVENT belongs to exactly one MATCH
  • PLAYER involved MATCH_EVENT: each PLAYER has zero or more MATCH_EVENT, each MATCH_EVENT belongs to exactly one PLAYER
  • PLAYER summarised in PLAYER_STAT: each PLAYER has zero or more PLAYER_STAT, each PLAYER_STAT belongs to exactly one PLAYER

Make your own diagram like this

Describe your own system in plain English and the AI ER diagram generator draws it in seconds, in the same style as this template.

Related templates

Data FlowSports & Fitness

Live Sports Score Data Flow

How live scores reach millions of fans within a second: official scorers, the data feed, stream processing, caching and push notifications.

DeploymentProSports & Fitness

Fitness App with Wearables Deployment

Where each part of a fitness tracking product runs: the wearable, the phone app that syncs it, and the cloud services for workouts, goals and coaching.

C4 ArchitectureProSports & Fitness

Sports League Management Platform

A platform to run an amateur or professional league: team registration, fixtures, match scoring, standings and fan apps.

SequenceSports & Fitness

Match Ticket Booking Sequence

How a fan books tickets for a big match: queue, seat selection with a temporary hold, payment and a mobile ticket with QR code.

GanttSports & Fitness

Tournament Schedule

A timeline for organising a multi-team tournament: registrations, league stage, knockouts, final and the work around it.

State MachineSports & Fitness

Gym Membership Lifecycle

The states of a gym membership: trial, active, frozen, expiring, renewed, lapsed and cancelled.