学生成绩管理系统数据库设计Word下载.docx
《学生成绩管理系统数据库设计Word下载.docx》由会员分享,可在线阅读,更多相关《学生成绩管理系统数据库设计Word下载.docx(18页珍藏版)》请在冰豆网上搜索。
![学生成绩管理系统数据库设计Word下载.docx](https://file1.bdocx.com/fileroot1/2023-2/1/3e788b67-c382-412d-892e-280f05525360/3e788b67-c382-412d-892e-280f055253601.gif)
息表
图3上下文图
P02
成绩修改子系统
D03课程信
登陆
成绩
E02学生
图4成绩查询子系统
管理员
管理员信息
图6成绩发布子系统
4.2数据字典
根据编号对数据流程图中的各元素如数据流、数据存储、外部实体和处理逻辑进行细节描述)
数据流的描述
数据流编号:
S001
数据流名称:
管理员登陆信息
简称:
数据流来源:
数据流去向:
学生成绩管理系统
数据流组成:
管理员账号和密码
数据流量;
100/天
高峰流量:
500/天
S002
课程信息
课程信息表
学生姓名,学号、年龄、课程、年级
1000/天
10000/天
S003
学生成绩查询信息
学生成绩
学生学号、成绩、课程数据流量;
1000/天高峰流量:
10000/天
S004
查询者信息
查询
学生
成绩查询系统
学生学号
2000/天
30000/天
S005
学生成绩信息
学号、姓名、成绩
S006数据流名称:
成绩单信息简称:
成绩单数据流来源:
成绩发布系统
学生
学号、姓名、成绩数据流量;
10000/天高峰流量:
80000/天
处理逻辑的描述
处理逻辑编号:
P0
处理逻辑名称:
成绩管理系统
简述:
是最高层系统,可以查询、修改、发布成绩
输入的数据流:
管理员账号、密码、学生学号
处理描述:
系统调用各个子系统完成不同功能
输出的数据流:
学生信息或学生成绩
处理频率;
管理员登陆系统,输入想要查询的学生学号,获得成绩
学号
调用成绩查询功能模块处理
管理员可以修改学生成绩
学生学号
按照学号查找学生成绩,然后修改,最后保存
新的成绩
成绩发布系统
成绩发布
首先查询学生成绩,然后将其发布到网络上
数据存储的描述
数据存储编号:
D01
数据存储名称:
学生成绩存储信息
数据存储组成;
学号、姓名、课程、成绩
关键字:
相关联的处理;
D02D03
D02
学生信息简称:
学生信息存储数据存储组成;
学号、姓名、课程关键字:
学号相关联的处理;
D01
D03数据存储名称:
课程信息存储数据存储组成;
课程名、课程号关键字:
课程号相关联的处理;
外部实体的描述
外部实体编号:
E01外部实体名称:
简述:
对学生成绩信息进行管理输入的数据流:
D02输出的数据流:
E02外部实体名称:
学生可以查询成绩输入的数据流:
D02D03输出的数据流:
5.概念模型设计
根据系统数据流图和数据字典,得出系统的总体概念模型CDM
教师
tno
<
pi>
Number(20)
M>
tname
Characters(10)
class
Characters(5)
cname
课程表
eno<
Number(10)<
cnameCharacters(10)
学生成绩表
sno
Number(10)
Relationship3
snovpi>
sdept
Characters(20)
-o
o<
sname
sage
Integer
grade
Identifier_
_1
tel
Number(11)
cno
Identifier_1
系统CMEB(ConceptualDataModel_1.cdm
6.逻辑模型设计和优化
ano
numeric(20)<
pk>
apasswordchar(10)
numeric(10)
char(20)
numeric(20)
fk>
char(10)
tnotname
FK课程表RELA
Relationship_2
S_学生成绩表
FK_RELATION_RE
TIONS_
FK_学生成绩表.RELATIONS.管理员
char(10)char(5)
fk1>
fk2>
FK_课程表_RELATIONS_教师
snonumeric(10)<
pk,fk1>
cnonumeric(10)<
pk,fk2>
FK_RELATION_RELATIONS_
sno2
sdept2
int
numeric(11)
系统PDMK(ConceptualDataModel_1.pdm)
7.物理设计和实施(crebas.sql)
/*DBMSname:
MicrosoftSQLServer2000*/
/*Createdon:
2011-1-1215:
45:
33*/altertableRelationship_2
dropconstraintFK_RELATION_RELATIONS_学生
go
altertableRelationship_2
dropconstraintFK_RELATION_RELATIONS_课程表goaltertable学生
dropconstraintFK_学生—RELATIONS^生成绩表
altertable学生成绩表
dropconstraintFK_go
altertable课程表
学生成绩表—RELATIONS管理员
课程表—RELATIONS教师
课程表—RELATIONS学生成绩表
ifexists(select1
fromsysindexes
whereid=object—id('
Relationship—2'
)andname='
Relationship—2—FK'
andindid>
0andindid<
255)
dropindexRelationship_2.Relationship_2_FKgo
whereid=object_id('
Relationship_2'
Relationship_3_FK'
0
andindid<
dropindexRelationship_2.Relationship_3_FKgoifexists(select1
学生'
)
andname='
Relationship_4_FK'
dropindex学生.Relationship_4_FK
goifexists(select1
学生成绩表'
Relationship_5_FK'
dropindex学生成绩表.Relationship_5_FKgoifexists(select1
课程表'
Relationship_1_FK'
dropindex课程表.Relationship_1_FK
Relationship_6_FK'
dropindex课程表.Relationship_6_FK
fromsysobjects
)andtype='
U'
droptableRelationship_2
andtype='
droptable学生
学生'
fromsysobjectswhereid=object_id('
andtype='
)droptable学生成绩表go
学生成绩表'
)droptable教师go
教师'
)droptable管理员go
管理员'
课程表'
)droptable课程表
/*Table:
Relationship_2*/createtableRelationship_2(
snonumeric(10)notnull,
cnonumeric(10)notnull,
constraintPK_RELATIONSHIP_2primarykey(sno,cno))
/*Index:
Relationship_2_FK*/createindexRelationship_2_FKonRelationship_2(snoASC
Relationship_3_FK*/createindexRelationship_3_FKonRelationship_2(cnoASC
*/
/*========createtable
学生(
numeric(10)
notnull,
sno1
null,
sdept1
sname
numeric(11)
cno3
constraint
PK_学生primarykeynonclustered(sno)
/*
)go
Relationship_4_FK*/
createindexRelationship_4_FKon学生(
sno1ASC,
sdept1ASC
createtable
学生成绩表(
numeric(20)
cname2
grade1
constraintPK
_学生成绩表
primarykeynonclustered(sno1,sdept1)
Relationship_5_FK*/createindexRelationship_5_FKon学生成绩表(anoASC
/*========
教师(
tname
tclass
char(5)
cname1
constraintPK_教师primarykeynonclustered(tno)
管理员*/
/*==============================================================*/createtable管理员(
anonumeric(20)notnull,
apasswordchar(10)null,
constraintPK_管理员primarykeynonclustered(ano))go
课程表(
cname
constraintPK_课程表primarykeynonclustered(cno)
Relationship_1_FK
createindexRelationship_1_FKon课程表(tnoASC)go
/*=======================================
Relationship_6_FK*//*=======================================createindexRelationship_6_FKon课程表(sno1ASC,sdept1ASC
addconstraintFK_RELATION_RELATIONS_学生foreignkey(sno)references学生(sno)
addconstraintFK_RELATION_RELATIONS_课程表foreignkey(cno)references课程表(cno)
altertable学生
addconstraintFK_学生—RELATIONS学生成绩表foreignkey(snol,
sdept1)
addconstraintFK_学生成绩表—RELATIONS管理员foreignkey(ano)
references管理员(ano)
addconstraintFK_课程表—RELATIONS教师foreignkey(tno)
references教师(tno)
addconstraintFK_课程表—RELATIONS学生成绩表foreignkey(sno1,
references
学生成绩表(sno1,sdept1)