Results 1 to 6 of 6
  1. #1
    Join Date
    Aug 2006
    Posts
    4

    Tbl design for form

    I have a form with basic info. such as name/date/printer and then about 8 different options each involving about 3 options for that section. The user can only select one of the 8 sections and then ofcourse the std. questions on the form. The table to store all this info. would be large to cater for all 8 options ... so I created 8 separate tables to store each option (this also alows to expand the details in each option if needed). Then I store a foriegn key in each table to match to the std (basic info.) table. Is this the best way to implement such a form. Should I store all info. in one table rather, or is spliting the info. over several tables better. Please let me know your thoughs. I will be using sql server + asp to store and retrive info. form the table/s.
    Thanks you

  2. #2
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    separate tables for each option? hard to say without seeing the actual tables, but ordinarily that's a danger signal

    p.s. please do not cross-post, your other post has been removed
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL

  3. #3
    Join Date
    Aug 2006
    Posts
    4
    Sorry but I posted group the wrong section initially. The tables look something like this

    ts_design
    Order_Id
    Title
    date required
    date received
    color to print
    printername
    Destination
    instructions

    then one can choose either a poster/flyer/business card/cover/advert ... each of these has its own options say ts_poster will be:

    poster_id
    type
    customwidth
    customhiegt
    order_id (foreigh key to original order)

    ts_flyer would be :
    flyer_id
    type
    customwidth
    customehight
    size
    order_id (foreigh key)

    ts_advert would be:
    advert_id
    adwidth
    adhight
    order_id(may be more than one ad for an order_id)

    I would really appreciate some help here as I sense this might not be the right way to go ... should it all just be in one table ... would make programming easier !!
    thanks again
    Shimon

  4. #4
    Join Date
    Aug 2006
    Posts
    4
    Just to mention again that all these options are on one form all the options in ts_design need to be entered however the user chooses either a poster or a flyer or a advert etc... and this info is associated with the order table. I hope this is clear .. thanks again

  5. #5
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    looks like they all have approximately the same columns -- type, width, height

    in this case, yeah, i'd probably go with one table

    with an extra column to indicate whether the design was poster or flyer or whatever
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL

  6. #6
    Join Date
    Aug 2006
    Posts
    4
    Thanks for the advice ... will probably go that route

Posting Permissions

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