| | |
Design decision: One or multiple tables
Please support our Database Design advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
•
•
Join Date: Jun 2009
Posts: 1
Reputation:
Solved Threads: 0
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?
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
- data from multiple tables (VB.NET)
- Searching Multiple tables... Please help me!!!!! (PHP)
- How to include multiple tables in FM format (MS Access and FileMaker Pro)
- Searching for a record in multiple tables (VB.NET)
- Multiple Tables in a Database (Visual Basic 4 / 5 / 6)
- Delete from multiple tables (MySQL)
- Query multiple tables? (MySQL)
Other Threads in the Database Design Forum
- Previous Thread: Hotel Reservation System
- Next Thread: Please help me with my table design
Views: 521 | Replies: 0
| Thread Tools | Search this Thread |
Tag cloud for Database Design





