homepage Welcome to WebmasterWorld Guest from 54.166.148.189
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Pubcon Platinum Sponsor 2014
Home / Forums Index / Code, Content, and Presentation / Databases
Forum Library, Charter, Moderators: physics

Databases Forum

    
database structure for cart, suggestions?
database structure for cart
drooh




msg:4219357
 4:56 pm on Oct 20, 2010 (gmt 0)

Setting up a cart for ecommerce. Will be selling shirts and hats of different sizes and colors. The hats will be one size fit all and no options, only shirts will have options.

Can someone look at my table structure and let me know if it looks good?

tables

-cat
cat_id
cat_name

-sub_cat
sub_cat_id
cat_id
sub_cat_name

-sizes
size_id
size_name

-size_entry
size_entry_id
size_id
prod_id

-colors
color_id
color_name

-color_entry
color_entry_id
color_id
prod_id

-product
prod_id
cat_id
sub_cat_id
prod_name
prod_desc
prod_price
prod_weight

-product_img
img_id
prod_id
img_sort

 

enigma1




msg:4219451
 8:53 pm on Oct 20, 2010 (gmt 0)

You shouldn't need multiple category tables. One is enough and then define a hierarchy using another column.

Product attributes are dependent on the merchandise. If you going to expand them you don't want to keep adding tables for each attribute. So best to use 2 or 3 common tables for all attributes and their values.

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / Databases
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved