Closed Alice52 closed 3 years ago
group : attr: n : n
for each catelog, the relation of attr and group is n:1
[x] so the table of group-attr-relation
is redundancy
描述一个产品的特征
基本属性
销售属性
name
, catelogId
, attr_type
id
, catelogId
groupId
, attrId
一个分组可以有多个属性[每个 catelog 下, 不同 catelog 数据互不相干]
spuId
, attrId
, attrValue
存放基本属性的值
skuId
, attrId
, attrValue
存放销售属性的值
sku:attr => n:n, 相当于是 attr 和 sku 的关联表,且带有 attrValue
attr_attr_group_rtelation: groupId, attrId 一个分组可以有多个属性[每个 catelog 下, 不同 catelog 数据互不相干]
其实可以不使用关联表
relation
brand : category
:n : n
category : group
:1 : n
group : attr
:n : n
group : attr => n : 1
attr
is dependent oncatelogId
, so eachcatelogId
can have independentattr
, in other words, differentcatelogId
can have it's own attr, even if they have the same name[it will have diferent id]attr : product_attr_value
:1 : n[spu_id]
attr : sale_attr_value
:1 : n[sku_id]
sku : spu
:n : 1
tables
pms_sku_images
pms_spu_images
,pms_spu_info_desc
,pms_spu_comment