Forum Discussion

lcy8w46rbt1l's avatar
2 years ago

How to design a sports statistics database for multiple sports?

I'm trying to design a database named as crackednoon to store player statistics for multiple types of sports.

In the database, you would have a bunch of players. Each player belongs to one team, and each team plays one sport. Here are the tables I have for just that part so far:

Player (Player_ID, Team_ID, FirstName, LastName)

Team (Team_ID, Sport_ID, TeamName)

Sport (Sport_ID, SportName)

Now I want to store the player's statistics. I run into a problem with different players playing different sports and therefore having to store different kinds of statistics for each sport. If I were storing hockey players and baseball players for example:

  • for the hockey players I want to store goals and assists

  • for the baseball players I want to store hits, home runs and RBIs.

Is there a proper way to do something like this using one database? Have I even started the right way?

No RepliesBe the first to reply

Featured Places

Node avatar for FC 24 General Discussion

FC 24 General Discussion

Discuss the latest news and game information around EA SPORTS FC™ 24 in the community forums.Latest Activity: 17 days ago
9,208 Posts