Design decision: One or multiple tables

Reply

Join Date: Jun 2009
Posts: 1
Reputation: TheD is an unknown quantity at this point 
Solved Threads: 0
TheD TheD is offline Offline
Newbie Poster

Design decision: One or multiple tables

 
0
  #1
Jun 20th, 2009
I am going to try to write an odds parser and for the database I have two possible ways of designing the tables.

Background:
There are going to be many different types of odds in the database, but all of them are going to be similar.
Example (Type: Fields)
Moneyline: Id, OddsHome, OddsAway
Handicap: Id, OddsHome, OddsAway, Line
Game totals: Id, OddsOver, OddsUnder, Line

I feel like there are two choices. The first one is to do a separate table for each odds type and then do one stored procedure for each one for inserting, changing and so on.

The second choice is to put all the odds in the same table and have a Type field and let it be possible for some of the fields to be null. Then I would only have to have one SP to update, insert and delete, and I could create some views when I want to display the data.

Which one of these is the best and why?
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC