If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > General > Database Concepts & Design > Please Help Me Design This Simple Database

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 09-08-09, 15:09
Questioner Questioner is offline
Registered User
 
Join Date: Sep 2009
Posts: 2
Please Help Me Design This Simple Database

Hello,

I need to create a database and I would appreciate a bit of guidance so that I can set it up the best possible way from the start.

The purpose of the database will be to catalog predictions and then analyze those predictions after the outcome is known. The predictions in this case are NFL football stats.

Each week, 4 people ('predictors') will try to predict how many yards and touchdowns several NFL players will have. The data set for 1 week would look something like this:

Week | Player | Predictor | Yds Predicted | Tds Predicted | Yds Actual | Tds Actual
1 | Peterson | Jim | 100 | 1 | unknown | unknown
1 | Peterson | Bill | 156 | 2 | unknown | unknown
1 | Peterson | Bob | 60 | 0 | unknown | unknown
1 | Johnson | Jim | 167 | 1 | unknown | unknown
1 | Johnson | Bill | 188 | 0 | unknown | unknown
1 | Johnson | Bob | 143 | 1 | unknown | unknown

That doesn't look very good - so for a better look:

Data Set - Google Spreadsheet Representation
(I used a google docs spreadsheet because you can't draw a table in a vbulletin forum to my knowledge)

Each week there would be a new similar data set, and the outcome from the previous week will be known. I will want to query the data sets to find out whose predictions were the most accurate for each week.

I guess I am struggling with how setup the tables and overall database design. What would be the ideal way to set this up? I guess I really don’t know what should get its own table and what shouldn’t.

Should I keep each season in one giant table that has Week, Predictor, Player Name, Yards Predicted, TDs Predicted, Yards Actual, TDs Actual as the fields?

-OR-

Should I:
Have a separate table for NFL Players with columns PlayerID, Player name?
Have a separate table for the predictions of each Week (or maybe Season)?
Have a separate table for each predictor (person who is making the predictions)?

This seems like such a simple thing to think through, but I just can’t seem to decide what makes the most sense on my own. I want to avoid getting the whole thing set up and then realizing I should have done it another way .

Thanks a lot for reading this and for any input!
Reply With Quote
  #2 (permalink)  
Old 09-08-09, 23:54
r937 r937 is offline
SQL Consultant
 
Join Date: Apr 2002
Location: Toronto, Canada
Posts: 19,524
my advice is to forget about "the ideal way to set this up" and use a single table

in fact, you can likely do it in a spreadsheet, just like the one you posted on google

what was your reason for not wanting to do it with a spreadsheet?
__________________
r937.com | rudy.ca
please visit Simply SQL and buy my book
Reply With Quote
  #3 (permalink)  
Old 09-09-09, 10:45
Questioner Questioner is offline
Registered User
 
Join Date: Sep 2009
Posts: 2
Quote:
Originally Posted by r937
my advice is to forget about "the ideal way to set this up" and use a single table

in fact, you can likely do it in a spreadsheet, just like the one you posted on google

what was your reason for not wanting to do it with a spreadsheet?
Well I was planning to accumulate several years of data, but maybe the best thing to do is use a spreadsheet until the year is finished and then put it into the database.

I also want to have people eventually input their picks on a web form that will go into a MySQL database.

For 4 people a spreadsheet would work but I think it would get too big with a lot of people playing.

Thanks a lot for the suggestion though, believe it or not it makes me feel a lot better about not being able to figure out how I should set it up given that it's pretty simple... I am probably making it overcomplicated for no good reason.
Reply With Quote
  #4 (permalink)  
Old 09-09-09, 11:07
r937 r937 is offline
SQL Consultant
 
Join Date: Apr 2002
Location: Toronto, Canada
Posts: 19,524
putting completed years into a database is worth doing only if you expect to obtain valuable statistical information from it using complex retrieval queries

otherwise, i wouldn't bother

by the way, i run an nfl picks pool on my site, with approx 60 players making 16 picks every week of the nfl season -- way too many to maintain in a spreadsheet comfortably
__________________
r937.com | rudy.ca
please visit Simply SQL and buy my book
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On