数据库教学管理系统.doc_第1页
数据库教学管理系统.doc_第2页
数据库教学管理系统.doc_第3页
数据库教学管理系统.doc_第4页
数据库教学管理系统.doc_第5页
已阅读5页,还剩39页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

数据库原理课程设计专 业: 计算机科学与技术 班 级: 计算机(2)班 指导教师: 石宝英 姓 名: 张江 学 号: 201114600216 目 录一、概述.01二、需求分析.02三、数据逻辑设计.05四、软件功能设计.06五、程序源代码.07六、结束语.41一、 概述1:项目背景教学管理作为学校管理的一个重要方面,其可变因素多,管理方面繁琐复杂,时间跨度大,再加上其固有的基数大,因而形成了巨大的数据量。这些数据就是有用的信息,信息化对学生个人提出了驾驭和掌握最新信息技术的素质要求;信息技术提供了对教学进行重大革新的新手段;信息化也为提高教学质量,提高管理水平,工作效率创造了有效途径. 校园网信息系统建设的重要性越来越为成人高校所重视。2:编写目的该文档编写的目的主要有以下几点:(1)、为软件的编码提供参考(2)、为软件的使用者提供参考(3)、为软件测试提供参考3:软件定义 该软件是一款用于学校相关人员对学校日常教学的管理,其中包括对课程、选课、学生、班级、教师、成绩等相关内容的管理,具有学生管理、成绩管理、班级管理、教师管理、课程管理等相关功能的小型数据库管理应用系统。4:开发环境数据库:SQL Server 2005代码编写工具:Eclipse绘图工具:Microsoft Word二、需求分析1. 需求分析的任务需求分析的任务是调查应用领域,对应用领域中的信息要求和操作要求进行详细分析,形成需求分析说明书。重点是调查,收集与分析用户在数据管理中的信息要求,处理要求,数据的安全性与完整性要求。为了完成需求分析的任务,要详细调查待开发的数据库应用部门的情况,了解原系统工作概况,分析用户的各种需求,在此基础上确定新系统的功能。4新系统必须考虑今后的扩充和改变,不能仅仅按当前应用需求来设计数据库。2. 需要完成的功能1) 反映教学组织机构的总体状况。本教学管理系统主要由教师管理系统,学生管理系统以及领导管理系统等组成。2) 使管理者熟悉各部门的业务活动状况。调查各部门的业务活动情况,对现行管理信息有一个明确的认识。3) 使管理者可以完成对学生成绩表的浏览、查询和修改。4) 使管理者可以完成对教师授课情况等个方面的详细信息的修改和查询。5) 使管理者可以完成对各部门领导相关信息的查询和修改。3. 数据字典学生表说明数据项编号数据项名称数据项含义数据类型及存储与其他数据关系别名s-01code学号varchar(30)姓名s-02name学生姓名varchar(50)编号s-03sexy学生性别nchar(1)性别s-04age学生年龄int年龄s-05address家庭住址varchar(100)住址s-06birthday生日datetime生日s-07grade所在班级varchar(60)班级s-08major所学专业varchar(50)系教师表说明数据项编号数据项名称数据项含义数据类型及存储与其他数据关系别名t-01name教师姓名varchar(30)姓名t-02code教师编号varchar(50)编号t-03sexy教师性别nchar(1)性别t-04age教师年龄int年龄t-05address家庭住址varchar(100)住址t-06birthday生日datetime生日t-07salary每月所得工资int工资t-08major所教专业varchar(50)系t-09duty职称varchar(50)职称领导表说明数据项编号数据项名称数据项含义数据类型及存储与其他数据关系别名l-01name领导姓名varchar(30)姓名l-02code领导编号varchar(50)编号l-03sexy领导性别nchar(1)性别l-04age领导年龄int年龄l-05address家庭住址varchar(100)住址l-06birthday生日datetime生日l-07salary每月所得工资int工资l-08major所在院系varchar(50)系l-09duty职称varchar(50)职称课程表说明数据项编号数据项名称数据项含义数据类型及存储与其他数据关系别名c-01name课程名称varchar(30)课程名c-02code课程号varchar(50)课程号c-03credit所得学分int学分c-04precourse先行课varchar(50)先行课c-05quarter上课季度varchar(50)季度c-06teachername授课教师名varchar(50)同教师姓名教师名c-07studentnumber所容纳学生数int学生数c-08classnumber教室号int教室号c-09grade上课的班级varchar(50)班级c-10major上课学生所在院系varchar(50)同学生所学专业系分数表说明数据项编号数据项名称数据项含义数据类型及存储与其他数据关系别名m-01name学生姓名varchar(50)同学生姓名姓名m-02code学号varchar(50)同学生编号学号m-03mathmark数学分数int数学分数m-04chinesemark语文分数int语文分数m-05psychologymark心理学分数int心理学分数m-06englishmark英语分数int同教师姓名英语分数m-07grade所在班级varchar(60)同学生所在班级班级m-08major所在系varchar(50)同学生所在系系4. E-R模型图登陆信息领导登陆管理登陆教师登陆学生教学成绩课表查询录入教课用户名密码姓名年龄性别工资系职位姓名年龄性别系职位工资姓名性别系班级年龄学号学号班级分数课程类型课程名课程名学分先行课季度授课教师系三、数据库逻辑设计E-R图转换成的关系图学生表说明字段名含义说明数据类型空值情况主键情况code学号varchar(30)否是name学生姓名varchar(50)否否sexy学生性别nchar(1)是否age学生年龄int是否address家庭住址varchar(100)是否birthday生日datetime是否grade所在班级varchar(60)是否major所学专业varchar(50)是否教师表说明字段名含义说明数据类型空值情况主键情况name教师姓名varchar(30)否否code教师编号varchar(50)否是sexy教师性别nchar(1)是否age教师年龄int是否address家庭住址varchar(100)是否birthday生日datetime是否salary每月所得工资int是否major所教专业varchar(50)是否duty职称varchar(50)是否领导表说明字段名含义说明数据类型空值情况主键情况name领导姓名varchar(30)否否code领导编号varchar(50)否是sexy领导性别nchar(1)是否age领导年龄int是否address家庭住址varchar(100)是否birthday生日datetime是否salary每月所得工资int是否major所在院系varchar(50)是否duty职称varchar(50)是否课程表说明字段名含义说明数据类型空值情况主键情况name课程名称varchar(30)否否code课程号varchar(50)否是credit所得学分int是否precourse先行课varchar(50)是否quarter上课季度varchar(50)是否teachername授课教师名varchar(50)是否studentnumber所容纳学生数int是否classnumber教室号int否否grade上课的班级varchar(50)是否major上课学生所在院系varchar(50)是否分数表说明字段名含义说明数据类型空值情况主键情况name学生姓名varchar(50)否否code学号varchar(50)否是mathmark数学分数int是否chinesemark语文分数int是否psychologymark心理学分数int是否englishmark英语分数int是否grade所在班级varchar(60)是否major所在系varchar(50)是否四、软件功能设计教学管理系统学生信息管理系统学生分数系统学生课程系统教师信息系统领导信息系统学生信息删除学生信息更新学生信息添加教师信息添加教师信息删除教师信息更新领导信息更新领导信息更新领导信息更新课程修改课程信息查询分数查询分数修改五、程序源代码(注:实际应用系统为英文版,java语言编写)1.程序中类的设计:Course_Frame:这个是学生信息系统添加信息框架类courseBean:实现基本方法的课程类coursemanageframe:学生课程表信息系统的入口框架类From_course:课程表存储类From_Leader:领导存储类From_mark:学生表存储类From_student:学生存储类From_Teacher:教师存储类Leader_Frame:领导添加信息框架类leaderBean:领导类模型leadermanageframe:领导信息系统的入口框架类login:登陆界面类Mark_Frame:学生分数添加信息框架类markBean:实现基本方法的分数表类markmanageframe:学生分数表信息系统入口框架类PDA_Frame:主界面类,实现各个系统界面Show_Course:学生课程系统框架类Show_Leader:领导信息系统框架类Show_Mark:学生分数系统框架类Show_Student:学生信息系统框架类Show_Teacher:教师信息系统框架类Student_Frame:学生添加信息框架类studentBean:学生类模型studentmanageframe:学生信息系统的入口框架类Teacher_Frame:教师添加信息框架类teacherBean:教师类模型teachermanageframe:教师信息系统的入口框架类2.程序中各个类的核心代码(由于代码比较多,所以在此只写出了一些核心代码,由于有些类大同小异,比如学生类,老师类和领导类等,其中一些类以学生类为例子):1.程序中类的设计:public class login extends JPanel static final int WIDTH = 400;static final int HEIGHT = 250;JFrame loginframe;public static void main(String args) login log = new login();public void add(Component c, GridBagConstraints constraints, int x, int y,int w, int h) constraints.gridx = x;constraints.gridy = y;constraints.gridwidth = w;constraints.gridheight = h;add(c, constraints); login() loginframe = new JFrame(HeBei United University Teaching Management System);loginframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);GridBagLayout lay = new GridBagLayout();setLayout(lay);loginframe.add(this, BorderLayout.WEST);loginframe.setSize(WIDTH, HEIGHT);Toolkit kit = Toolkit.getDefaultToolkit();Dimension screenSize = kit.getScreenSize();int width = screenSize.width;int height = screenSize.height;int x = (width - WIDTH) / 2;int y = (height - HEIGHT) / 2;loginframe.setLocation(x, y);JButton ok = new JButton(Login);JButton cancel = new JButton(Give up);JLabel title = new JLabel(Administrator login);JLabel name = new JLabel(Administrator name);JLabel password = new JLabel(Password);final JTextField nameinput = new JTextField(15);final JTextField passwordinput = new JPasswordField(15);GridBagConstraints constraints = new GridBagConstraints();constraints.fill = GridBagConstraints.NONE;constraints.anchor = GridBagConstraints.EAST;constraints.weightx = 3;constraints.weighty = 4;add(title, constraints, 0, 0, 4, 1); / 使用网格组布局添加控件add(name, constraints, 0, 1, 1, 1);add(password, constraints, 0, 2, 1, 1);add(nameinput, constraints, 2, 1, 1, 1);add(passwordinput, constraints, 2, 2, 1, 1);add(ok, constraints, 1, 3, 1, 1);add(cancel, constraints, 2, 3, 1, 1);loginframe.setResizable(true);loginframe.setVisible(true);ok.addActionListener(new ActionListener() public void actionPerformed(ActionEvent Event) String nametext = nameinput.getText();String passwordtext = passwordinput.getText();String str = new String(passwordtext);boolean x = (nametext.equals(张江);boolean y = (str.equals(333); / 在此设置密码和用户名boolean z = (x & y);if (z = true) loginframe.dispose();PDA_Frame main = new PDA_Frame(); / 此界面就是后面的主界面System.out.println(welcome to Teaching Management System!); else if (z = false) nameinput.setText();passwordinput.setText(););cancel.addActionListener(new ActionListener() public void actionPerformed(ActionEvent Event) loginframe.dispose(););class PDA_Frame extends JFrame static final int WIDTH = 400;static final int HEIGHT = 200;JFrame buttonframe;public PDA_Frame() buttonframe = new JFrame();buttonframe.setTitle(Teaching Management System);buttonframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);buttonframe.setSize(WIDTH, HEIGHT);Toolkit kit = Toolkit.getDefaultToolkit();Dimension screenSize = kit.getScreenSize();int width = screenSize.width;int height = screenSize.height;int x = (width - WIDTH) / 2;int y = (height - HEIGHT) / 2;this.setBackground(Color.red);buttonframe.setLocation(x, y);buttonframe.setVisible(true);buttonframe.setForeground(Color.blue);JButton student = new JButton(Student information management system);JButton mark = new JButton(Student mark system);JButton course = new JButton(Student course system);JButton teacher = new JButton(Teacher information system);JButton leader = new JButton(Leader information system);buttonframe.add(student);buttonframe.add(mark);buttonframe.add(course);buttonframe.add(teacher);buttonframe.add(leader);buttonframe.setLayout(new GridLayout(5, 1);student.addActionListener(new ActionListener() public void actionPerformed(ActionEvent Event) studentmanageframe studentframe = new studentmanageframe(););teacher.addActionListener(new ActionListener() public void actionPerformed(ActionEvent Event) teachermanageframe teacherframe = new teachermanageframe(););leader.addActionListener(new ActionListener() public void actionPerformed(ActionEvent Event) leadermanageframe leaderframe = new leadermanageframe(););mark.addActionListener(new ActionListener() public void actionPerformed(ActionEvent Event) markmanageframe markframe = new markmanageframe(););course.addActionListener(new ActionListener() public void actionPerformed(ActionEvent Event) coursemanageframe courseframe = new coursemanageframe(););class studentmanageframe extends JPanel private static final long serialVersionUID = 1L;static final int WIDTH = 400;static final int HEIGHT = 200;JFrame studentframe;public studentmanageframe() studentframe = new JFrame();studentframe.setBackground(Color.black);studentframe.setTitle(Student informatin management system);studentframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);studentframe.setSize(WIDTH, HEIGHT);Toolkit kit = Toolkit.getDefaultToolkit();Dimension screenSize = kit.getScreenSize();int width = screenSize.width;int height = screenSize.height;int x = (width - WIDTH) / 2;int y = (height - HEIGHT) / 2;studentframe.setLocation(x, y);studentframe.setVisible(true);studentframe.setResizable(false);studentframe.add(this, BorderLayout.CENTER);JButton computerone = new JButton(Computer No.1);JButton computertwo = new JButton(Computer No.2);JButton computerthree = new JButton(Computer No.3);JButton bioone = new JButton(Legal No.1);JButton mechone = new JButton(Legal No.2);JButton mechtwo = new JButton(Mathematics No.1);JButton mechthree = new JButton(Mathematics No.2);JLabel banket1 = new JLabel();JLabel banket2 = new JLabel();GridBagLayout lay = new GridBagLayout();setLayout(lay);GridBagConstraints constraints = new GridBagConstraints();constraints.fill = GridBagConstraints.NONE;constraints.anchor = GridBagConstraints.EAST;constraints.weightx = 2;constraints.weighty = 5;JPanel jp = new JPanel();jp.setLayout(new GridLayout(1, 3);jp.add(banket1);jp.add(banket2);studentframe.add(jp, BorderLayout.NORTH);add(computerone, constraints, 0, 1, 1, 1);add(computertwo, constraints, 0, 2, 1, 1);add(computerthree, constraints, 0, 3, 1, 1);add(bioone, constraints, 0, 4, 1, 1);add(mechone, constraints, 1, 1, 1, 1);add(mechtwo, constraints, 1, 2, 1, 1);add(mechthree, constraints, 1, 3, 1, 1);/ /单击这个按钮,进入到计算机系二班学生信息系统computerone.addActionListener(new ActionListener() public void actionPerformed(ActionEvent Event) String sql = select * from studentinfo where grade=一班 and major=计算机系;Show_Student info = new Show_Student(sutdent basic information 0f computer No.1 , sql););/ /单击这个按钮,进入到计算机系二班学生信息系统computertwo.addActionListener(new ActionListener() public void actionPerformed(ActionEvent Event) String sql = select * from studentinfo where grade=二班and major=计算机系;Show_Student studentinformation = new Show_Student(sutdent basic information 0f computer No.2,sql););/ /单击这个按钮,进入到计算机系三班学生信息系统computerthree.addActionListener(new ActionListener() public void actionPerformed(ActionEvent Event) String sql = select * from studentinfo where grade=三班 and major=计算机系;Show_Student studentinformation = new Show_Student(sutdent basic information 0f computer No.3,sql););/ /单击这个按钮,进入到法律系一班学生信息系统bioone.addActionListener(new ActionListener() public void actionPerformed(ActionEvent Event) String sql = select * from studentinfo where grade =一班and major=法律系;Show_Student studentinformation = new Show_Student(sutdent basic information 0f legal No.1,sql););/ /单击这个按钮,进入到法律系二班学生信息系统mechone.addActionListener(new ActionListener() public void actionPerformed(ActionEvent Event) String sql = select * from studentinfo where grade=二班and major=法律系;Show_Student studentinformation = new Show_Student(sutdent basic information 0f legal No.2,sql););/ /单击这个按钮,进入数学系一班学生信息系统mechtwo.addActionListener(new ActionListener() public void actionPerformed(ActionEvent Event) String sql = select * from studentinfo where grade=一班and major=数学系;Show_Student studentinformation = new Show_Student(sutdent basic information 0f mathematics No.1,sql););/ /单击这个按钮,数学系二班学生信息系统mechthree.addActionListener(new ActionListener() public void actionPerformed(ActionEvent Event) String sql = select * from studentinfo where grade=二班and major=数学系;Show_Student studentinformation = new Show_Student(sutdent basic information 0f mathematics No.2,sql););public void add(Component c, GridBagConstraints constraints, int x, int y,int w, int h) constraints.gridx = x;constraints.gridy = y;constraints.gridwidth = w;constraints.gridheight = h;add(c, constraints);class teachermanageframe extends JPanel private static final long serialVersionUID = 1L;static final int WIDTH = 400;static final int HEIGHT = 200;JFrame teacherframe;public teachermanageframe() teacherframe = new JFrame();teacherframe.setTitle(Teacher information management system);teacherframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);teacherframe.setSize(WIDTH, HEIGHT);Toolkit kit = Toolkit.getDefaultToolkit();Dimension screenSize = kit.getScreenSize();int width = screenSize.width;int height = screenSize.height;int x = (width - WIDTH) / 2;int y = (height - HEIGHT) / 2;teacherframe.setLocation(x, y);teacherframe.setVisible(true);teacherframe.setResizable(false);teacherframe.add(this, BorderLayout.CENTER);JButton computerteacher = new JButton(Computer department);JButton bioteacher = new JButton(Legal department);JButton mechteacher = new JButton(Mathematics department);JButton beretun = new JButton(Return);JLabel banket1 = new JLabel();JLabel banket2 = new JLabel();GridBagLayout lay = new GridBagLayout();setLayout(lay);GridBagConstraints constraints = new GridBagConstraints();constraints.fill = GridBagConstraints.NONE;constraints.anchor = GridBagConstraints.EAST;constraints.weightx = 1;constraints.weighty = 4;JPanel jp = new JPanel();jp.setLayout(new GridLayout(1, 3);jp.add(banket1);jp.add(banket2);teacherframe.add(jp, BorderLayout.NORTH);add(computerteacher, constraints, 0, 1, 1, 1);add(bioteacher, constraints, 0, 4, 1, 1);add(mechteacher, constraints, 1, 1, 1, 1);/ /单击这个按钮,进入到计算机系教师信息系统computerteacher.addActionListener(new ActionListener() public void actionPerformed(ActionEvent Event) String sql = select * from teacherinfo where duty = 教师 and major=计算机系;/ String sql=select * from teacherinfo where duty=教师and/ major=英语系;Show_Teacher teacherinformation = new Show_Teacher(Computer department teacher information system,sql););/ /单击这个按钮,进入到法律系教师信息系统bioteacher.addActionListener(new ActionListener() public void actionPerformed(ActionEvent Event) String sql = select * from teacherinfo where duty = 教师 and major=法律系;Show_Teacher teacherinformation = new Show_Teacher(Legal department teacher information system,sql););/ /单击这个按钮,进入到数学系教师信息系统mechteacher.addActionListener(new ActionListener() public void actionPerformed(ActionEvent Event) String sql = select * from teacherinfo where duty = 教师 a

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论