主要的表有三个,要实现进货、销货管理:进货表:Buy
批次:BuyID
商品代码:ProductID
进价:BuyPrice
数量:Amount
(主键:批次+商品代码 BuyID+ProductID)商品表:Product
代码:productID
商品名称:ProductName
当前卖价:SellPrice
当前库存:Storage
其它(单位、产地等)
(主键:商品代码ProductID)销售表: Sell
流水号:SellID
批资号:GroupID
商品号:ProductID
商品销价:SellPrice
(主键:流水号:SellID)
批次:BuyID
商品代码:ProductID
进价:BuyPrice
数量:Amount
(主键:批次+商品代码 BuyID+ProductID)商品表:Product
代码:productID
商品名称:ProductName
当前卖价:SellPrice
当前库存:Storage
其它(单位、产地等)
(主键:商品代码ProductID)销售表: Sell
流水号:SellID
批资号:GroupID
商品号:ProductID
商品销价:SellPrice
(主键:流水号:SellID)
主要的表有三个,要实现进货、销货管理:进货表:Buy
批次:BuyID
商品代码:ProductID
进价:BuyPrice
数量:Amount
(主键:批次+商品代码 BuyID+ProductID)商品表:Product
代码:productID
商品名称:ProductName
成本价:CostPrice
当前卖价:SellPrice
当前库存:Storage
其它(单位、产地等)
(主键:商品代码ProductID)销售表: Sell
流水号:SellID
批资号:GroupID
商品号:ProductID
商品销价:SellPrice
(主键:流水号:SellID)
这个销售表Sell就是一个流水表,每购买一种次商品,就产生一条纪录,比如10袋盐。
================================================================================
库存直接放在商品表里不行么?我已经用了一个字段“当前库存:Storage”