If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > MySQL > best structure for DB

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 03-11-09, 17:56
grandlorie grandlorie is offline
Registered User
 
Join Date: Mar 2009
Posts: 2
best structure for DB

Hi

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..


thanks

Lorie
Reply With Quote
  #2 (permalink)  
Old 03-11-09, 18:13
r937 r937 is offline
SQL Consultant
 
Join Date: Apr 2002
Location: Toronto, Canada
Posts: 19,534
have a look here --> Categories and Subcategories

that should simplify things a lot, eh

__________________
r937.com | rudy.ca
please visit Simply SQL and buy my book
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On