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 > General > Database Concepts & Design > E-Commerce Table Structure

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 02-15-07, 04:46
elskan elskan is offline
Registered User
 
Join Date: Apr 2005
Posts: 30
E-Commerce Table Structure

Hi Everyone,

I have a question regarding a db I am design for an ecomm application.

I just want to know if I am on the right lines really.

I need to display product with various options. e.g A desk in 4 different sizes with each size being a different price.

I have set up the following tables.

Products, product_options, prices and main.

Products holds the generic info ie name, description.
Product_options holds the sizes
Prices hold the different prices for each size
and main links all tables together (product_id,Product_options_id,price_id)

Have I done this right? or can you experts point me in the right direction or suggest a better way.

Many thanks in advance for your help and expertise.
Reply With Quote
  #2 (permalink)  
Old 02-18-07, 12:12
andrewst andrewst is offline
Moderator.
 
Join Date: Sep 2002
Location: UK
Posts: 5,171
Based on the information given I'd say you have twice as many tables as you need. You just need:

products - name, description
product_options - size, price
__________________
Tony Andrews
http://tinyurl.com/tonyandrews
Reply With Quote
  #3 (permalink)  
Old 03-07-07, 10:18
elskan elskan is offline
Registered User
 
Join Date: Apr 2005
Posts: 30
Thanks Tony. I guess I got a bit carried away with too many tables.
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