database design (MS SQL)
Posted on 2006-05-13
i have a problem on my database design for my online clothing store. my tables are listed accordingly below. in my orderdetails table i wanted that the same product but different size and/or color be a DIFFERENT ITEM. so i made my colorid and sizeid also primary keys. is there a better way of designing this table and achieve the same purpose?
every product may be available in a set of colors and in turn for this set of colors, each will have a set of available sizes to it -- i wanted that each available color for the said product will have a small image of that product in that color. hence, i have colorid and productid as primary keys for my colors table.
my idea for the colorsize table is to get all sizes linked to a colorid.
i just wanted to get some ideas and some insights from those who know better to achieve a "good" database design for my ol store.
any suggestions and/or comments would be greatly appreciated. thanks.