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 > very urgent: need help with Database

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 02-03-10, 05:23
grandlorie grandlorie is offline
Registered User
 
Join Date: Mar 2009
Posts: 2
very urgent: need help with Database

Hi All

i just need to start my project and got frustrated about the Database structure and i need an advice on what is the best structure should i go with.

my project is about ordering system and i start to categorize it like thist:

tble_division
id_div (1,2,3,4,5,6,etc)
name_div (course, non-course, etc)
-----------------------

tble_subdivision
id_sub (1,2,3,4,5,6,etc)
name_sub (Java, Visual Basic, C#,etc)
id_div
-----------------------

tbl_items
id_ite (1,2,3,4,5,6,etc)
name_ite (Book, pdf, CD, etc)
id_sub
-----------------------

tbl_details
id_det (1,2,3,4,5,6,etc)
Code_det (Book123, Book254, CD524, CD856,etc)
price_det
instock_det
-----------------------

so the user(who will place an order) page will look something like this:

Division: please select(drop down menu)
subdivision: please select(drop down menu dependent on Division)
Item: please select(drop down menu dependent on subDivision)
Code: please select(drop down menu dependent on Item)

This structure is working fine with me except one thing.
looking at the Items Table i can see repeated Items like Book, Book, Book, CD, CD, PDF,PDF,PDF) of course every item related to different division and subdivision and has different code but i am sure there is another way to structure this database without repeating the same items. am i right?

so any one can you please help?!?!?

Thanks
Grand

*********** Seems to hard for the people in hear, i ll try to make it easy and hope someone can help:

here is a Data Sample and as you can see it has repeated items.

=============================================
Division--------------SubDivision------------Item----------------Code------
=============================================

Non-Course---------Wood-------------------Material-------------ABC-Mat
Course--------------JavaScript--------------Book-----------------AMC_Bok
Course--------------Visual Basic------------Book-----------------SDE_Bok
Non-Course--------Lights-------------------Screw---------------SCR-SH10
Non-Course--------Lights-------------------Bulb-----------------ASI-5656
Course-------------JavaScript---------------PDF-----------------IDJ-9856
Course-------------Visual Basic-------------PDF-----------------LSO-852
Non-Course-------Wood--------------------Color----------------AJSIO-954

Last edited by grandlorie; 02-03-10 at 08:07.
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