记录一下谷粒商城商品表结构

主要属性

  • attr:商品属性,分为销售属性和基本属性
  • spu:标准化产品单元。是商品信息聚合的最小单位,是一组可复用易检索标准化信息的集合,该集合描述了一个产品的特性。通俗点讲,属性值、特性相同的商品就可以称为一个SPU。
    • 信息聚合:意味着有识别度的信息被用来作为不同SPU的区分点;不是所有属性,使用的属性值是能够有区分度的关键属性值。
    • 易检索:信息聚合与易检索这两个说明,是通过关键属性+属性值的聚合来实现易检索这个目的;目的与使用场景相关联,并非万古不变;哪些属性和属性值会被选为区分SPU的关键属性是会随着场景变化的; 但对于一些场景,已经是共识;比如电商销售,对于标品基本都会选择品牌+型号+关键属性;这也是很多年前我所得到的解释。
    • 标准化的信息集合:说明SPU的本质是信息集合,是一个抽象概念,并非是看得见的东西。比如格力空调 KFR-25GW/E;

  • sku:库存量单位。SKU即库存进出计量的单位, 可以是以件、盒、托盘等为单位。(商品的不可再分的最小单元)
    注意,sku是一个具有场景性,同时也有相对性的概念
    • 例如iphone11 pro是一个spu,iphone11 pro 暗夜绿 256g 是一个sku。
    • 例如麻辣王子是一个spu
      • 5包很麻很辣,5包微麻微辣是一个sku
      • 10包很麻很辣是一个sku。
    • 比如对于香烟,对于小卖部而言sku是按照盒来设定的,而过去上海等地的街边小店是按照一支来设定的,这样一支xx烟就是烟的最小零售单元。
    • 总结例子:SPU = iphone11 pro,SPU = iphone11 pro 暗夜绿 256g 或 iphone11 pro 暗夜绿 512g,product = SPU 。但有些情况product != SPU ,比如商家要在iphone 11 pro 暗夜绿 256g 中捆绑销售一个钢化膜,此时product = iphone 11 pro 暗夜绿 256g,SPU = iphone 11 pro 暗夜绿 256g + 钢化膜
  • catalog:商品所属分类。类目是一个树状结构的系统,大体上可以分成4-5级。如手机 -> 智能手机 -> 苹果手机类目,在这里面,手机是一级类目,苹果手机是三级类目,也是叶子类目。

联系

简单来说大概关系类似于。catelog -> spu -> sku,而spu和sku都具有很多attr。
简单梳理了一下表关系
在这里插入图片描述

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
gulimall_pms 商品 drop table if exists pms_attr; drop table if exists pms_attr_attrgroup_relation; drop table if exists pms_attr_group; drop table if exists pms_brand; drop table if exists pms_category; drop table if exists pms_category_brand_relation; drop table if exists pms_comment_replay; drop table if exists pms_product_attr_value; drop table if exists pms_sku_images; drop table if exists pms_sku_info; drop table if exists pms_sku_sale_attr_value; drop table if exists pms_spu_comment; drop table if exists pms_spu_images; drop table if exists pms_spu_info; drop table if exists pms_spu_info_desc; /*==============================================================*/ /* Table: pms_attr */ /*==============================================================*/ create table pms_attr ( attr_id bigint not null auto_increment comment '属性id', attr_name char(30) comment '属性名', search_type tinyint comment '是否需要检索[0-不需要,1-需要]', icon varchar(255) comment '属性图标', value_select char(255) comment '可选值列[用逗号分隔]', attr_type tinyint comment '属性类型[0-销售属性,1-基本属性,2-既是销售属性又是基本属性]', enable bigint comment '启用状态[0 - 禁用,1 - 启用]', catelog_id bigint comment '所属分类', show_desc tinyint comment '快速展示【是否展示在介绍上;0-否 1-是】,在sku中仍然可以调整', primary key (attr_id) ); alter table pms_attr comment '商品属性'; /*==============================================================*/ /* Table: pms_attr_attrgroup_relation */ /*==============================================================*/ create table pms_attr_attrgroup_relation ( id bigint not null auto_increment comment 'id', attr_id bigint comment '属性id', attr_group_id bigint comment '属性分组id', attr_sort int comment '属性组内排序', primary key (id) ); alter table pms_attr_attrgroup_relation comment '属性&

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值