943,673 Members | Top Members by Rank

Ad:
Jun 20th, 2009
0

Design decision: One or multiple tables

Expand Post »
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?
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
TheD is offline Offline
1 posts
since Jun 2009

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Database Design Forum Timeline: Normalization Question
Next Thread in Database Design Forum Timeline: Please help me with my table design





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC