




版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
1、教务管理系统数据库(SQL Server 2008 + delphi7)实验报告班级:姓名:学号:指导教师:完成日期:目录第一章 系统概述3第二章 系统分析3第三章 系统设计4第四章 系统功能9第五章 系统实现9第六章 源程序附录15第七章 参考文献73第一章 系统概述学校学生管理信息系统是针对学校人事处的大量业务处理工作而开发的管理软件,是典型的管理信息系统(Management Information System).它是一个教育单位不可缺少的部分,它的内容对于学校的决策者和管理者来说都至关重要,它能够为用户提供充足的信息和快捷的查询手段。能有效的帮助学校和老师掌握学生的情况,为学生提供成
2、绩跟课程方面的查询。本系统是以delphi7编辑用户界面,以SQL server 2008为数据源后台而成的学生信息管理系统。本系统是以计算机为基础,由人和计算机结合的对信息进行收集、存储、维护、加工、传递和使用的一种管理系统,其目的是使人流、物流、资金流和信息流处于最佳状态,以最少的资源投入获得最佳的综合效益.本系统主要包括学生信息管理模块、教师信息管理模块、课程信息管理模块、成绩信息管理模块和系统维护模块等部分。在校务管理中,为有关部门提供完整、综合、共享的信息,对于学校的教育管理、教务和科研等都有很大的实用价值。第二章系统分析1、问题定义随着科学技术的不断提高,计算机科学日渐成熟,其强大
3、功能已为人们深刻认识,它已进入人们生活的各个领域,并发挥了越来越重要的作用,针对人工管理的缺点,最好的解决办法就是借助计算机技术提供一个电子化的学生信息管理平台。为了更好地管理学生和教职工的资料文档,我开发一个软件工程学生信息管理系统.教师和学生可以应用该系统实现如下功能:1、可随时查询出不同系及各系教师与各系学生情况,系、教师与学生各反映如下情况:系:系号、系名、系负责人、专业数等。教师:工号、姓名、性别、职称、工龄、出生年月、基本工资等。学生:学号、姓名、性别、年龄等.2、为简单起见教师与学生区分系别,而课程不分系,课程需反映如下信息:课程代号、课程名、课时数、必修课、学分.3、学生入学时
4、新生需录入登记,登记后即可选课学习课程(一学期约20学分).4、一门只由一位教师上,一位教师可上多门课,满30人才开课。5、学生选每门课有个成绩,若成绩不及格则补考后还需记录补考成绩.1)在某数据库管理系统中建立各关系模式对应的库表,并设计所需的视图、索引等。2)能对各库表进行输入、修改、删除、添加、查询、打印等基本操作。3)新生入校登记后可即时选课,老生每学期开始前可选课或作选课调整,一般要选共约20学分的若干门课程。4)能明细查询某学生的选课情况及某课程的选修学生情况。5)能统计查询出某学生的成绩单(包括总成绩、平均成绩、不及格门数等)及某门课的选课人数、最高分、最低分、平均成绩等统计信息
5、。6)能分析出某教师的教学质量情况(可根据该教师所任所有课优良数平均超过一定百分比来粗略评定)。7)其他你认为子系统应有的查询、统计功能.8)要求子系统设计得界面友好,功能选择方便合理,并适当考虑子系统在其安全性、完整性、备份、恢复等方面的功能要求2、可行性分析1项目目标:学生和老师可以方便的进行各自所需要的信息管理活动,同时可以查询和修改各自的信息,以便学校管理。2运行环境:(1)以Windows98 以上/ME/2000/XP作为学生选课管理系统的后台操作系统.(2)前台开发程序为DELPHI,SQL Server 2008。(3)后台数据SQL Server 2008。(4)主要硬件设备
6、:PC机一台。.3技术可行性:本系统仅仅简单的实现了教务管理系统的基本功能和需求,具有一定的实用性。但真正意义上的大型信息管理存储还是不太现实.对于大量信息的维护也不具有很强的稳定性。但是操作简单,适合小型的学生信息管理,维护也更为方便。技术要求也不是很高,有一点delphi和SQL server 技术基础就行了。4。总体分析:成本低,出错率低,使学校实现现代化网络教学管理。第三章 系统设计根据该系统的需求,数据库采用Microsoft SQL Server 2008 ,它完全设和本系统的工作需求,它所支持的字段数据类型包括数值、字符、日期时间及二进制和图片等类型,是当前的主流数据库产品之一。
7、它还具有性能稳定、便于操作维护和具有较好的安全可靠性等特点,是作为服务器端数据库平台的理想选择。根据系统的需求,系统用到的各种数据表如下图所示。学生信息表教师信息表课程信息表管理信息表教师课程表成绩信息表表与表之间的关系如下图所示:成绩评定查询成绩查询课程查询新增删除修改查询查询修改密码修改密码修改密码个人信息个人信息个人信息网上选课开通选课修改新增删除修改新增删除管理员教职工学生 E-R 关系图第四章 系统功能1. 学生模块此模块为学生操作模块。学生可以通过此模块实现查看个人信息、修改密码、查看课程信息、才查看成绩信息、网上选课(在管理员开通选课前提下)诸多功能。2. 教职工模块此模块为教职
8、工操作模块。教职工可以通过此模块实现查看个人信息、修改密码、查看课程信息、输入学生平时成绩和期末成绩诸多功能。3. 系统管理员模块此模块为系统管理员操作模块。系统管理员可以通过此模块实现查看管理员信息、修改密码、查看、新增、修改、删除学生信息、查看、新增、删除、修改教职工信息、查看、新增、删除、修改课程信息、开通、关闭选课诸多功能.第五章 系统实现1.主界面2。登陆界面3。学生界面(1)查看个人信息(2)修改密码(3)成绩查询(4)课程查询(5)网上选课选课提示选课界面已选提示成功提示删除提示4. 教职工界面(1) 个人信息(同学生界面)(2) 修改密码(同学生界面)(3) 课程查询(同学生界
9、面)(4) 成绩评定5. 管理员界面(1) 个人信息(同学生界面)(2) 修改密码(同学生界面)(3) 学生查询管理(4) 学生信息修改(5) 教师信息查询(6) 教师信息修改(7) 课程信息查询(8) 课程信息修改(9) 成绩查询第六章 源程序附录unit Unit1;interfaceuses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, ExtCtrls, StdCtrls,Unit2, jpeg, DB, ADODB;type TForm1 = class(TFor
10、m) Button1: TButton; Button2: TButton; Panel1: TPanel; Image1: TImage; Label1: TLabel; Label2: TLabel; ADOConnection1: TADOConnection; Timer1: TTimer; procedure Button1Click(Sender: TObject); procedure Button2Click(Sender: TObject); procedure Timer1Timer(Sender: TObject); private Private declaration
11、s public Public declarations end;var Form1: TForm1;implementationR *.dfmprocedure TForm1。Button1Click(Sender: TObject);begin Form2.ManualDock(Form1。Panel1,nil,alNone); Form2。Show; Panel1.Visible :=True;end;procedure TForm1.Button2Click(Sender: TObject);begin if MessageDlg(确认退出整个系统吗?',mtConfirmat
12、ion,mbYes,mbNo,0)=mrYes then begin Application.Terminate; end;end;procedure TForm1.Timer1Timer(Sender: TObject);begin Label2。Caption:=DateTimeToStr(Now);end;end。unit Unit2;interfaceuses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls, DB, ADODB,Unit3;type
13、 TForm2 = class(TForm) Label1: TLabel; Label2: TLabel; Label3: TLabel; ComboBox1: TComboBox; Edit1: TEdit; Edit2: TEdit; Button1: TButton; Button2: TButton; ADOConnection1: TADOConnection; ADOQuery1: TADOQuery; Label4: TLabel; Button3: TButton; Label5: TLabel; Edit3: TEdit; procedure ComboBox1Change
14、(Sender: TObject); procedure Button1Click(Sender: TObject); procedure Button2Click(Sender: TObject); procedure FormCreate(Sender: TObject); procedure Button3Click(Sender: TObject); procedure FormShow(Sender: TObject); private Private declarations public Public declarations end;var Form2: TForm2;impl
15、ementation uses Unit1,Unit8,Unit12;$R .dfmprocedure TForm2。ComboBox1Change(Sender: TObject);begin case ComboBox1。ItemIndex of 0:Label2.Caption:='账号 ; 1:Label2。Caption:=工号 '; else Label2。Caption:=学号 'end; end;procedure TForm2。Button1Click(Sender: TObject);begin if Edit3。Text=Label4。Captio
16、n then begin case ComboBox1。ItemIndex of 0:begin ADOQuery1.Close; ADOQuery1.SQL.Clear; ADOQuery1。SQL.Text:=select from 管理信息表 where 账号='+Edit1。Text+'' AND 密码=+Edit2.Text+ AND 用户名='+ComboBox1。Text+'; ADOQuery1.Open; if ADOQuery1。RecordCount=0 then begin ShowMessage(用户名或密码错误,请重新登录);
17、 end else begin Form12.Show; Form2.Close; Form1。Panel1。Visible:=False; end; end; 1:begin ADOQuery1。Close; ADOQuery1。SQL。Clear; ADOQuery1.SQL。Text:=select from 管理信息表 where 账号=''+Edit1。Text+'and 密码 =''+Edit2。Text+'and 用户名 ='''+ComboBox1。Text+''; ADOQuery1。Op
18、en; if ADOQuery1.RecordCount=0 then begin ShowMessage(用户名或密码错误,请重新登录); end else begin Form8。Show; Form2。Close; Form1.Panel1。Visible:=False; end; end; 2:begin ADOQuery1.Close; ADOQuery1.SQL.Clear; ADOQuery1。SQL.Text:='select from 管理信息表 where 账号=+Edit1.Text+'and 密码 ='+Edit2.Text+'and 用
19、户名 =+ComboBox1.Text+'; ADOQuery1.Open; if ADOQuery1.RecordCount=0 then begin ShowMessage('用户名或密码错误,请重新登陆'); end else begin Form3。Show; Form2。Close; Form1。Panel1。Visible:=False; end; end; else ShowMessage('请选择身份); end; end else ShowMessage(验证码错误); end;procedure TForm2。Button2Click(Sen
20、der: TObject);begin Form2.Close; Form1.Panel1。Visible:=False;end;procedure TForm2。FormCreate(Sender: TObject); begin Randomize;end;procedure TForm2。Button3Click(Sender: TObject); var i,j:Integer; c:Char;begin Label4.Caption:='; /这个是标签 for j:=0 to 3 do /随机生成4个a到z的字符串 begin i:=Random(24); c:=chr(o
21、rd(a) + i); Label4。Caption:=Label4。Caption + c; end; begin Randomize;end;end;procedure TForm2。FormShow(Sender: TObject); var i,j:Integer; c:Char;begin Label4。Caption:=' /这个是标签 for j:=0 to 3 do /随机生成4个a到z的字符串 begin i:=Random(24); c:=chr(ord(a') + i); Label4。Caption:=Label4.Caption + c; end;en
22、d;end。unit Unit3;interfaceuses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls, ExtCtrls, jpeg, DB, ADODB, DBCtrls;type TForm3 = class(TForm) Button1: TButton; Button2: TButton; Button3: TButton; Button4: TButton; Panel1: TPanel; Image1: TImage; DBText1:
23、TDBText; DataSource1: TDataSource; ADOQuery1: TADOQuery; ADOConnection1: TADOConnection; Label1: TLabel; Timer1: TTimer; Label2: TLabel; procedure Button1Click(Sender: TObject); procedure Button3Click(Sender: TObject); procedure Button2Click(Sender: TObject); procedure Button4Click(Sender: TObject);
24、 procedure Image1Click(Sender: TObject); procedure Timer1Timer(Sender: TObject); private Private declarations public Public declarations end;var Form3: TForm3;implementation uses Unit4,Unit5,Unit6,Unit7,Unit19,Unit2;R *.dfmprocedure TForm3。Button1Click(Sender: TObject);begin Form5。Close; Form6。Close
25、; Form7。Close; Form4。ManualDock(Form3.Panel1,nil,alNone); Form4.Show; Panel1。Visible:=True;end;procedure TForm3。Button3Click(Sender: TObject);begin Form4.Close; Form6。Close; Form7。Close; Form5.ManualDock(Form3.Panel1,nil,alNone); Form5。Show; Panel1。Visible:=True;end;procedure TForm3。Button2Click(Sen
26、der: TObject);begin Form4。Close; Form5.Close; Form7。Close; Form6.ManualDock(Form3。Panel1,nil,alNone); Form6.Show; Panel1。Visible:=True;end;procedure TForm3.Button4Click(Sender: TObject);begin if Form19.Label11。Caption='已开通选课 then begin Form4.Close; Form5.Close; Form6.Close; Form7。ManualDock(Form
27、3。Panel1,nil,alNone); Form7.Show; Panel1。Visible:=True; end else ShowMessage('选课系统已关闭!'); end;procedure TForm3。Image1Click(Sender: TObject);begin ADOQuery1。Close; ADOQuery1。SQL。Clear; ADOQuery1.SQL。Add('select 姓名 from 学生信息表 where 学号=+Form2。Edit1。Text+''); ADOQuery1。Open;end;proce
28、dure TForm3。Timer1Timer(Sender: TObject);begin Label1.Caption:=DateTimeToStr(Now);end;end。unit Unit4;interfaceuses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, Grids, DBGrids, DB, ADODB, StdCtrls;type TForm4 = class(TForm) DBGrid1: TDBGrid; ADOQuery1: TADOQuery
29、; DataSource1: TDataSource; Button1: TButton; Button2: TButton; Button3: TButton; GroupBox1: TGroupBox; Label1: TLabel; Label2: TLabel; Label3: TLabel; Label4: TLabel; Edit1: TEdit; Edit2: TEdit; Edit3: TEdit; Edit4: TEdit; Label5: TLabel; Button4: TButton; Button5: TButton; Button6: TButton; proced
30、ure Button1Click(Sender: TObject); procedure Button3Click(Sender: TObject); procedure Button2Click(Sender: TObject); procedure GroupBox1Click(Sender: TObject); procedure Button6Click(Sender: TObject); procedure Button4Click(Sender: TObject); procedure Button5Click(Sender: TObject); private Private d
31、eclarations public Public declarations end;var Form4: TForm4;implementation uses Unit2;R 。dfmprocedure TForm4。Button1Click(Sender: TObject);begin GroupBox1。Visible:=False; DBGrid1。Visible:=True; ADOQuery1。Close; ADOQuery1。SQL.Clear; begin ADOQuery1。SQL.Add(select from 学生信息表 where 学号='+Form2.Edit
32、1。Text+); ADOQuery1。Open; end;end;procedure TForm4。Button3Click(Sender: TObject);begin ADOQuery1。Close; DBGrid1。Visible:=False; GroupBox1。Visible:=False; end;procedure TForm4.Button2Click(Sender: TObject);begin DBGrid1。Visible:=False; GroupBox1。Visible:=True;end;procedure TForm4.GroupBox1Click(Sende
33、r: TObject);var i,j:Integer; c:Char;begin Label5。Caption:='; /这个是标签 for j:=0 to 3 do /随机生成4个a到z的字符串 begin i:=Random(24); c:=chr(ord(a') + i); Label5.Caption:=Label5.Caption + c; end; begin Randomize; end;end;procedure TForm4。Button6Click(Sender: TObject);begin GroupBox1。Visible:=False;end;pr
34、ocedure TForm4。Button4Click(Sender: TObject); var i,j:Integer; c:Char;begin Label5。Caption:=; /这个是标签 for j:=0 to 3 do /随机生成4个a到z的字符串 begin i:=Random(24); c:=chr(ord(a) + i); Label5.Caption:=Label5。Caption + c; end; begin Randomize; end;end;procedure TForm4.Button5Click(Sender: TObject);begin if Mess
35、ageDlg('确认修改吗?,mtConfirmation,mbYes,mbNO,0)=mrYes then begin if Edit4。Text=Label5。Caption then begin ADOQuery1.Close; ADOQuery1。SQL。Clear; ADOQuery1。SQL。Text:=select from 管理信息表 where 账号='+Form2。Edit1。Text+'and 密码 ='+Edit1。Text+'; ADOQuery1。Open; if ADOQuery1。RecordCount=1 then be
36、gin if Edit2。Text=Edit3.Text then begin ADOQuery1。Close; ADOQuery1.SQL。Clear; ADOQuery1。SQL.Add(Update 管理信息表 SET 密码=:A where 账号=+Form2.Edit1。Text+'); ADOQuery1。Parameters.ParamByName(A)。Value:=Edit2。Text; ADOQuery1。ExecSQL; ShowMessage(修改成功); end else ShowMessage(新密码不一致') end else ShowMessag
37、e(原密码错误); end else ShowMessage(验证码错误'); end; Edit1.Text:=; Edit2.Text:=''; Edit3.Text:='; Edit4.Text:=';end;end.unit Unit5;interfaceuses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, DB, ADODB, StdCtrls, Grids, DBGrids;type TForm5 = class(TFo
38、rm) DBGrid1: TDBGrid; Button1: TButton; Button2: TButton; ADOQuery1: TADOQuery; DataSource1: TDataSource; procedure Button1Click(Sender: TObject); procedure Button2Click(Sender: TObject); private Private declarations public Public declarations end;var Form5: TForm5;implementation uses Unit2;R *。dfmp
39、rocedure TForm5。Button1Click(Sender: TObject);begin DBGrid1。Visible:=True; ADOQuery1.Close; ADOQuery1.SQL.Clear; begin ADOQuery1。SQL。Add('select * from 成绩信息表 where 学号=''+Form2.Edit1.Text+); ADOQuery1。Open; end;end;procedure TForm5。Button2Click(Sender: TObject);begin ADOQuery1.Close; DBGr
40、id1。Visible:=False; end;end。unit Unit6;interfaceuses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, DB, ADODB, StdCtrls, Grids, DBGrids;type TForm6 = class(TForm) DBGrid1: TDBGrid; Button1: TButton; Button2: TButton; ADOQuery1: TADOQuery; DataSource1: TDataSource
41、; procedure Button1Click(Sender: TObject); procedure Button2Click(Sender: TObject); private Private declarations public Public declarations end;var Form6: TForm6;implementation uses Unit2;R 。dfmprocedure TForm6。Button1Click(Sender: TObject);begin DBGrid1.Visible:=True; ADOQuery1。Close; ADOQuery1。SQL
42、.Clear; begin ADOQuery1.SQL。Add('select from 课程信息表 where 学号='+Form2。Edit1。Text+''); ADOQuery1。Open; end;end;procedure TForm6.Button2Click(Sender: TObject);begin ADOQuery1。Close; DBGrid1。Visible:=False;end;end.unit Unit7;interfaceuses Windows, Messages, SysUtils, Variants, Classes, Gr
43、aphics, Controls, Forms, Dialogs, StdCtrls, Grids, DBGrids, DB, ADODB;type TForm7 = class(TForm) Button1: TButton; ADOQuery1: TADOQuery; DataSource1: TDataSource; DBGrid1: TDBGrid; Label1: TLabel; Edit1: TEdit; Button2: TButton; Button3: TButton; DBGrid2: TDBGrid; Button4: TButton; ADOQuery2: TADOQu
44、ery; ADOQuery3: TADOQuery; ADOQuery4: TADOQuery; DataSource2: TDataSource; ADOQuery5: TADOQuery; procedure Button1Click(Sender: TObject); procedure Button2Click(Sender: TObject); procedure Button4Click(Sender: TObject); procedure Button3Click(Sender: TObject); private Private declarations public Pub
45、lic declarations end;var Form7: TForm7;implementation uses Unit2;$R 。dfmprocedure TForm7。Button1Click(Sender: TObject);begin ADOQuery3。Close; ADOQuery3。SQL。Clear; ADOQuery3.SQL。Add(select from 教师课程表); ADOQuery3。Open;end;procedure TForm7。Button2Click(Sender: TObject);begin ADOQuery1.Close; ADOQuery1。
46、SQL。Clear; ADOQuery1。SQL。Text:=select from 教师课程表 where 课程号='''+Edit1。Text+' ADOQuery1.Open; if ADOQuery1.RecordCount=0 then begin ShowMessage('此课程不存在); end else ADOQuery1.Close; ADOQuery1。SQL。Clear; ADOQuery1。SQL。Text:=select from 课程信息表 where 课程号=''+Edit1。Text+and 学号=''+Form2。Edit1.Text+'; ADOQuery1。Open; if ADOQuery1.RecordCount=0 then begin if MessageDlg(确认选课吗?,mtConfirmation,mbYes,mbNo,0)=mrYes then begin ADOQuery2。Close; ADOQuery2。SQL。Clear;
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- (1)-专题01 字音字形辨析
- 《国电南瑞内部路》课件
- 初中数学浙教版九年级上册第2章 简单事件的概率综合与测试教案
- 九年级物理上册 13.5怎样认识和测量电压教学设计 (新版)粤教沪版
- 厦门软件职业技术学院《品牌策划与设计管理》2023-2024学年第二学期期末试卷
- 山东传媒职业学院《滑雪II》2023-2024学年第一学期期末试卷
- 绍兴文理学院《资产评估》2023-2024学年第二学期期末试卷
- 西藏民族大学《合唱与重唱》2023-2024学年第二学期期末试卷
- 无锡商业职业技术学院《化学电池设计》2023-2024学年第二学期期末试卷
- 吕梁职业技术学院《团体操编排》2023-2024学年第二学期期末试卷
- 二手房管理制度
- 课件-自动化搬运机器人
- 汽车产业智能化升级路径-深度研究
- 研发中心工作流程
- 出租羊场合同范例
- 任务5 制作学院网站导航条
- 卫星导航定位技术与应用知到智慧树章节测试课后答案2024年秋南京工业大学
- 开封市第二届职业技能大赛无人机装调检修项目技术文件(国赛项目)
- 开题报告:高等职业院校双师型教师评价指标体系构建研究
- 医疗救助政策
- 浙江省宁波市余姚市2024年中考英语模拟试题(含答案)
评论
0/150
提交评论