Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

mysql football database - multiple seasons!!

Options
  • 17-01-2007 4:42pm
    #1
    Registered Users Posts: 462 ✭✭


    Any one every design a football database to record the usual (players, teams, fixtures, results etc) but over multiple seasons. Ive put one together in mysql (not very well designed though Im not a pro) but Ive found myself having to add a SeasonId column to a lot of tables to accomodate queries on the data over multiple seasons. Has anyone got any ideas on this. Just seems like Im repeating a lot of data by having a SeasonId column in a lot of tables.


Comments

  • Registered Users Posts: 68,317 ✭✭✭✭seamus


    Well having a seasonID column in a lot of tables really isn't a big deal, provided that it's an atomic value, probably linked to a season table which describes each season identified by seasonID.

    On the face of it, football data is ideal for storage in a relational database, but there are so many variables and caculations required, it can seem very complex.


  • Registered Users Posts: 32,136 ✭✭✭✭is_that_so


    There may be a case for normalising the data so that you don't get repetitions.
    Massive repetitions across tables usually means the data is not fully or correctly normalised.

    As for the primary key SeasonID is not a bad way to do it, but you should probably combine it with say the userID or Team ID in order to give you a unique ID. So a record from today could be 20071701MUFC. In this case you would be looking at a composite primary key.

    I would suggest sketching out and describing your system so you can see exactly what you've got. You may need to redesign some of the tables or even the whole DB schema.


Advertisement