Welcome to WebmasterWorld Guest from 18.104.22.168 , register , free tools , login , search , subscribe , help , library , announcements , recent posts , open posts Subscribe to WebmasterWorld
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.