资源描述
教务管理系统数据库
(SQL Server + delphi7)
实验报告
班级:7
姓名:787
学号:787
指引教师:
完毕日期:
目录
第一章 系统概述……………………………………………3
第二章 系统分析……………………………………………3
第三章 系统设计……………………………………………4
第四章 系统功能……………………………………………9
第五章 系统实现……………………………………………9
第六章 源程序附录…………………………………………15
第七章 参照文献……………………………………………73
第一章 系统概述
学校学生管理信息系统是针对学校人事处大量业务解决工作而开发管理软件,是典型管理信息系统(Management Information System)。它是一种教诲单位不可缺少某些,它内容对于学校决策者和管理者来说都至关重要,它可觉得顾客提供充分信息和快捷查询手段。能有效协助学校和教师掌握学生状况,为学生提供成绩跟课程方面查询。
本系统是以delphi7编辑顾客界面,以SQL server 为数据源后台而成学生信息管理系统。本系统是以计算机为基本,由人和计算机结合对信息进行收集、存储、维护、加工、传递和使用一种管理系统,其目是使人流、物流、资金流和信息流处在最佳状态,以至少资源投入获得最佳综合效益。本系统重要涉及学生信息管理模块、教师信息管理模块、课程信息管理模块、成绩信息管理模块和系统维护模块等某些。在校务管理中,为关于部门提供完整、综合、共享信息,对于学校教诲管理、教务和科研等均有很大实用价值。
第二章 系统分析
1、问题定义
随着科学技术不断提高,计算机科学日渐成熟,其强大功能已为人们深刻结识,它已进入人们生活各个领域,并发挥了越来越重要作用,针对人工管理缺陷,最佳解决办法就是借助计算机技术提供一种电子化学生信息管理平台。为了更好地管理学生和教职工资料文档,我开发一种软件工程学生信息管理系统。教师和学生可以应用该系统实现如下功能:
1、可随时查询出不同系及各系教师与各系学生状况,系、教师与学生各反映如下状况:
系:系号、系名、系负责人、专业数等。
教师:工号、姓名、性别、职称、工龄、出生年月、基本工资等。
学生:学号、姓名、性别、年龄等。
2、为简朴起见教师与学生区别系别,而课程不分系,课程需反映如下信息:
课程代号、课程名、学时数、必修课、学分。
3、学生入学时新生需录入登记,登记后即可选课学习课程(一学期约20学分)。
4、一门只由一位教师上,一位教师可上多门课,满30人才开课。
5、学生选每门课有个成绩,若成绩不及格则补考后还需记录补考成绩。
1)在某数据库管理系统中建立各关系模式相应库表,并设计所需视图、索引等。
2)能对各库表进行输入、修改、删除、添加、查询、打印等基本操作。
3)新生入校登记后可即时选课,老生每学期开始前可选课或作选课调节,普通要选共约20学分若干门课程。
4)能明细查询某学生选课状况及某课程选修学生状况。
5)能记录查询出某学生成绩单(涉及总成绩、平均成绩、不及格门数等)及某门课选课人数、最高分、最低分、平均成绩等记录信息。
6)能分析出某教师教学质量状况(可依照该教师所任所有课优良数平均超过一定比例来粗略评估)。
7)其她你以为子系统应有查询、记录功能。
8)规定子系统设计得界面和谐,功能选取以便合理,并恰当考虑子系统在其安全性、完整性、备份、恢复等方面功能规定
2、可行性分析
1.项目目的:学生和教师可以以便进行各自所需要信息管理活动,同步可以查询和修改各自信息,以便学校管理。
2.运营环境:
(1)以Windows98 以上/ME//XP作为学生选课管理系统后台操作系统。
(2)前台开发程序为DELPHI,SQL Server 。
(3)后台数据SQL Server 。
(4)重要硬件设备:PC机一台。。
3.技术可行性:本系统仅仅简朴实现了教务管理系统基本功能和需求,具备一定实用性。但真正意义上大型信息管理存储还是不太现实。对于大量信息维护也不具备很强稳定性。
但是操作简朴,适合小型学生信息管理,维护也更为以便。技术规定也不是很高,有一点delphi和SQL server 技术基本就行了。
4.总体分析:成本低,出错率低,使学校实现当代化网络教学管理。
第三章 系统设计
依照该系统需求,数据库采用Microsoft SQL Server ,它完全设和本系统工作需求,它所支持字段数据类型涉及数值、字符、日期时间及二进制和图片等类型,是当前主流数据库产品之一。它还具备性能稳定、便于操作维护和具备较好安全可靠性等特点,是作为服务器端数据库平台抱负选取。依照系统需求,系统用到各种数据表如下图所示。
学生信息表
教师信息表
课程信息表
管理信息表
教师课程表
成绩信息表
表与表之间关系如下图所示:
成绩评估
查询成绩
查询
课程
查询
新增
删除
修改
查询
查询
修改密码
修改密码
修改密码
个人信息
个人信息
个人信息
网上选课
开通选课
修改
新增
删除
修改
新增
删除
管理员
教职工
学生
E-R 关系图
第四章 系统功能
1. 学生模块
此模块为学生操作模块。学生可以通过此模块实现查看个人信息、修改密码、查看课程信息、才查当作绩信息、网上选课(在管理员开通选课前提下)诸多功能。
2. 教职工模块
此模块为教职工操作模块。教职工可以通过此模块实现查看个人信息、修改密码、查看课程信息、输入学生平时成绩和期末成绩诸多功能。
3. 系统管理员模块
此模块为系统管理员操作模块。系统管理员可以通过此模块实现查看守理员信息、修改密码、查看、新增、修改、删除学生信息、查看、新增、删除、修改教职工信息、查看、新增、删除、修改课程信息、开通、关闭选课诸多功能。
第五章 系统实现
1.主界面
2.登陆界面
3.学生界面
(1)查看个人信息
(2)修改密码
(3)成绩查询
(4)课程查询
(5)网上选课
选课提示
选课界面
已选提示
成功提示
删除提示
4. 教职工界面
(1) 个人信息(同窗生界面)
(2) 修改密码(同窗生界面)
(3) 课程查询(同窗生界面)
(4) 成绩评估
5. 管理员界面
(1) 个人信息(同窗生界面)
(2) 修改密码(同窗生界面)
(3) 学生查询管理
(4) 学生信息修改
(5) 教师信息查询
(6) 教师信息修改
(7) 课程信息查询
(8) 课程信息修改
(9) 成绩查询
第六章 源程序附录
unit Unit1;
interface
uses
Windows,Messages,SysUtils,Variants,Classes,Graphics,Controls,Forms,
Dialogs,ExtCtrls,StdCtrls,Unit2,jpeg,DB,ADODB;
type
TForm1 = class(TForm)
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 declarations }
public
{ Public declarations }
end;
var
Form1:TForm1;
implementation
{$R *.dfm}
procedure 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('确认退出整个系统吗?',mtConfirmation,[mbYes,mbNo],0)=mrYes then
begin
Application.Terminate;
end;
end;
procedure TForm1.Timer1Timer(Sender:TObject);
begin
Label2.Caption:=DateTimeToStr(Now);
end;
end.
unit Unit2;
interface
uses
Windows,Messages,SysUtils,Variants,Classes,Graphics,Controls,Forms,
Dialogs,StdCtrls,DB,ADODB,Unit3;
type
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(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;
implementation
uses
Unit1,Unit8,Unit12;
{$R *.dfm}
procedure 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.Caption 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('顾客名或密码错误,请重新登录');
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.Open;
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 顾客名 ='''+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(Sender: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(ord('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;
end;
end.
unit Unit3;
interface
uses
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: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);
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 *.dfm}
procedure TForm3.Button1Click(Sender:TObject);
begin
Form5.Close;
Form6.Close;
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(Sender: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(Form3.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;
procedure TForm3.Timer1Timer(Sender:TObject);
begin
Label1.Caption:=DateTimeToStr(Now);
end;
end.
unit Unit4;
interface
uses
Windows,Messages,SysUtils,Variants,Classes,Graphics,Controls,Forms,
Dialogs,Grids,DBGrids,DB,ADODB,StdCtrls;
type
TForm4 = class(TForm)
DBGrid1:TDBGrid;
ADOQuery1:TADOQuery;
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;
procedure 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 declarations }
public
{ Public declarations }
end;
var
Form4:TForm4;
implementation
uses
Unit2;
{$R *.dfm}
procedure TForm4.Button1Click(Sender:TObject);
begin
GroupBox1.Visible:=False;
DBGrid1.Visible:=True;
ADOQuery1.Close;
ADOQuery1.SQL.Clear;
begin
ADOQuery1.SQL.Add('select * from 学生信息表 where 学号='''+Form2.Edit1.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(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.Button6Click(Sender:TObject);
begin
GroupBox1.Visible:=False;
end;
procedure 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 MessageDlg('确认修改吗?',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
begin
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
ShowMessage('原密码错误');
end
else
ShowMessage('验证码错误');
end;
Edit1.Text:='';
Edit2.Text:='';
Edit3.Text:='';
Edit4.Text:='';
end;
end.
unit Unit5;
interface
uses
Windows,Messages,SysUtils,Variants,Classes,Graphics,Controls,Forms,
Dialogs,DB,ADODB,StdCtrls,Grids,DBGrids;
type
TForm5 = class(TForm)
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 *.dfm}
pr
展开阅读全文