【发布时间】:2014-08-14 17:48:05
【问题描述】:
我正在为珠宝网站设计数据库,其中将存储很多产品。在为产品属性设计表格时,我卡住了。我的问题是如何在数据库中存储产品属性和子属性等。
到目前为止,我已经为产品和属性创建了 3 个表 -
-
tbl_attribute
Structure: attribute_id*, attribute_name -
tbl_products
Structure: product_id*, category_id(FK), product_name, seo, description, metatags, length, width, height, weight, image, status -
tbl_products_attribute
Structure: product_id(fk), attribute_id(fk), value
我有一个情况假设项链有 5 个石头(石头是属性),每个石头都有以下子属性 1.石头名称 2.石头颜色 3.石材处理方法 4. 石材清除 5.石头形状 6. 石材价格
等等等等……我有这么多属性,比如石头,所以请你帮我设计一下这些属性的表格。
取决于我必须在前端搜索(过滤器 || 分面搜索)产品的属性。
详细属性和子属性列表:
Alphabatical
Availability (Sold Individualy, Sold in Bulk)
Birth Stone
Brands
Color (red, green, blue)
Design Type
Gender (Male, Female)
Images
Karat (18k, 22k, 24k)
Link
Make (Hand, Machine, Oxidised)
Making Percent
Material Type (Leather, Gemstone, etc)
Metal Art
Metal Stamp
Metal Type (Gold, Silver, PLatinum etc)
Model
Name
Price
Purity
Shapes (round, oval, emerald, diamond etc)
Short Description
Sides (single, both,)
Size (small, big etc)
Special Price
Status
Stone (Name, Color, Treated Method, Clearity, Shape, Price, Main Stone Color (Red, Pink, Green))
Stringing Material
Warranty
Wastage Percent
Weight
Wire - Wrapping Wire
到目前为止,我已经在网上搜索了很多教程和文章以及堆栈溢出。
非常感谢您的帮助。
【问题讨论】:
标签: mysql database-design