关于 products、product_sku、categories 表的主键
table | primaryKey | type |
---|---|---|
products | id | int |
product_sku | id | int |
categories | id | bigint |
按层级来说 product_sku 表应该是量级最大的表,主键使用的是 int 类型;而 categories表 作为最上层,主键类型却是bigInt,按理说 categories表的数据不会比product_sku表的数据多,这么写仅仅是设计表习惯的不同吗,还是出于什么样的场景考虑
推荐文章: