Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
Thread: Ideas for Table Structure
02-25-2009, 04:12 PM #1
- Join Date
- Nov 2006
- Malvern, PA
- Thanked 0 Times in 0 Posts
Ideas for Table Structure
I have a DB that is used to register teams for a soccer league. The primary purpose/function is managing team contact info and payment histories.
Right now the DB contains the following tables:
I would like to add a scheduling component to this system and am trying to figure out the best way to do this. How would people store this schedule? Do you suggest a "Schedule" table with each record being a game? OR a schedule table with an individual record for each team and unique fields contain the game assignment. (There's 8 games per season.)
I have search for examples but can't find anything that fits. Mostly just turned up calendar apps or resource scheduling. That are only scheduling one entity (person/equiment) not two entities (teams).
Thanks for any thoughts. . .
02-25-2009, 05:38 PM #2
- Join Date
- Jun 2002
- Thanked 328 Times in 324 Posts
A schedule table would work fine in this instance, each row can be one individual game.OracleGuy
02-26-2009, 05:29 AM #3
You could even combine your schedule with your results, all in one table.
Maybe something like:
homeTeamID : fk to Teams table
awayTeamID : fk to Teams table
when : DateTime
homeTeamScore : int, default NULL (indicates no results in this game yet)
awayTeamScore : int, default NULL
Then it's reasonably easy to find the record for a given team or for all teams from just that data.
Users who have thanked Old Pedant for this post: