我想知道你是如何处理这样一个电子商务网站,如Mysql http://shop.ccs.com与产品,产品质量,尺寸,颜色价格之间的所有相关性。我的是电子商务网站的最佳数据库结构
- 表产品
- ID
- 名
- 父母
- 表大小
- ID
- id_product
- 大小_NAME
- 量
- 表颜色
- ID
- id_product
- 颜色
- 量
我想知道你是如何处理这样一个电子商务网站,如Mysql http://shop.ccs.com与产品,产品质量,尺寸,颜色价格之间的所有相关性。我的是电子商务网站的最佳数据库结构
嗯..我想出了这个结构,希望这将有助于双吨。一个应该有一个主表与产品信息。这里在你的情况下,它的产品ID,尺寸和颜色repec。和其余的表连接到主表
1.table products_id (master table)
1.id- Primary Key
2.id_product_size- References size.id (FK)
3.id_product_color- References color.id (FK)
2. table product_name
1.product_id- References product_id.id(FK)
2.name
3.parents
3.table size
1.id- Primary Key
2.size_name
3.quantity
4.table color
1.id- Primary Key
2.colors
3.quantity
那么在这种情况下,表格必须将id_product_category添加到products_id主表中,例如鞋子或T恤等类别,那么对吗? –
是的,听起来不错 –
你想要一个数据库模型? –
这里我很漂亮,所以也许就是这样。 –