数据库课程设计-商品库存管理系统(18)

2021-01-07 09:55

数据库课程设计 商品库存管理系统 需求分析 业务流程图 数据流程图 关系模式图 物理结构设计 逻辑结构设计

--表七:总库存表

create table totalstorge( pno char(5), wno char(5), total number(5),

storgeupper number(5) not null check(storgeupper>0), storgelower number(5) not null check(storgelower>0) );

--主键约束

alter table totalstorge add constraint totalstorge_pno_wno_pk primary key(pno,wno);

--外键约束

alter table totalstorge add constraint totalstorge_pno_fk foreign key(pno) references products(pno);

alter table totalstorge add constraint totalstorge_wno_fk foreign key(wno) references warehouses(wno);

--表八:

create table priceadjust( pno char(5),

productiondate date not null,

oldprice number(5) not null check(oldprice>0), newprice number(5) not null check(newprice>0) );

--主键约束

alter table priceadjust add constraint priceadjust_pdate_pk primary key(pno,productiondate); --外键约束

alter table priceadjust add constraint priceadjust_pno_fk foreign key(pno) references products(pno);

6.3 插入测试数据

--插入测试数据 --1.商品

insert into products values('p001','薯片',8,3.5); insert into products values('p002','AD钙奶',6,2); insert into products values('p003','清风抽纸',24,10); insert into products values('p004','益达木糖醇',10,12);


数据库课程设计-商品库存管理系统(18).doc 将本文的Word文档下载到电脑 下载失败或者文档不完整,请联系客服人员解决!

下一篇:化学平衡及其应用复习学案

相关阅读
本类排行
× 注册会员免费下载(下载后可以自由复制和排版)

马上注册会员

注:下载文档有可能“只有目录或者内容不全”等情况,请下载之前注意辨别,如果您已付费且无法下载或内容有问题,请联系我们协助你处理。
微信: QQ: