我想可以这样设计:
1.了解销售情况知道烟的品牌和种类.
2.建一个各种种类的烟的表.
比如:
create table tab_1(
id int primary key identity(1,1),
type varchar(20)
)
3.建一个销售类型表
create table tab_2
(
id int primary key identity(1,1),
salType varchar(10),
)
4.建一个品牌表.
比如:
create table tab_3
(
brandid int primary key identity(1,1),
typeid int not null, -----此列引用上一个表的主键列.
saleId int not null, ----此列引用销售表中的主键列.
detail varchar(20), ---品牌详细名字
)
5.建一个总的烟的销售的表
create table tab_4
(
id int primary key identity(1,1),
brandId int not null, ----引用品牌表的id
price money not null, ----价格
salNum int not null, ----销售数量.
)
6.根据具体的情况简化此操作..