Database Schema - IzzatFirdaus/uma_musume_race_planner GitHub Wiki

The application uses a MySQL database named uma_musume_planner. The schema is designed to be relational, with a central plans table linked to several child tables.

Main Tables

  • plans: The core table that stores all general information for a single training plan. This includes the plan title, trainee name, status, growth rates, and the path to the trainee's image (trainee_image_path).
  • activity_log: Stores a timestamped list of recent actions taken in the application.

Child Tables (Linked to plans)

All child tables use ON DELETE CASCADE, meaning all related data is automatically deleted when a parent plan is removed.

  • attributes: Stores the core stats (SPEED, STAMINA, POWER, GUTS, WIT) for a plan.
  • skills: A list of skills associated with a plan.
  • goals: The career goals for a plan and their results.
  • race_predictions: Stores detailed predictions for upcoming races.
  • terrain_grades, distance_grades, style_grades: These three tables store the aptitude grades for a plan. They use a UNIQUE KEY on (plan_id, type) to enable efficient UPSERT operations.
  • turns: Stores turn-by-turn stat progression, used to power the Progress Chart.

Lookup Tables

These tables provide consistent labels for dropdown menus and other UI elements.

  • moods
  • conditions
  • strategies
  • skill_reference: A reference table containing details about various skills in the game.