Oracle学生成绩管理整理.docx

上传人:b****4 文档编号:5403526 上传时间:2022-12-16 格式:DOCX 页数:32 大小:107.65KB
下载 相关 举报
Oracle学生成绩管理整理.docx_第1页
第1页 / 共32页
Oracle学生成绩管理整理.docx_第2页
第2页 / 共32页
Oracle学生成绩管理整理.docx_第3页
第3页 / 共32页
Oracle学生成绩管理整理.docx_第4页
第4页 / 共32页
Oracle学生成绩管理整理.docx_第5页
第5页 / 共32页
点击查看更多>>
下载资源
资源描述

Oracle学生成绩管理整理.docx

《Oracle学生成绩管理整理.docx》由会员分享,可在线阅读,更多相关《Oracle学生成绩管理整理.docx(32页珍藏版)》请在冰豆网上搜索。

Oracle学生成绩管理整理.docx

Oracle学生成绩管理整理

Oracle数据库课程设计

题目学生考试管理系统

班级11网工2班

姓名马路瑶

学号

指导老师杨超峰

一、前言…………………………………………………2

二、需求分析……………………………………………3

三、系统设计……………………………………………5

四、数据库设计…………………………………………7

五、编程步骤……………………………………………19

六、测试…………………………………………………25

七、课程设计总结………………………………………33

八、参考资料……………………………………………34

九、附录…………………………………………………34

一、前言

学生考试管理是一个学校必不可少的部分,随着计算机和计算机知识的普及,学生考试管理系统得到了更大的发展空间,通过对学生考试管理系统的开发,可以提高校务人员的工作效率。

学生成绩管理是一个学校不可缺少的部分,一个良好的学生成绩管理系统应该能够为用户提供充足的信息和快捷的查询手段。

学生考试管理系统对学校加强学生考试管理有着极其重要的作用.由于各个大学都在持续扩招,学生的数量日益庞大,对于如何管理如此庞大的学生考试数据显得更为复杂,传统的手工成绩管理不仅工作量大,而且容易出现问题,如:

效率低、保密性差,另外时间一长,将产生大量的文件和数据,这对于查找、更新和维护都带来了不少的困难。

已不能适应时代的发展。

随着科学技术的不断提高,计算机科学日渐成熟,其强大的功能已为人们深刻认识,它已进入人类社会的各个领域并发挥着越来越重要的作用。

作为计算机应用的一部分,使用计算机对学生成绩信息进行管理,具有手工管理所无法比拟的优点。

例:

检索迅速、查找方便、可靠性高、存储量大、保密性好、寿命长、成本低等。

这些优点能够极大地提高管理者管理的效率,也是学校走向科学化、正规化管理,与世界接轨的重要条件。

因此,开发设计这样一套学生成考试理软件成为很有必要的事情.

二、需求分析

1.功能需求

1.学生基本信息及所选科目成绩的录入或导入。

2.基本信息的查询(分系、班级;分科目)与修改。

3.对每系或每班各科成绩进行分析(即求单科平均成绩、及格率和优秀率);

4.对所开课程的成绩分析(求其平均成绩,最高分和最低分);

5.对学生考试成绩进行排名(单科按系别或班级进行排名,对每一个班级,同一学期学生总体成绩进行排名,并显示各科成绩信息)

6.不及格情况的统计、导出、打印

2.系统需求

该学生成绩管理系统采用java语言开发研制,JavaBean作为行为模型,servlet作为响应服务器,DIV+CSS+javascript设计网页,oracle作为数据存储。

在完成用户需求同时,完成条件查询等功能。

针对学生成绩及其数据特点,可以全面实现对学生成绩的插入、查询、修改、删除和输出等功能的计算机管理。

它能使学生成绩数据的工作人员从繁重的工作中解脱出来,大大减轻了工作量,减少人为的工作失误,全面提高学生成绩管理的效率,从而使学校对于学生成绩的管理水平和技术水平跃上一个新的台阶。

3.系统开发环境

1.开发语言:

java+jsp

2.开发工具:

IE8.0,Tomcat,jdk1.7,dreamweaver

3.数据库:

Oracle10g

4.文档编写工具:

word

5.服务器端运行环境:

oracle10g,Tomcat,jdk1.7

6.客户端运行环境:

浏览器

三、系统设计

1.功能模块

2.系统流程图

3.数据字典

(1)数据存储

数据表:

用户表

表组成:

用户名,密码

数据项:

用户名

数据类型:

varchar

数据长度:

50

数据项:

密码

数据类型:

varchar

数据长度:

50

(2)数据流定义:

登陆

名称:

登陆

简述:

用户登陆系统

数据来源:

用户

数据去向:

用户表

数据组成:

用户名+密码

四、数据库设计

1.数据库结构设计

院系表(cs)

字段名

数据类型

是否为空

说明

Cs_class

Varchar2(50)

Notnull

班级名(主键)

Cs_dept

Varchar2(50)

Notnull

系别

Cs_grade

Varchar2(50)

Notnull

年级

成绩表(gd)

字段名

数据类型

是否为空

说明

Gd_stu_no

Varchar2(15)

Notnull

学号(联合主键、外键)

Gd_sub_subject

Varchar2(50)

Notnull

科目(联合主键、外键)

Gd_grade

Number(3)

Notnull

成绩

科目表(sub)

字段名

数据类型

是否为空

说明

Sub_subject

Varchar2(50)

Notnull

科目名(主键)

Sub_teacher_name

Varchar2(10)

任课老师名

学生表(student)

字段名

数据类型

是否为空

说明

Stu_no

Varchar2(15)

Notnull

学号(主键)

Stu_name

Varchar2(10)

Notnull

学生名

Stu_cs_class

Varchar2(50)

班级名(外键)

Stu_sex

Varchar(4)

Notnull

性别(约束)

Stu_birthday

Varchar2(50)

出生日期

Stu_phone

Varchar2(200)

联系电话

用户表(user_)

字段名

数据类型

是否为空

说明

name

Varchar2(50)

Notnull

用户名(主键)

Passwd

Varchar2(50)

notnull

密码

2.实体联系图

3.数据库源代码

selectuserenv('language')fromdual。

shutdownimmediatestartupmount

ALTERSYSTEMENABLERESTRICTEDSESSION。

ALTERSYSTEMSETJOB_QUEUE_PROCESSES=0。

ALTERSYSTEMSETAQ_TM_PROCESSES=0。

ALTERDATABASEOPEN。

alterdatabasecharactersetINTERNAL_USEUTF8。

shutdownimmediate

startup

createuserxz105151640043identifiedbyxz

/

grantdbatoxz

/

connxz105151640043/xz

/

setserveroutputon

/

createtableuser_(namevarchar(50)primarykey,passwdvarchar(50)notnull)

/

insertintouser_values('xz','xz')。

/

Commit

/

createtablecs(

cs_classvarchar(50)primarykey,

cs_deptvarchar(50)notnull,

cs_gradevarchar(50)notnull

/

createtablestudent(

stu_novarchar(15)primarykey,

stu_namevarchar(10)notnull,

stu_sexvarchar(4)notnullcheck(stu_sex='男'orstu_sex='女'),

stu_birthdayvarchar(50),

stu_phonevarchar(50),

stu_cs_classvarchar(50),

constraintclass_fkforeignkey(stu_cs_class)referencescs(cs_class)

ondeletecascade

/

createtablesub(

sub_subjectvarchar(50)primarykey,

sub_teacher_namevarchar(10)

/

createtablegd(

gd_stu_novarchar(15),

gd_sub_subjectvarchar(50),

gd_gradenumber(3)notnull,

primarykey(gd_stu_no,gd_sub_subject),

constraintfk_gd_stu_noforeignkey(gd_stu_no)referencesstudent(stu_no),

constraintfk_gd_sub_subjectforeignkey(gd_sub_subject)referencessub(sub_subject)

/

createorreplaceprocedurep_insert_stu(

p_stu_noinstudent.stu_no%type,

p_stu_nameinstudent.stu_name%type,

p_stu_sexinstudent.stu_sex%type,

p_stu_birthdayinstudent.stu_birthday%type,

p_stu_phoneinstudent.stu_phone%type,

p_stu_cs_classinstudent.stu_cs_class%type,

s_state_valuesoutnumber

)as

begin

insertintostudent(stu_no,stu_name,stu_sex,stu_birthday,stu_phone,stu_cs_class)

values(p_stu_no,p_stu_name,p_stu_sex,p_stu_birthday,p_stu_phone,p_stu_cs_class)。

ifsql%rowcount=1

thens_state_values:

=0。

endif。

exception

whenothersthens_state_values:

=1。

commit。

end。

/

createorreplaceprocedurec_insert_stu(

c_stu_noinstudent.stu_no%type,

c_state_valuesoutnumber)

as

begin

selectcount(*)intoc_state_valuesfromstudent

wherestu_no=c_stu_no。

end。

/

createorreplaceprocedurec_insert_stu_fk(

c_cs_classincs.cs_class%type,

c_state_values_fkoutnumber)

as

begin

selectcount(*)intoc_state_values_fkfromcs

wherecs_class=c_cs_class。

end。

/

createorreplaceprocedurep_insert_cs(

p_cs_deptincs.cs_dept%type,

p_cs_gradeincs.cs_grade%type,

p_cs_classincs.cs_class%type,

s_state_valuesoutnumber)

as

begin

insertintocs(cs_dept,cs_grade,cs_class)

values(p_cs_dept,p_cs_grade,p_cs_class)。

ifsql%rowcount=1

thens_state_values:

=0。

endif。

exception

whenothersthens_state_values:

=1。

commit。

end。

/

createorreplaceprocedurec_insert_cs(

c_cs_classincs.cs_class%type,

c_state_valuesoutnumber)

as

begin

selectcount(*)intoc_state_valuesfromcs

wherecs_class=c_cs_class。

end。

/

createorreplaceprocedurep_insert_sub(

p_sub_subjectinsub.sub_subject%type,

p_sub_teacher_nameinsub.sub_teacher_name%type,

s_state_valuesoutnumber)

as

begin

insertintosub(sub_subject,sub_teacher_name)

values(p_sub_subject,p_sub_teacher_name)。

ifsql%rowcount=1

thens_state_values:

=0。

endif。

exception

whenothersthens_state_values:

=1。

commit。

end。

/

createorreplaceprocedurec_insert_sub(

c_sub_subjectinsub.sub_subject%type,

c_state_valuesoutnumber)

as

begin

selectcount(*)intoc_state_valuesfromsub

wheresub_subject=c_sub_subject。

end。

/

createorreplaceprocedurep_insert_gd(

p_gd_stu_noingd.gd_stu_no%type,

p_gd_sub_subjectingd.gd_sub_subject%type,

p_gd_gradeingd.gd_grade%type,

s_state_valuesoutnumber)

as

begin

insertintogd(gd_stu_no,gd_sub_subject,gd_grade)

values(p_gd_stu_no,p_gd_sub_subject,p_gd_grade)。

ifsql%rowcount=1

thens_state_values:

=0。

endif。

exception

whenothersthens_state_values:

=1。

ifp_gd_grade=null

thens_state_values:

=2。

endif。

commit。

end。

/

createorreplaceprocedurec_insert_gd(

p_gd_stu_noingd.gd_stu_no%type,

p_gd_sub_subjectingd.gd_sub_subject%type,

c_state_valuesoutnumber)

as

begin

selectcount(*)intoc_state_valuesfrom(

selectgd_stu_nofromgd

wheregd_sub_subject=p_gd_sub_subject

wheregd_stu_no=p_gd_stu_no。

end。

/

createorreplaceprocedurec_insert_gd_fk1(

c_stu_noinstudent.stu_no%type,

c_state_values_fk1outnumber)

as

begin

selectcount(*)intoc_state_values_fk1fromstudent

wherestu_no=c_stu_no。

end。

/

createorreplaceprocedurec_insert_gd_fk2(

c_sub_subjectinsub.sub_subject%type,

c_state_values_fk2outnumber)

as

begin

selectcount(*)intoc_state_values_fk2fromsub

wheresub_subject=c_sub_subject。

end。

/

createorreplaceprocedurep_select_stu_no_info(

p_stu_noinoutstudent.stu_no%type,

p_stu_nameoutstudent.stu_name%type,

p_stu_sexoutstudent.stu_sex%type,

p_stu_birthdayoutstudent.stu_birthday%type,

p_stu_phoneoutstudent.stu_phone%type,

p_stu_cs_classoutstudent.stu_cs_class%type,

p_cs_deptoutcs.cs_dept%type,

p_cs_gradeoutcs.cs_grade%type,

c_state_valuesoutnumber)

as

begin

c_state_values:

=0。

selectstu_no,stu_name,stu_sex,stu_birthday,stu_phone,stu_cs_class,cs_dept,cs_grade

intop_stu_no,p_stu_name,p_stu_sex,p_stu_birthday,p_stu_phone,p_stu_cs_class,p_cs_dept,p_cs_grade

fromstudent,cs

wherestu_cs_class=cs_classandstu_no=p_stu_no。

exception

whenNO_DATA_FOUNDthenc_state_values:

=1。

whenothersthenc_state_values:

=2。

end。

/

createorreplaceprocedurep_select_stu_no_gd(p_stu_noinstudent.stu_no%type,cursor_gdoutsys_refcursor)

as

begin

opencursor_gdfor

selectgd_sub_subject,gd_grade

fromgd

wheregd_stu_no=p_stu_no。

end。

/

createorreplaceprocedurep_select_stu_name(

p_stu_nameinstudent.stu_name%type,

cursor_stuoutsys_refcursor,

c_state_valuesoutnumber)

as

begin

c_state_values:

=0。

opencursor_stufor

selectstu_no,stu_name,stu_sex,stu_birthday,stu_phone,stu_cs_class,cs_dept,cs_grade

fromstudent,cs

wherestu_name=p_stu_nameandstu_cs_class=cs_class。

exception

whenothersthenc_state_values:

=2。

end。

/

createorreplaceprocedurep_pm_sum(

cursor_gd_sumoutsys_refcursor

as

begin

opencursor_gd_sumfor

selectdistinctsno,stu_name,sum

fromstudent,(selectgd_stu_noassno,sum(gd_grade)assum

fromgd

groupbygd_stu_no

wherestu_no=sno

orderbysumdesc。

end。

/

createorreplaceprocedurep_pm_sub(

p_gd_sub_subjectingd.gd_sub_subject%type,

cursor_gd_suboutsys_refcursor

as

begin

opencursor_gd_subfor

selectgd_stu_no,stu_name,gd_grade

fromgd,student

wheregd_sub_subject=p_gd_sub_subjectandstu_no=gd_stu_no

orderbygd_gradedesc。

end。

/

createorreplaceprocedurep_pm_class(

p_stu_cs_classinstudent.stu_cs_class%type,

cursor_gd_classoutsys_refcursor

as

begin

opencursor_gd_classfor

selectdistinctsno,stu_name,sum

fromstudent,(selectgd_stu_noassno,sum(gd_grade)assum

fromgd

groupbygd_stu_no

wherestu_no=snoandstu_cs_class=p_stu_cs_class

orderbysumdesc。

end。

/

createorreplaceprocedurep_fx(

cursor_fxoutsys_refcursor

as

begin

opencursor_fxfor

selectgd_sub_subject,max(gd_grade)aszuigao,min(gd_grade)aszuidi,avg(gd_grade)aspingjun,SUM(CASEWHENgd_grade>=60THEN1ELSE

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

当前位置:首页 > 解决方案 > 学习计划

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1