Thread: Little problem
View Single Post
Old 10-17-2004, 12:55 AM   PM User | #2
Kiwi
Regular Coder

 
Join Date: Oct 2002
Posts: 380
Thanks: 0
Thanked 0 Times in 0 Posts
Kiwi is an unknown quantity at this point
To me it would make more sense to put the game-types in one table, and the options in another, with either a parent child-relationship or a joining table, depending on whether most options are found on more than one gametype. It It partly depends on how similar the information you have to store for each option is. These are the standard approaches for one to many (parent child) or many to many (joining) relationships.

TABLE gametypes:
gametype ID (key)
All data common to most gametypes

and

EITHER (one options table)

TABLE gt_options:
gt_option ID (key)
gametype ID (foreign key)
All data relatiing to this option for this gametype

OR (joining table):
TABLE options
gt_option ID (key)
All data common to this option - eg description

TABLE gt_options
gt_option ID (key) (foreign key)
gametype ID (key) (foreign key)
Specific data for this gametype option combination
__________________
Strategy Conscious

Last edited by Kiwi; 10-17-2004 at 12:58 AM..
Kiwi is offline   Reply With Quote