I am new at this so excuse any obvious ignorance.
I am setting up a sport league system using MySQL, basically their will be several sports, each sport having several leagues within them, each league having several teams within them. I also need to post each teams schedule and results of the games - win, lose, tie and the score.
I have set up 4 tables as follows:
Table One: id, sport, description
Table Two: id, league, description, sportid
Table Three: id, team, schedule, leagueid
Table Four: id, result, score1, score2, teamid
basically the "id" field for each table will be an auto incremented number and the tables will relate to one another by the sportid, leagueid and teamid fields carrying over fromt the previous tables id.
SportOne id=1
SportTwo id=2
LeagueOne id=1, sportid=1
LeagueTwo id=2, sportid=1
So SportOne has two leagues assigned.
My question is this: is this the best way to set up the tables, are their to many or not enough.
the function will be:
For an admin to have access to add, update, delete sports, leagues, teams, schedules, scores and results.
For a browser to view the sports, leagues within the sports, teams within the leagues their schedules, results and scores.