Skip to content

KyriazisChar-bit/Database

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

🗄️ Marathon Race Management Database

A relational database for organising and managing road races — participants, editions, registrations, results, volunteers, and sponsors — implemented in MySQL and Microsoft Access.

Institution: Aristotle University of Thessaloniki (AUTh)
School: Polytechnic School — Department of Mechanical Engineering
Course: Databases
Instructor: Bechtsis Dimitrios
Author: Charitopoulos Kyriazis Semester: 7th Semester, January 2026


⚙️ Tech Stack

  • MySQL — schema definition, data insertion, SQL queries
  • Microsoft Access — parallel GUI-based implementation
  • SQL — DDL (CREATE, DROP) + DML (INSERT, SELECT)
  • InnoDB engine with full referential integrity (FK constraints, CASCADE/RESTRICT)

🏗️ Database Design

The database models the full lifecycle of a road race series held across Greece. The core design challenge was distinguishing between a race (a permanent, recurring event) and an edition (one annual instance of it) — a Master–Detail pattern that unlocks clean historical tracking.

12 tables across three layers:

Base entities — the standalone objects in the domain:

  • symmetexontes — Participants (runners), with status: student / employee / retiree
  • diorganotes — Organizers
  • agones — Races (e.g. Megas Alexandros, Athens Marathon)
  • ekdosi — Editions (annual instances of each race)
  • kathgoria_agona — Race categories: 5 km / 10 km / 21 km / 42 km
  • xorigoi — Sponsors
  • ethelontes — Volunteers

Transactional tables — records that tie participants to events:

  • eggrafes — Registrations (participant × edition-category)
  • apotelesmata — Results (net finish time per registration)
  • pliromes — Payments (amount + method per registration)

Junction tables — resolving M:N relationships:

  • ekd_kathg — Edition × Category (with start time per category per edition)
  • xorigoi_ekdosi — Sponsor × Edition
  • eidi_xorigias — Sponsorship type per sponsor-edition pair
  • ethel_ekdosi — Volunteer × Edition (with assigned role)

📁 Key Files

File Description
marathon_EN.sql Full MySQL script: schema + sample data + 3 queries (English comments)
Database_Report_EN.docx Full project report translated to English
docs/Μαραθωνιος12.docx Original Greek report (keep in docs/ for reference)
docs/marathon1.accdb Microsoft Access implementation

🚀 Quick Start

-- 1. Create and select the database
CREATE DATABASE marathons CHARACTER SET utf8mb4;
USE marathons;

-- 2. Run the full script
SOURCE marathon_EN.sql;

-- 3. Run the three queries (already at the bottom of the script)

📊 Queries

# Question Tables Used
1 Which male participants are students or retirees? symmetexontes
2 Who ran the 42 km at Megas Alexandros 2025, and what were their times? symmetexontes, eggrafes, ekd_kathg, apotelesmata
3 Which sponsors supported the Night Half-Marathon, and what did they provide? xorigoi, xorigoi_ekdosi, ekdosi, agones, eidi_xorigias

🔑 Design Decisions

Race vs Edition split — separating the permanent race from its annual instance avoids duplicating fixed attributes (name, location, organiser) across every year's data while still supporting full historical records.

Discount logic — the idiotita (status) field on participants encodes eligibility: students and retirees receive a 20% discount, enforced at application level.

Access vs MySQL — the sole structural difference between the two implementations is the eidi_xorigias (sponsorship types) table. Access handles multiple sponsorship types with a built-in lookup field on the junction table; MySQL requires a dedicated child table to avoid normalisation violations.

Faithfulness flags (known quirks in the source):

  • pliromes.tropos_plir is declared ENUM('metrita','karta') but the INSERT statements use '1' / '2' — the values will not match the ENUM in a strict MySQL mode. Left as-is from the original.
  • eidi_xorigias.eidos_xor similarly has a Greek-literal ENUM but INSERTs use numeric strings. Left as-is.

👥 Author

Field Detail
Name Charitopoulos Kyriazis
University Aristotle University of Thessaloniki
Department Mechanical Engineering

Academic coursework — Aristotle University of Thessaloniki. Not for resubmission in other academic contexts.

About

Relational database for managing marathon road races — schema design, normalisation, and SQL queries. Implemented in MySQL and Microsoft Access.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors