Skip to content

About

Normalized PostgreSQL schema for sports tournaments — teams, players, venues, games, stats

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 

Repository files navigation

Tournament Database System — PostgreSQL

A relational database designed and implemented for managing sports tournament data, including teams, players, venues, games, and per-game statistics.

Schema Overview

The database is normalized to 3NF and covers the full lifecycle of a tournament:

Table Description
tournament Tournament name and date range
venue / court Physical locations and courts
team / coach / team_coach Teams with coaches and coaching history
player / roster Players and per-tournament roster assignments
tournament_team Seedings, divisions, and pools
game Scheduled games with court and time
game_team Per-game team participation
player_game_stats Individual player statistics per game

Key SQL Features Used

  • JOIN across multiple tables for cross-entity queries
  • GROUP BY with aggregates for stat summaries
  • Subqueries and CTEs for complex filtering
  • B-tree and Hash indexing analyzed with EXPLAIN plans
  • Transaction isolation and concurrency concepts
  • Foreign key constraints with CASCADE on drop

Running It

Requires PostgreSQL. To initialize the schema:

psql -U postgres -d cst363_project -f ariya_briscoe_project.sql

Or with Docker:

docker run --name pg -e POSTGRES_PASSWORD=yourpassword -p 5432:5432 -d postgres
psql -h localhost -U postgres -f ariya_briscoe_project.sql

Tech

  • Database: PostgreSQL
  • Tools: Docker, psql
  • Concepts: Schema normalization (3NF), indexing strategies, transactions, SQL query optimization

About

Normalized PostgreSQL schema for sports tournaments — teams, players, venues, games, stats

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors