Jump to content

Database Layout Help


ShopMAster

Recommended Posts

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.

Link to comment
Share on other sites

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 :D

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.