Forum Documentation Showcase Pricing Learn more

DB structure check please! :)

Hey everyone, i’m about to start working on a project & wanted to check my database structure plan here before i start. Thanks for reading!

The project is a sports stats & info browser. The user will be able to do a search for a player & then their relevant stats & info will be shown.

My thinking is that i need to have two data types:

  1. Player Names : all player names, to be loaded on page load for easy searching

  2. Stats & info: searched for after Player Name is selected

Is that the best way? Should i nest one of these inside the other & will that slow things down? Ultimately this will be thousands of players with many years of stats. I’d like to design it correctly instead of trying to fix it down the road haha.

Hi Andy,
Firstly, good work for designing the database before you start, this will defiantly make things easier. Could you give an example of what the stats and info might look like for one player please? I think you are on the right track.

Sure!

I’d say there are a couple categories:

  1. General Info
    Player name, Player ID, DOB, Height, Weight, College, Draft round, Draft year, Position, Team

  2. Weekly Stats
    pass yards, pass attempts, rush yards, rush attempts, targets, completions, TDs etc etc

  3. Yearly Stats
    same as above but per year

Thanks, I would actually organise it similar to how you’ve described it there.

3 Data Types - Player Name & Info, Weekly Stats, Yearly Stats

Then formally link Weekly Stats and Yearly Stats to the Player Name & Info (e.g add a field to both with the field type as Player Name & Info)

Hope that helps, let me know if you have any other questions.