2022年数据库应用技术大作业模板

上传人:M****1 文档编号:567380241 上传时间:2024-07-20 格式:PDF 页数:10 大小:290.87KB
返回 下载 相关 举报
2022年数据库应用技术大作业模板_第1页
第1页 / 共10页
2022年数据库应用技术大作业模板_第2页
第2页 / 共10页
2022年数据库应用技术大作业模板_第3页
第3页 / 共10页
2022年数据库应用技术大作业模板_第4页
第4页 / 共10页
2022年数据库应用技术大作业模板_第5页
第5页 / 共10页
点击查看更多>>
资源描述

《2022年数据库应用技术大作业模板》由会员分享,可在线阅读,更多相关《2022年数据库应用技术大作业模板(10页珍藏版)》请在金锄头文库上搜索。

1、数据库大作业课题名称专业班级学号姓名教师成绩2018 年 11 月日1. 需求分析(加入需求分析的概念)精选学习资料 - - - - - - - - - 名师归纳总结 - - - - - - -第 1 页,共 10 页2 / 10 描述题目内容1.1 数据流图( DFD )什么是数据流图。画数据流图图 1-1 XXXX 图1.2 数据字典( DD )什么是数据字典写数据字典数据文件:订单明细表文件组成:订单序号Id, 订单编号 , 菜名, 价格, 数量, 下单时间数 据 项:订单序号 Id 数据类型 :整型数据长度: 4 数 据 项:订单编号精选学习资料 - - - - - - - - - 名

2、师归纳总结 - - - - - - -第 2 页,共 10 页3 / 10 数据类型 :可变字符类型数据长度: 50 数据组成: A+日期时间数 据 项:菜名数据类型 :可变字符类型数据长度: 50精选学习资料 - - - - - - - - - 名师归纳总结 - - - - - - -第 3 页,共 10 页4 / 10 2. 概念结构设计什么概念结构设计E-R图(在 Powerdesigner中创建概念模型,粘贴图)图 2-1 XXXX 图3. 逻辑结构设计关系模式(在 Powerdesigner中由概念模型转化为物理数据模型,粘图)图 3-1 XXXX 图精选学习资料 - - - - -

3、 - - - - 名师归纳总结 - - - - - - -第 4 页,共 10 页5 / 10 4. 建表 SQL语句由物理数据模型生成SQL Server 2008数据库的建表语句。/*=*/ /* DBMS name: Microsoft SQL Server 2008 */ /* Created on: 2018-9-16 14:39:14 */ /*=*/ if exists (select 1 from sys.sysreferences r join sys.sysobjects o on (o.id = r.constid and o.type = F) where r.fkey

4、id = object_id(SC) and o.name = FK_SC_SC_S) alter table SC drop constraint FK_SC_SC_S go if exists (select 1 from sys.sysreferences r join sys.sysobjects o on (o.id = r.constid and o.type = F) where r.fkeyid = object_id(SC) and o.name = FK_SC_SC2_C) alter table SC drop constraint FK_SC_SC2_C go if e

5、xists (select 1 from sys.sysreferences r join sys.sysobjects o on (o.id = r.constid and o.type = F) where r.fkeyid = object_id(TC) and o.name = FK_TC_TC_T) alter table TC drop constraint FK_TC_TC_T go if exists (select 1 from sys.sysreferences r join sys.sysobjects o on (o.id = r.constid and o.type

6、= F) where r.fkeyid = object_id(TC) and o.name = FK_TC_TC2_C) alter table TC drop constraint FK_TC_TC2_C go if exists (select 1 from sysobjects where id = object_id(C) and type = U) drop table C go if exists (select 1 精选学习资料 - - - - - - - - - 名师归纳总结 - - - - - - -第 5 页,共 10 页6 / 10 from sysobjects wh

7、ere id = object_id(S) and type = U) drop table S go if exists (select 1 from sysindexes where id = object_id(SC) and name = SC2_FK and indid 0 and indid 0 and indid 0 and indid 0 and indid 255) drop index TC.TC_FK go if exists (select 1 from sysobjects where id = object_id(TC) and type = U) drop tab

8、le TC go /*=*/ /* Table: C */ /*=*/ create table C ( CNo char(2) not null, CN varchar(40) null, CT smallint null, constraint PK_C primary key nonclustered (CNo) ) go /*=*/ /* Table: S */ /*=*/ create table S ( SNo char(2) not null, SN varchar(40) null, Gen char(2) null, Birth datetime null, Dept var

9、char(40) null, constraint PK_S primary key nonclustered (SNo) ) go /*=*/ 精选学习资料 - - - - - - - - - 名师归纳总结 - - - - - - -第 7 页,共 10 页8 / 10 /* Table: SC */ /*=*/ create table SC ( SNo char(2) not null, CNo char(2) not null, Score smallint null, constraint PK_SC primary key (SNo, CNo) ) go /*=*/ /* Inde

10、x: SC_FK */ /*=*/ create index SC_FK on SC ( SNo ASC ) go /*=*/ /* Index: SC2_FK */ /*=*/ create index SC2_FK on SC ( CNo ASC ) go /*=*/ /* Table: T */ /*=*/ create table T ( TNo char(2) not null, TN varchar(40) null, Gen char(2) null, Birth datetime null, Prof varchar(40) null, Sal int null, Comm i

11、nt null, Dept varchar(40) null, constraint PK_T primary key nonclustered (TNo) ) go /*=*/ /* Table: TC */ 精选学习资料 - - - - - - - - - 名师归纳总结 - - - - - - -第 8 页,共 10 页9 / 10 /*=*/ create table TC ( TNo char(2) not null, CNo char(2) not null, constraint PK_TC primary key (TNo, CNo) ) go /*=*/ /* Index: T

12、C_FK */ /*=*/ create index TC_FK on TC ( TNo ASC ) go /*=*/ /* Index: TC2_FK */ /*=*/ create index TC2_FK on TC ( CNo ASC ) go alter table SC add constraint FK_SC_SC_S foreign key (SNo) references S (SNo) go alter table SC add constraint FK_SC_SC2_C foreign key (CNo) references C (CNo) go alter tabl

13、e TC add constraint FK_TC_TC_T foreign key (TNo) references T (TNo) go alter table TC add constraint FK_TC_TC2_C foreign key (CNo) references C (CNo) go 精选学习资料 - - - - - - - - - 名师归纳总结 - - - - - - -第 9 页,共 10 页10 / 10 5. 结论心得体会(如果有相同的,则都不及格)参考教材:数据库实验指导主编:杨海霞出版社:人民邮电出版社书号: 978-115-16535-0 精选学习资料 - - - - - - - - - 名师归纳总结 - - - - - - -第 10 页,共 10 页

展开阅读全文
相关资源
正为您匹配相似的精品文档
相关搜索

最新文档


当前位置:首页 > 建筑/环境 > 施工组织

电脑版 |金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号