




已阅读5页,还剩6页未读, 继续免费阅读
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
课程设计报告课程名称:数据库设计与管理课题名称:库房管理数据库设计指导教师: 课题组成员: 专业名称: 班级代号:(一):用PowerBuilder或其它程序设计语言作为开发语言,数据库使用Oracle 8.05,开发商品信息管理系统,实现如下功能:(1) 商品分类信息的增加、修改和删除。(商品分类包含:编号ClassID、商品分类名称Clname)(2) 商品品牌信息的增加、修改和删除。(商品品牌包含:品牌编号BrandID、品牌名称Brname、产地Place)商品分类商品分类名称分类编号商品数量型号商品编号商品名称单价简介含有拥有划分品牌品牌编号产地品牌名称nnn11n(3) 商品信息的增加、修改和删除。(商品信息包含:商品编号GoodID、商品名称Gname、分类编号ClassID、品牌编号BrandID、型号Type1、单价Price、商品数量Num、商品简介Information)一、E-R图商品分类classification(分类编号classid,分类名称clname) 商品goods(商品编号goodid,商品名称gname,型号type1,单价price,数量num,简介information,分类编号classid,品牌编号brandid)品牌brand(品牌编号brandid,品牌名称brname,产地place)表1 classification表结构列 名数据类型长 度是否允许为空说 明classidnumber6分类编号,主键clnameVarchar220分类名称表2 goods表结构列 名数据类型长 度是否允许为空说 明goodidnumber6商品编号,主键gnameVarchar220商品名称type1Varchar220型号pricenumber6价格numnumber6数量informationVarchar220简介classidnumber6分类编号brandidnumber6品牌编号表3 brand表结构列 名数据类型长 度是否允许为空说 明brandidnumber6品牌编号,主键brnameVarchar220品牌名称placeVarchar220产地二:创建表:(1)表一:classificationcreate table classification (classid number(6) not null,clname varchar2(20) not null,constraintclassification _ classid _pk primary key(classid);(2)表二:goodscreate table goods (goodid number(6) not null,gname varchar2(20) not null,type1 varchar2(20) not null,price number(6) not null,num number(6) not null,information varchar2(20) not null,classid number(6) not null,brandid number(6) not null,constraintgoods_goodid_pk primary key(goodid);(3)表三:brandcreate table brand (brandid number(6) not null,gname varchar2(20) not null,constraint brand_ brandid_pk primary key(brandid);(4)添加外键:alter table goodsadd constraint goods_classid_fkforeign key(classid)references classification(classid);alter table goodsadd constraint goods_brandid_fkforeign key(brandid)references brand(brandid);三:表的关系:(二):库房管理系统:一:E-R图:库房物料出入库事件库位*warehouse货量*item货量locationidnumber2出入库出入库存放属于出入库存放出入库事件(*flow,item,warehouseid,locationid ,number1,time1,prenumber,afternumber,flag)库房事件关系表 (*flow,*serial,number1,warehouseid,locationid)库房(*warehouseid, locationid,whname,whnumber)库位 (*locationid,*warehouseid ,loname,lonumber)物料(*item,itnumber)二:创建表:1、创建 出入库事件表:alter table 出入库事件 add locationid number(6);2、创建 库房表:create table 库房(warehouseid number(6) not null,locationid number(6) not null,whname varchar2(20) not null,whnumber number(6) not null);增加主键:alter table 库房 add constraint 库房_warehouseid_pkprimary key(warehouseid);3、创建 库位表:create table 库位( warehouseid number(6) not null, locationid number(6) not null, whname varchar2(20) not null, whnumber number(6) not null);增加主键:alter table 库位add constraint 库位_pk primary key(warehouseid,locationid); 4、创建 物料表:create table 物料( item number(6) not null, itnumber number(6) not null, constraint 物料_pk primary key(item);5、创建 库房事件关系表:create table 库房事件关系表( flow number(6) not null, serial number(6) not null, number1 number(6) not null, locationid number(6) not null, warehouseid number(6) not null);增加主键:alter table 库房事件关系表 add constraint库房事件关系表_pk primary key(flow,serial);6:增加外键:alter table 出入库事件add constraint 出入库事件_fkforeign key(item) references 物料(item);alter table 出入库事件 add constraint 出入库事件_fk2foreign key(warehouseid) references 库房(warehouseid);alter table 出入库事件 add constraint 出入库事件_fk3foreign key(warehouseid,locationid) references 库位(warehouseid,locationid);alter table 库房 add constraint 库房_fkforeign key(warehouseid,locationid) references 库位(warehouseid,locationid);alter table 库房事件关系表 add constraint 库房事件关系表_fk fo
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 2025年环保产业行业绿色技术创新与市场前景研究报告
- 2025年物联网技术应用场景与发展前景研究报告
- 2025年区块链行业技术应用前景展望研究报告
- 商场员工安全培训资料课件
- 2025年生物医药行业创新药物研发与市场前景分析报告
- 2025年运输行业无人驾驶技术发展前景研究报告
- 山西省2025山西长治医学院招聘博士研究生40人笔试历年参考题库附带答案详解
- 商场业主管理培训课件
- 夏县2025山西运城市夏县事业单位引进高素质青年人才25人笔试历年参考题库附带答案详解
- 国家事业单位招聘2025中国农业科学院作物科学研究所科研管理处招聘1人笔试历年参考题库附带答案详解
- 新入职教师法律法规培训
- 数字经济与就业
- 2024年-2025年司法考试真题及复习资料解析
- 幼儿园护学岗职责
- 国开电大《组织行为学》形考任务1-4
- 施工安全生产风险分级管控和隐患排查治理双重预防机制建设实施方案
- 精细化工技术-大学专业介绍
- 餐饮财务问题的研究报告
- 慢性疾病运动干预中心服务要求(征求意见稿)
- 林同炎与美洲银行大厦
- (正式版)SH∕T 3548-2024 石油化工涂料防腐蚀工程施工及验收规范
评论
0/150
提交评论