Hello and welcome to our community! Is this your first visit?
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2

Thread: Little problem

  1. #1
    Regular Coder
    Join Date
    Aug 2004
    The US of A
    Thanked 0 Times in 0 Posts

    Little problem

    Once again, I am running PostGre for those that don't know.

    Ok, what I am trying to do is set up a database for a Halo Site I will be working in the future; however, I want to get the databse out of the way right now. What my problem is: Halo's Gametypes. Each gametype has a different number of options. Other than creating a different table for each one, the best solution I have found is creating a text array feild in the gametype table. Is there a better solution for this or are my choices limited to Arrays and Multiple Tables?

  2. #2
    Regular Coder
    Join Date
    Oct 2002
    Thanked 0 Times in 0 Posts
    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


    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
    Last edited by Kiwi; 10-17-2004 at 01:58 AM.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts