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

2021-01-07 09:55

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

--外键约束

alter table supply add constraint supply_pdno_fk foreign key(pdno) references providers(pdno);

alter table supply add constraint supply_pno_fk foreign key(pno) references products(pno);

--表五:入库表

create table storgein( pno char(5), wno char(5),

productiondate date not null,

storgeinamount number(5) not null check(storgeinamount>0), storgeintime date not null );

--主键约束

alter table storgein add constraint storgein_pno_wno_pdate_pk primary key(pno,wno,productiondate); --外键约束

alter table storgein add constraint storgein_pno_fk foreign key(pno) references products(pno);

alter table storgein add constraint storgein_wno_fk foreign key(wno) references warehouses(wno);

--表六:出库表

create table storgeout( pno char(5), wno char(5),

productiondate date not null,

storgeoutamount number(5) check(storgeoutamount>0), storgeouttime date not null );

--主键约束 alter table storgeout add constraint storgeout_pno_wno_pdate_pk primary key(pno,wno,productiondate); --外键约束

alter table storgeout add constraint storgeout_pno_fk foreign key(pno) references products(pno);

alter table storgeout add constraint storgeout_wno_fk foreign key(wno) references warehouses(wno);


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

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

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

马上注册会员

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