超市管理系统数据库开发案例内容摘要:

ata( Goodsno char(10) primary key, Goodsname char(20) not null, Goodsscale char(10) not null, Supplyer char(20) null, Sum int null, Goodsprice money null ) create index index_Goodsdata on Goodsdata(Goodsno) /* table:Buybill(采购单) */ create table Buybill( Buybillno char(10) primary key, Buydata date not null, Stuffno char(10) references Goodsdata(Goodsno)/*外码 */ ) create index index_Buybill on Buybill(Buybillno) /*table:Salebill(销售单 )*/ create table Salebill( Salebillno char(10) primary key, Billdate date not null, Stuffno char(10) references StuffInform(Stuffno)/*外码 */ ) create index index_Salebill on Salebill(Salebillno) 21 21 /*table:Buyrecord(采购记录表 )*/ create table Buyrecord( Buybillno char(10) references Buybill(Buybillno)/*外码 */, Goodsno char(10) references Goodsdata(Goodsno)/*外码 */, Buysum int null, Buyprice money null constraint pkbuybillno foreign key(buybillno) references Buybill(Buybillno), constraint pkbuygoodsno foreign key(goodsno) references Goodsdata(Goodsno) ) create index index_Buyrecord on Buyrecord(Buybillno) /*table:Buyplanbill采购计划表 */ create table Buyplanbill( Buyplanno char(10) not null, Goodsno char(10) primary key, Goodsname char(20) not null, Goodsscale char(10) not null, Supplyer char(20) null, Buyprice money not null, Buysum int not null, Stuffno char(10) references Goodsdata(Goodsno)/*外码 */ ) create index index_Buyplan on Buyplanbill(Buyplanno) /*table:Inventorybill(库存信息表 )*/ create table Inventorybill( Inventorybill char(10) not null, Goodsno char(10) references Goodsdata(Goodsno)/*外码 */, Goodsname char(20) not null, Goodsscale char(10) null, Supplyer char(20) null, Sumremain int not null constraint pkgoodsno foreign key(goodsno) references Goodsdata(Goodsno) ) create index index_Inventorybill on Inventorybill(Goodsno) /*table:Salereportbil(销售报表 )*/ create table Salereportbill( Sumbillno char(10) primary key, Sumsaledate date not null, Stuffno char(10) references StuffInform(Stuffno)/*外码 */ 22 22 ) create index index_Salerecord on Salereportbill(Sumbillno) /*table:Salerecord(销售记录表) */ create table Salerecord( Salegoodsno char(10) primary key, Salegoodsname char(10) not null, Salegoodsscale char(10) not null, Salegoodssum int not null, Salegoodsprice money not null, Sumine money not null, ) create index index_Salerecord on Salerecord(Salegoodsno) /*table:invoice(发票表) */ create table invoice( invoiceno char(10) primary key, Stuffno char(10) references Goodsdata(Goodsno)/*外码 */, recivedmoney money null, returnmoney money null, redate date not null ) create index index_Invoice on invoice(invoiceno) /*table:historyinvoice(发票历史记录表) */ create table historyinvoice( invoiceno char(10) references invoice(invoiceno)/*外码 */, Goodsno char(10) references Goodsdata(Goodsno)/*外码 */, salesum int not null, saleprice money not null constraint pkcon foreign key(invoiceno) references invoice(invoiceno), constraint pkcon1 foreign key(Goodsno) references Goodsdata(Goodsno) ) create index index_hisinvoice on historyinvoice(invoiceno) 九、 数据插入: 1 insert StuffInform 23 23 values(39。 202020102039。 ,39。 marry39。 ,39。 F39。 ,39。 1334579873039。 ,39。 import39。 ,39。 ascdgs39。 ),(39。 201012101939。 ,39。 ken39。 ,39。 M39。 ,39。 1325671373039。 ,39。 import39。 ,39。 iljlagf39。 ),(39。 202020102339。 ,39。 john39。 ,39。 M39。 ,39。 1377167879039。 ,39。 sale39。 ,39。 abcdef12339。 ),(39。 202020102239。 ,39。 sara39。 ,39。 F39。 ,39。 1381157873039。 ,39。 import39。 ,39。 qwertyu39。 ),(39。 202020102139。 ,39。 lisa39。 ,39。 F39。 ,39。 1878297786539。 ,39。 storage39。 ,39。 poiuy39。 ),(39。 202020102439。 ,39。 jack39。 ,39。 M39。 ,39。 1343248876139。 ,39。 finance39。 ,39。 zxcvbn39。 ),(39。 202020102539。 ,39。 mike39。 ,39。 M39。 ,39。 1339156829039。 ,39。 sale39。 ,39。 qazxsw39。 ) 2 nsert Salereportbill values(10001,39。 2020010139。 ,39。 202020102339。 ),(10002,39。 2020020139。 ,39。 202020102539。 ),(10003,39。 2020030139。 ,39。 202020102339。 ),(10004,39。 2020040139。 ,39。 202020102539。 ),(10005,39。 2020050139。 ,39。 202020102339。 ),(10006,39。 2020060139。 ,39。 202020102539。 ),(10007,39。 2020070139。 ,39。 202020102339。 ),(10008,39。 2020080139。 ,39。 202020102539。 ) 3 insert Goodsdata values(101001,39。 康师傅方便面 39。 ,39。 袋装 39。 ,39。 公司 39。 ,400,),(101002,39。 康师傅方便面39。 ,39。 桶装 39。 ,39。 公司 39。 ,500,),(101003,39。 康师傅矿泉水 39。 ,39。 大瓶装 39。 ,39。 公司39。 ,200,),(101004,39。 康师傅矿泉水 39。 ,39。 小瓶装 39。 ,39。 公司 39。 ,400,),(101005,39。 乐百氏矿泉水 39。 ,39。 大瓶装 39。 ,39。 公司 39。 ,200,),(101006,39。 乐百氏矿泉水 39。 ,39。 小瓶装 39。 ,39。 公司39。 ,250,),(101007,39。 珍维斯面巾纸 39。 ,39。 抽纸 39。 ,39。 公司 39。 ,100,),(101008,39。 珍维斯面巾纸 39。 ,39。 袋装 39。 ,39。 公司 39。 ,400,17),(101009,39。 心心相印面巾纸 39。 ,39。 抽纸 39。 ,39。 公司39。 ,300,),(101010,39。 心心相印面巾纸 39。 ,39。 小袋装 39。 ,39。 公司 39。 ,200,),(101011,39。 云烟 39。 ,39。 硬盒 39。 ,39。 公司 39。 ,100,),(101012,39。 云烟 39。 ,39。 软盒 39。 ,39。 公司39。 ,100,20),(101013,39。 玉溪 39。 ,39。 硬盒 39。 ,39。 公司 39。 ,200,25),(101014,39。 玉溪 39。 ,39。 软盒 39。 ,39。 公司 39。 ,200,19),(101015,39。 中华 39。 ,39。 硬盒 39。 ,39。 公司 39。 ,180,66),(101016,39。 中华 39。 ,39。 软盒 39。 ,39。 公司 39。 ,350,34),(101017,39。 飘柔 39。 ,39。 大瓶装 39。 ,39。 公司 39。 ,200,28),(101018,39。 飘柔 39。 ,39。 小瓶装 39。 ,39。 公司 39。 ,270,15),(101019,39。 清扬 39。 ,39。 大瓶装 39。 ,39。 公司 39。 ,200,30),(101020,39。 清扬39。 ,39。 小瓶装 39。 ,39。 公司 39。 ,330,19),(101021,39。 海飞丝 39。 ,39。 大瓶装 39。 ,39。 公司39。 ,170,37),(101022,39。 海飞丝 39。 ,39。 小瓶装 39。 ,39。 公司 39。 ,220,20),(101023,39。 nivea39。 ,39。 控油39。 ,39。 公司 39。 ,180,26),(101024,39。 nivea39。 ,39。 祛痘 39。 ,39。 公司 39。 ,150,30),(101025,39。 旁氏洁面乳 39。 ,39。 控油 39。 ,39。 公司 39。 ,200,23),(101026,39。 旁氏洁面乳 39。 ,39。 祛痘 39。 ,39。 公司39。 ,200,27),(101027,39。 可口可乐 39。 ,39。 小瓶装 39。 ,39。 公司 39。 ,300,),(101028,39。 可口可乐39。 ,39。 大瓶装 39。 ,39。 公司 39。 ,100,),(101029,39。 百事可乐 39。 ,39。 小瓶装 39。 ,39。 公司39。 ,200,),(101030,39。 百事可乐 39。 ,39。 大瓶装 39。 ,39。 公司 39。 ,200,),(101031,39。 舒肤佳香皂 39。 ,39。 除螨 39。 ,39。 公司 39。 ,290,),(101032,39。 舒服佳香皂 39。 ,39。 运动型 39。 ,39。 公司39。 ,200,),(101033,39。 黑人牙膏 39。 ,39。 大盒 39。 ,39。 公司 39。 ,100,20),(101034,39。 黑人牙膏 39。 ,39。 小盒 39。 ,39。 公司 39。 ,200,11),(101035,39。 佳洁士牙膏 39。 ,39。 大盒 39。 ,39。 公司 39。 ,100,13),(101036,39。 佳洁士牙膏 39。 ,39。 小盒 39。 ,39。 公司 39。 ,200,8),(101037,39。 汰渍洗衣粉 39。 ,39。 大袋 39。 ,39。 公司39。 ,300,13),(101038,39。 汰渍洗衣粉 39。 ,39。 小袋 39。 ,39。 公司 39。 ,200,6) 5 insert Salebill values(39。 11010039。 ,39。 2020010139。 ,39。 202020102339。 ),(39。 11010139。 ,39。 2020020139。 ,39。 2024 24 1012102539。 ),(39。 11010239。 ,39。 2020030139。 ,39。 202020102339。 ),(39。 11010339。 ,39。 2020040139。 ,39。 202020102539。 ),(39。 11010439。 ,39。 2020050139。 ,39。 202020102339。 ),(39。 110。
阅读剩余 0%
本站所有文章资讯、展示的图片素材等内容均为注册用户上传(部分报媒/平媒内容转载自网络合作媒体),仅供学习参考。 用户通过本站上传、发布的任何内容的知识产权归属用户或原始著作权人所有。如有侵犯您的版权,请联系我们反馈本站将在三个工作日内改正。