ShopMAster Posted August 18, 2010 Share Posted August 18, 2010 Hey Guys, I'm running a league where there are 4 teams of 6 players and the players face off at different stadiums in specific games. For example Team 1 plays Team 2 @ Stadium 1 in a kickball game - Team 1 Wins Team 2 plays Team 3 @ Stadium 1 in a softball game - Team 2 Wins Team 1 plays Team 3 @ Stadium 1 in a kickball game - Team 1 Wins With that said how should I set up the Stadium Table? The Stadium will have 5 events that a team can score in and a team can score multiple times in any event. Do I need to set up an event table and if so how should that be laid out (I'm thinking ID, name of event, and rules) and how should the Stadium table be laid out? In my mind I see what I want to display where it's like a grid of a stadium, the events in a row at the top and the teams in a column on the left and then the number of victories for the team and event. thanks for your help. Quote Link to comment https://forums.phpfreaks.com/topic/211091-database-layout-help/ Share on other sites More sharing options...
TOA Posted August 19, 2010 Share Posted August 19, 2010 Ok, just in general, any noun in a statement becomes an entity (table) and verbs become attributes (fields). Also, any time there will be multiple anything, that deserves it's own table (look into normalization) To address your direct questions, yes you need an event table, and it sounds like you have that on the right track. You'll need to store anything related to that event, like which teams were in it, time if needed, date etc. Your stadium table should be similar (StadiumID, EventID, ...) and so on till you get down to the smallest piece of info, which I'm seeing as a player table. If you need more help though, you'll have to post what you have come up with so far Good luck Quote Link to comment https://forums.phpfreaks.com/topic/211091-database-layout-help/#findComment-1101186 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.