收藏 分享(赏)

数据库应用技术-大作业模板.doc

上传人:dzzj200808 文档编号:2240288 上传时间:2018-09-07 格式:DOC 页数:11 大小:276KB
下载 相关 举报
数据库应用技术-大作业模板.doc_第1页
第1页 / 共11页
数据库应用技术-大作业模板.doc_第2页
第2页 / 共11页
数据库应用技术-大作业模板.doc_第3页
第3页 / 共11页
数据库应用技术-大作业模板.doc_第4页
第4页 / 共11页
数据库应用技术-大作业模板.doc_第5页
第5页 / 共11页
点击查看更多>>
资源描述

1、数据库大作业课题名称 专 业 班 级 学 号 姓 名 教 师 成 绩 2013 年 11 月 日1. 需求分析(加入需求分析的概念)2描述题目内容1.1 数据流图(DFD)什么是数据流图。画数据流图图 1-1 XXXX 图1.2 数据字典(DD)什么是数据字典写数据字典数据文件:订单明细表文件组成:订单序号 Id, 订单编号, 菜名, 价格, 数量, 下单时间数 据 项:订单序号 Id数据类型:整型数据长度:4数 据 项:订单编号3数据类型:可变字符类型数据长度:50数据组成:A+日期时间数 据 项:菜名数据类型:可变字符类型数据长度:5042. 概念结构设计什么概念结构设计E-R 图(在 P

2、owerdesigner 中创建概念模型,粘贴图)图 2-1 XXXX 图53. 逻辑结构设计关系模式(在 Powerdesigner 中由概念模型转化为物理数据模型,粘图) )图 3-1 XXXX 图64. 建表 SQL语句由物理数据模型生成 SQL Server 2008 数据库的建表语句。/*=*/* DBMS name: Microsoft SQL Server 2008 */* Created on: 2011-9-16 14:39:14 */*=*/if exists (select 1from sys.sysreferences r join sys.sysobjects o o

3、n (o.id = r.constid and o.type = F)where r.fkeyid = object_id(SC) and o.name = FK_SC_SC_S)alter table SCdrop constraint FK_SC_SC_Sgoif exists (select 1from 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 tabl

4、e SCdrop constraint FK_SC_SC2_Cgoif exists (select 1from 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 TCdrop constraint FK_TC_TC_Tgoif exists (select 1from sys.sysreferences r join sys.sysobjects o on

5、 (o.id = r.constid and o.type = F)where r.fkeyid = object_id(TC) and o.name = FK_TC_TC2_C)alter table TCdrop constraint FK_TC_TC2_Cgoif exists (select 1from sysobjectswhere id = object_id(C)and type = U)drop table Cgoif exists (select 17from sysobjectswhere id = object_id(S)and type = U)drop table S

6、goif exists (select 1from sysindexeswhere id = object_id(SC)and name = SC2_FKand indid 0and indid 0and indid 0and indid 0and indid 255)drop index TC.TC_FKgoif exists (select 1from sysobjectswhere id = object_id(TC)and type = U)drop table TCgo/*=*/* Table: C */*=*/create table C (CNo char(2) not null

7、,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 varchar(40) null,constraint PK_S primary key nonclustered (SNo)go/*=*/9/* Table: SC */*=*/cre

8、ate table SC (SNo char(2) not null,CNo char(2) not null,Score smallint null,constraint PK_SC primary key (SNo, CNo)go/*=*/* Index: 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 nul

9、l,TN varchar(40) null,Gen char(2) null,Birth datetime null,Prof varchar(40) null,Sal int null,Comm int null,Dept varchar(40) null,constraint PK_T primary key nonclustered (TNo)go/*=*/* Table: TC */10/*=*/create table TC (TNo char(2) not null,CNo char(2) not null,constraint PK_TC primary key (TNo, CN

10、o)go/*=*/* Index: TC_FK */*=*/create index TC_FK on TC (TNo ASC)go/*=*/* Index: TC2_FK */*=*/create index TC2_FK on TC (CNo ASC)goalter table SCadd constraint FK_SC_SC_S foreign key (SNo)references S (SNo)goalter table SCadd constraint FK_SC_SC2_C foreign key (CNo)references C (CNo)goalter table TCadd constraint FK_TC_TC_T foreign key (TNo)references T (TNo)goalter table TCadd constraint FK_TC_TC2_C foreign key (CNo)references C (CNo)go115. 结论心得体会(如果有相同的,则都不及格)参考教材:数据库实验指导 主编:杨海霞 出版社:人民邮电出版社 书号:978-115-16535-0

展开阅读全文
相关资源
猜你喜欢
相关搜索
资源标签

当前位置:首页 > 高等教育 > 大学课件

本站链接:文库   一言   我酷   合作


客服QQ:2549714901微博号:道客多多官方知乎号:道客多多

经营许可证编号: 粤ICP备2021046453号世界地图

道客多多©版权所有2020-2025营业执照举报