开发者

database design for online ordering system

While designing an online shop database I had a problem with one part, could please someone give me an advise whether it is designed ok? The idea is that there are products which can be a开发者_开发知识库ssigned to categories. Each category has a set of parameters for an easier search of products by customers. For example, a category "CPU" will have parameters "cpu family", "cpu speed" and category "HDD" will have "form factor" and "spindle speed". These parameter names are stored in the table tbCatParam and values of parameters for each product are in the table tbProdCatParam.

My schema is available here as jpeg: http://cid-ce0a6f63806e1ea9.office.live.com/self.aspx/PuclicFolder/scheme.jpg

Will it work like this? Many thanks


If woul be better if you have no relation between tables TbProdCatParam and TbProdCat, for its recursive. You are relating TbProdCat and TbCategories, wich is related with tbCatParam. Thus, if the tbCategories has parameters, makes no sense you create another NxN relation between tbCatParam and tbProdCat, wich is a NxN table for itself.

This way, you even not need the table tbProdCatParam (unless you need paramCategories in both products and categories, but makes no sense).

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜