Results 1 to 2 of 2
  1. #1
    Join Date
    Mar 2009

    Unanswered: best structure for DB


    i am building a databse and looking for a bette way to construct it..
    what i have done is:

    * division_tble
    Electronics, non Electronics

    * subDivision
    computers, TVs, Radio

    * Items
    mouse, cable1, cable2

    * details
    color, size,supplier, warehouse

    this is the way i set it up so on my front end if the user choose Electronics(from division menu) the subdivision menu shows only the related item (computers, TVs, Radio), the same when the user select from the subdivision the related items only whows up and same for the details.

    everything works fine and pretty good. but some subdivisions has same items like:
    computers-------->>> has mouse, cable1, cable2
    TVs-------------->>> has cable1, cable2.
    so as you see in the items table there are repeating items and this makes a problem when creating a views..

    is there any better way to construct this database (keep in mind that all of the menus will be dependent drop down menus - selecting from a table, the submenu only shows the related items and so one..



  2. #2
    Join Date
    Apr 2002
    Toronto, Canada
    have a look here --> Categories and Subcategories

    that should simplify things a lot, eh | @rudydotca
    Buy my SitePoint book: Simply SQL

Posting Permissions

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