ShoeLace1291 Posted January 15, 2012 Share Posted January 15, 2012 I have a question for people that have experience in developing websites for gaming clans. I want to have a match database that's categorized by matches that have been played and matches that are on the schedule... i.e. upcoming matches and recent matches. Judging by your own personal experiences, what do you think is the best way to store matches and their results? Should I store scheduled matches and match results in separate tables? How would you store these matches? Quote Link to comment Share on other sites More sharing options...
wolfcry Posted January 15, 2012 Share Posted January 15, 2012 If you don't really care about duplicate data, store it all in one database that way it'll make querying a bit easier (not requiring JOINs etc.) A basic DB structure I've done for this sort thing was like: Table: ClanMatches Team_A | Team_B | Scheduled_Match_Name | Match_Date_Time | Winning_Team | Losing_Team | Winning_Score | Losing_Score | Then you simply query the rows and display them as you see fit. Mind you, this isn't the best method if you're looking for cardinality but it's more than enough if you're running a simple clan site. Quote Link to comment Share on other sites More sharing options...
scootstah Posted January 15, 2012 Share Posted January 15, 2012 You should store results and matches in different tables. This is called normalization, and is the preferred approach. Quote Link to comment Share on other sites More sharing options...
KevinM1 Posted January 16, 2012 Share Posted January 16, 2012 You should store results and matches in different tables. This is called normalization, and is the preferred approach. This. MySQL is a relational database. If you have data that's separated but related to other data, then normalize their relationship. Using a RDB like a giant spreadsheet means you're likely doing it wrong. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.