数据库教学管理系统
- 格式:doc
- 大小:795.00 KB
- 文档页数:43
设计教学管理系统数据库1. 简介教学管理系统数据库是一个关键的教育信息化系统,它用于管理学校的教学活动、学生信息、课程安排等数据。
本文将探讨教学管理系统数据库的设计,包括数据库结构、表之间的关系、数据存储和管理等内容。
2. 数据库设计2.1 数据库结构教学管理系统数据库包括多个表,每个表存储特定类型的数据。
常见的表包括学生信息表、教师信息表、课程表、班级表等。
这些表之间通过主键和外键建立关联。
2.2 表结构设计•学生信息表–学生ID–姓名–年龄–性别–班级ID•教师信息表–教师ID–姓名–职称–所属学院•课程表–课程ID–课程名称–授课教师ID–学分–上课时间•班级表–班级ID–班级名称–班主任–学生人数2.3 数据关系在教学管理系统数据库中,不同表之间存在多种关系,如一对一关系、一对多关系、多对多关系等。
例如,一个学生可以属于一个班级,一个班级可以包含多个学生;一门课程可以由一个教师任教,一个教师可以教授多门课程。
3. 数据管理3.1 数据存储教学管理系统数据库可以使用关系型数据库管理系统(如MySQL、Oracle)来存储数据,也可以选择NoSQL数据库(如MongoDB)作为存储方案。
数据应该按照规范设计表结构,确保数据的完整性和一致性。
3.2 数据管理数据管理包括数据的插入、查询、更新和删除等操作。
系统管理员可以通过SQL语句对数据库进行管理,进行数据备份和恢复操作,确保数据安全。
4. 总结设计教学管理系统数据库是教育信息化建设的重要环节,合理的数据库设计能够提高系统的效率和稳定性。
通过本文的介绍,读者可以了解教学管理系统数据库的设计原则和方法,为教育管理工作提供便利。
5. 参考资料•《数据库系统概念》•《SQL必知必会》以上是关于设计教学管理系统数据库的简要介绍和设计思路,希望能为您提供一些参考和帮助。
数据库高校教材管理系统在高等教育系统中,教材管理一直是一个重要但有挑战的任务。
为了更有效地管理教材资源,许多高校开始使用数据库高校教材管理系统。
这种系统利用数据库技术来集中管理教材相关的信息,提高教材的利用率和管理效率。
系统概述数据库高校教材管理系统是一种基于数据库的信息管理系统,旨在帮助高校更好地管理教材的采购、库存、分发和使用情况。
通过该系统,教材管理员可以实现对教材资源的全面监控和管理,提高工作效率,减少人力资源浪费。
系统功能该系统具有以下主要功能:1.教材采购管理:记录和跟踪教材采购信息,包括教材名称、作者、出版社、ISBN等。
2.库存管理:实时监控教材库存情况,包括库存量、存放地点等信息。
3.分发管理:记录和跟踪教材的分发情况,包括分发对象、时间、地点等。
4.使用管理:跟踪和记录教材的使用情况,包括借阅、归还、损坏等情况。
5.统计报表:生成各类教材管理相关的统计报表,为决策提供数据支持。
系统优势•信息集中管理:系统将教材相关信息集中管理在数据库中,方便管理员随时查阅和更新。
•数据实时更新:系统可以实时更新教材的采购、库存、分发和使用情况,确保信息的准确性。
•操作便捷:通过可视化界面,管理员可以方便地进行各项操作,提高工作效率。
•安全性:系统具有权限控制功能,保障教材信息的安全性和保密性。
•数据分析:系统可以根据教材数据生成各类报表和分析结果,为学校管理提供决策参考。
系统应用数据库高校教材管理系统可以被广泛应用于高校图书馆、教务处和教材管理部门等部门,为教材管理工作提供便利和支持。
通过系统的使用,高校可以更好地管理教材资源,提高教材利用率,降低管理成本,提升教学效果。
结语数据库高校教材管理系统是一种现代化的教材管理工具,可以帮助高校提高教材管理的效率和水平。
通过系统的应用,高校可以更好地管理教材资源,提升教学质量,服务教育事业的发展。
希望该系统能为高校教材管理工作带来更多的便利和价值。
教学管理信息系统数据库的构建与设计教学管理信息系统(Teaching Management Information System,TMIS)是指为实现教学管理工作的规范化、信息化和高效化而开发的系统。
数据库是TMIS的核心,负责存储和管理各类教学管理数据,因此数据库的构建与设计是TMIS建设的重要环节。
下面将从数据库的设计原则、数据模型选择与设计、数据表设计和索引设计等方面来介绍教学管理信息系统数据库的构建与设计。
第一、数据库的设计原则1.根据需求进行数据库设计:在进行数据库设计时,需要先明确需求,了解教学管理的业务流程和功能要求,然后根据需求来设计数据库结构,确保数据库能够满足系统的功能和性能要求。
2.数据库的冗余性控制:在数据库设计中,要尽可能避免数据冗余,即相同的数据在数据库中不重复存储,可以通过合理的表设计和数据关联来实现数据的冗余性控制,这样可以减小数据库的存储空间,并提高数据一致性和可靠性。
3.数据的完整性控制:在数据库设计中,要保证数据的完整性,即数据的正确性和一致性。
可以通过定义数据的完整性约束、触发器和存储过程等手段来实现数据的完整性控制,保证数据在数据库中的有效性和正确性。
4.数据库的性能优化:在数据库设计中,要考虑系统的性能需求,合理选择和设计数据库索引、分区等技术手段,进行数据库的性能优化,提高数据的访问和操作效率。
第二、数据模型选择与设计在TMIS的数据库设计中,可以选择关系型数据库模型或面向对象数据库模型进行设计。
关系型数据库模型是目前应用最广泛的数据库模型,采用表格的方式组织数据,可以通过主键和外键等约束实现数据关联性。
面向对象数据库模型是以对象为核心进行数据组织和管理的数据库模型,能够更好地适应面向对象的编程和设计方式。
在选择数据库模型时,可以根据TMIS的具体业务需求和系统规模来决定。
一般来说,关系型数据库模型适用于中小型系统,而面向对象数据库模型适用于大型复杂系统。
设计教学管理系统数据库E-R模型在设计教学管理系统的数据库E-R模型时,首先需要明确系统中存在的实体和实体之间的关系,以便建立起系统的结构化模型。
通过E-R图的设计,可以清晰地表示数据库中不同实体之间的联系,有助于系统的管理与维护。
实体在教学管理系统中,我们可以识别以下几个主要实体:学生(Student)•属性:学生编号(StudentID)、姓名(Name)、性别(Gender)、班级(Class)等•关系:学生与课程(Course)、成绩(Grade)之间的关联教师(Teacher)•属性:教师编号(TeacherID)、姓名(Name)、职称(Title)、所教课程(Course)等•关系:教师与课程、学生之间的关联课程(Course)•属性:课程编号(CourseID)、名称(Name)、学分(Credit)、授课教师(Teacher)、上课时间(Time)等•关系:课程与学生、教师之间的关联成绩(Grade)•属性:学生编号(StudentID)、课程编号(CourseID)、成绩(Score)、学期(Term)等•关系:成绩与学生、课程之间的关联关系在设计E-R模型时,需要考虑不同实体之间的关系,以建立起系统完整的数据模型。
学生与课程学生可以选择注册不同的课程,因此学生(Student)和课程(Course)之间存在“选修”关系,一名学生可以选择多门课程,一门课程也可以被多名学生选择。
教师与课程教师可以同时教授多门课程,因此教师(Teacher)和课程(Course)之间存在“教授”关系,一个教师可以授课多门,一门课程也可以被多名教师所教。
成绩记录学生参加考试后会有成绩记录,因此学生(Student)和成绩(Grade)之间存在“成绩记录”关系,一个学生可以有多条成绩记录,一门课程的成绩也可以被多名学生记录。
E-R模型图最终的教学管理系统数据库E-R模型可以用以下E-R图来表示:学生 ---- 选修 ---- 课程||V教师 ---- 教授 ---- 课程||V学生 ---- 成绩记录 ---- 成绩这样一来,通过E-R模型的设计,我们可以清晰地表示出教学管理系统中学生、教师、课程以及成绩之间的关系,有助于建立数据库的结构化模型,提高系统的管理效率。
教学管理信息系统——教师数据库设计教学管理信息系统是一个系统化的教育管理平台,通过管理、存储和分析数据来支持教育机构的教学活动。
教师数据库是教学管理信息系统中重要的组成部分,它存储了教师的个人信息、教育背景、工作经验等数据,方便管理教师信息和综合评价教师的能力。
教师数据库的设计需要考虑以下几个方面:2.教育背景:包括教师的学历、毕业院校、专业等信息,用于评估教师的学术背景和专业能力。
3.工作经历:包括教师的工作单位、职务、任教科目等信息,用于评估教师的工作经验和教学能力。
4.资格证书:包括教师的教师资格证书、专业职业资格证书等信息,用于确认教师的资格和专业能力。
5.教学评价:包括学生对教师的评价、教师的教学成绩等信息,用于评估教师的教学效果和学生的满意度。
6.教学资源:包括教师的教学课件、教学视频、教学参考资料等信息,用于支持教师的教学活动。
在设计教师数据库时,需要注意以下几点:1.数据库的表结构设计:可以通过创建不同的数据表来存储不同类别的教师信息,如个人信息表、教育背景表、工作经历表等。
每个表都需要设定主键和对应的外键来实现表之间的关联。
2.数据库的字段设计:需要为每个数据表定义相应的字段,例如教师个人信息表需要定义姓名、性别、出生日期等字段。
在定义字段时,要考虑字段的数据类型、长度和约束条件,以确保数据的准确性和完整性。
3.数据库的索引设计:对于频繁查询的字段,可以添加索引来提高查询效率。
例如,可以为教师姓名字段创建索引,以便快速检索特定教师的信息。
4.数据库的安全性设计:教师数据库中存储了大量的敏感信息,需要采取相应的安全措施,如限制数据库访问权限、加密存储密码等,以保护教师信息的安全。
5.数据库的备份和恢复设计:定期对数据库进行备份,以防止数据丢失或损坏。
同时,也要设计合适的恢复方案,以便在数据库发生故障时能够快速恢复数据。
总之,教师数据库的设计是教学管理信息系统的基础,合理的设计可以提高教师信息的管理效率和教师能力的评估准确性,从而提升教学质量和学生满意度。
一、引言随着信息技术的飞速发展,数据库技术在各个领域得到了广泛应用。
教学数据库系统作为学校信息管理系统的重要组成部分,对提高教育教学质量、实现教育现代化具有重要意义。
本文针对教学数据库系统进行设计,旨在为我国教育事业提供一套高效、实用的数据库解决方案。
二、系统需求分析1. 功能需求(1)学生信息管理:包括学生基本信息、成绩、奖惩、课程选择等。
(2)教师信息管理:包括教师基本信息、课程安排、教学成果等。
(3)课程信息管理:包括课程基本信息、课程设置、课程安排等。
(4)教学资源管理:包括教学课件、教材、习题等。
(5)教务管理:包括课程报名、成绩录入、成绩查询等。
(6)系统管理:包括用户管理、权限管理、数据备份与恢复等。
2. 性能需求(1)响应速度:系统响应时间应小于1秒。
(2)并发处理能力:支持多用户同时在线操作。
(3)存储容量:能够存储大量数据,满足学校长期发展需求。
(4)安全性:保障数据安全,防止非法访问和篡改。
三、系统架构设计1. 技术选型(1)数据库:采用MySQL数据库,具备高性能、稳定性、可扩展性等特点。
(2)开发语言:采用Java语言,具有良好的跨平台性、可维护性。
(3)开发框架:采用Spring Boot框架,简化开发流程,提高开发效率。
2. 系统架构(1)前端:采用Vue.js框架,实现用户界面交互。
(2)后端:采用Spring Boot框架,负责业务逻辑处理。
(3)数据库:MySQL数据库,存储数据。
(4)缓存:采用Redis缓存,提高系统性能。
(5)消息队列:采用RabbitMQ,实现系统解耦。
四、系统模块设计1. 学生信息管理模块(1)功能:实现学生基本信息、成绩、奖惩、课程选择等信息的录入、修改、查询、删除等功能。
(2)设计:采用MVC模式,将模型(Model)、视图(View)、控制器(Controller)分离,提高代码可维护性。
2. 教师信息管理模块(1)功能:实现教师基本信息、课程安排、教学成果等信息的录入、修改、查询、删除等功能。
数据库管理系统简介数据库管理系统(Database Management System,简称DBMS)是一种用于管理和组织数据的软件系统。
它提供了一种结构化的方式来存储、操作、查询和保护数据,使用户能够有效地管理大量数据。
一、数据库管理系统的定义与作用数据库管理系统是一种计算机软件,用于对数据库进行管理和操作。
它的作用主要体现在以下几个方面:1. 数据存储和管理:DBMS负责将数据以一种结构化的方式存储在磁盘上,并提供高效的数据访问和管理功能。
2. 数据安全和保护:DBMS能够设置安全权限来控制对数据库的访问,并提供备份和恢复功能,确保数据的安全性和完整性。
3. 数据共享和协作:DBMS允许多个用户共享同一数据库,通过提供交互式查询和并发控制机制实现协同工作。
4. 数据一致性和完整性:DBMS可以实现数据的一致性和完整性约束,例如唯一性约束、参照完整性等,确保数据的准确性和一致性。
5. 数据查询和分析:DBMS提供了强大的查询语言和分析工具,方便用户对数据进行灵活的检索、分析和报表生成。
二、常见的数据库管理系统类型根据数据模型的不同,常见的数据库管理系统可以分为以下几类:1. 层次数据库模型:采用父子关系的层次结构表示数据之间的关系,例如IBM的IMS数据库管理系统。
2. 网状数据库模型:采用图状结构表示数据之间的关系,例如IDMS数据库管理系统。
3. 关系数据库模型:采用表格形式(二维表)来表示数据和数据之间的关系,例如Oracle、MySQL、SQL Server等。
4. 对象数据库模型:将对象的概念引入数据库领域,允许直接存储和操作复杂的对象数据,例如MongoDB、Berkeley DB等。
5. NoSQL数据库模型:非关系型数据库,主要用于处理大规模分布式数据,例如Hadoop、Redis、Cassandra等。
三、数据库管理系统的特点和优势数据库管理系统具有以下几个特点和优势:1. 数据共享和集中管理:DBMS允许多个用户共享同一数据集,实现数据的集中管理和统一存储。
数据库学生选课管理系统一、引言数据库学生选课管理系统是一种用于高校教务管理的工具,旨在帮助学校管理学生选课、课程信息以及学生成绩等数据。
通过该系统,学生可以方便地进行选课、退课操作,教师可以查看学生成绩并进行评价,学校管理人员可以实时掌握学生选课情况,从而更好地安排教学计划和资源。
二、系统功能1. 学生端功能•学生登录:学生通过账号和密码登录系统;•查看可选课程:学生可以浏览当前学期开设的课程,了解课程内容和开课时间;•选课:学生在规定时间内进行选课操作,选择感兴趣的课程并提交选课申请;•退课:学生在选课期间可以自主进行退课操作,取消已选的课程;•查看成绩:学生可以查询已修课程的成绩和评价。
2. 教师端功能•教师登录:教师通过账号和密码登录系统;•查看所教课程:教师可以查看自己当前任教的课程列表和学生名单;•录入成绩:教师可以录入学生成绩,并进行评价;•查询学生成绩:教师可以查询所教课程学生的成绩。
3. 管理员端功能•管理员登录:管理员通过账号和密码登录系统;•管理学生信息:管理员可以添加、修改、删除学生信息,包括个人信息和选课情况;•管理教师信息:管理员可以添加、修改、删除教师信息,包括个人信息和任教课程。
三、系统实现1. 数据库设计系统数据库包含以下表格:•学生表(Student):用于存储学生基本信息,如学号、姓名、性别等;•课程表(Course):用于存储课程信息,如课程编号、课程名称、学分等;•选课表(Enrollment):用于存储学生选课信息,关联学生和课程;•成绩表(Grade):用于存储学生成绩信息,包括学生、课程和成绩。
2. 系统架构系统采用B/S架构,前端使用HTML、CSS、JavaScript实现页面交互,后端使用Java语言编写业务逻辑,数据库采用MySQL实现数据存储。
3. 用户角色权限系统根据用户角色划分权限,学生可以进行选课、退课和查看成绩操作;教师可以录入成绩和查询学生成绩;管理员可以管理学生和教师信息。
数据库教学管理系统课程设计报告一、项目背景数据库教学管理系统是一种用于管理学校教学信息和学生数据的系统,通过该系统可以方便地管理学生信息、教师信息、课程信息等数据,并支持教务管理、成绩管理、课程安排等功能。
该系统可以提高教学管理效率,实现教学信息的自动化管理,是现代教育管理的重要工具。
二、需求分析1.功能需求•管理学生信息,包括学生基本信息、选课情况等;•管理教师信息,包括教师基本信息、授课情况等;•管理课程信息,包括课程名称、上课时间、上课地点等;•支持教务管理,包括学生选课、成绩录入等功能;•支持课程安排,包括课程表生成、教师排课等功能。
2.性能需求•系统要求稳定可靠,能够处理大量数据;•系统响应速度快,能够快速查询数据;•系统安全性高,能够保护学生和教师信息不被泄露。
三、系统设计1.数据库设计系统采用MySQL数据库,包括以下表格设计: - 学生表(Student):存储学生基本信息,包括学号、姓名、性别等字段; - 教师表(Teacher):存储教师基本信息,包括工号、姓名、职称等字段; - 课程表(Course):存储课程信息,包括课程编号、课程名称、学分等字段; - 选课表(Enrollment):存储学生选课情况,包括学生学号、课程编号等字段; - 成绩表(Grade):存储学生成绩信息,包括学生学号、课程编号、成绩等字段。
2.系统架构设计系统采用B/S架构,前端使用HTML、CSS、JavaScript实现,后端采用Java 语言开发,并采用Spring框架实现业务逻辑,数据库连接采用JDBC连接MySQL 数据库。
四、系统实现1.前端实现前端页面采用响应式设计,包括学生信息管理页面、教师信息管理页面、课程信息管理页面等,使用Bootstrap框架实现页面布局,并通过AJAX与后端交互。
2.后端实现后端采用MVC架构,包括控制器层、服务层、数据访问层,使用Spring MVC 和Spring JDBC框架实现,对前端请求进行处理并访问数据库。
数据库课程设计报告教学管理系统实验题目:教学管理系统教学管理系统目录一、概述 (2)二、总体设计 (3)1、软件环境: (3)2、硬件环境: (3)三、实验主要内容 (3)1、主要数据表 (3)2、功能模块 (3)四、系统分析报告 (3)1、数据流图 (3)2、系统功能模块 (4)3、业务流图 (5)4、系统数据模型设计 (5)五、代码实现 (8)1.登录界面 (8)2.注册界面 (10)3.教师界面 (12)4.课表管理 (13)5.成绩管理 (14)6.学生界面 (16)7.网上评教 (17)六、系统实现结果 (17)七、实验分工及总结 (22)一、概述数据库课程设计是集中实践性环节之一,是学习完《数据库原理及应用》课程后进行的一次全面的综合的实践练习,主要目的在于加深学生对数据库基础理论和基本知识的理解,熟悉数据库的设计方法,掌握基于数据库的信息管理系统的开发方法,进一步加强学生综合运用知识和实践动手的能力。
学生根据所学的数据库原理和程序设计的知识,能够针对一个小型的数据库管理系统,进行系统的需求分析,系统设计,数据库设计,编码,测试等,完成题目要求的功能,从而达到掌握开发一个小型数据库的目的。
二、总体设计1、软件环境:Visual Studio 2010、SQL Server Management Studio2、硬件环境:PC机三、实验主要内容1、主要数据表课程信息表,学生信息表单,教师信息表,学生成绩表等。
2、功能模块(1)课程设置,包括:查询、添加、删除、查询和修改课程信息(2)学生成绩查询,网上评教。
(3)教师查询课程时间和教室的安排。
(4)教师管理学生成绩查询,添加,修改,删除。
(5)学生和教师信息的注册。
四、系统分析报告1、数据流图教学管理系统的基本数据流图如下所示:学生选课信息课程信息图1教学管理系统的基本数据流图学生成绩信息成绩确认信息图 2 教学管理系统的基本数据流图排课信息图3 教学管理系统的基本数据流图2、系统功能模块本系统主要包括学生信息管理、课程信息管理、成绩信息管理等模块,另外还包括进行系统管理的一些辅助模块。
用递归、非递归两种方法遍历二叉树数据库原理课程设计专业:计算机科学与技术班级:计算机(2)班指导教师:****名:**学号:************目录一、概述 (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.数据字典4. E-R模型图三、数据库逻辑设计E-R图转换成的关系图四、软件功能设计五、程序源代码(注:实际应用系统为英文版,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 = '教师' and major='数学系'";Show_Teacher teacherinformation = new Show_Teacher("Mathematics department teacher information system",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 leadermanageframe extends JPanel {private static final long serialVersionUID = 1L;static final int WIDTH = 400;static final int HEIGHT = 200;JFrame leaderframe;public leadermanageframe() {leaderframe = new JFrame();leaderframe.setTitle("Department leader information management system");leaderframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);leaderframe.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;leaderframe.setLocation(x, y);leaderframe.setVisible(true);leaderframe.setResizable(false);leaderframe.add(this, BorderLayout.CENTER);JButton computerleader = new JButton("Computer department");JButton bioleader = new JButton("Legal department");JButton mechleader = new JButton("Mathematics department");JButton schoolleader = new JButton("School leadership");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 = 2;JPanel jp = new JPanel();jp.setLayout(new GridLayout(1, 3));jp.add(banket1);jp.add(banket2);leaderframe.add(jp, BorderLayout.NORTH);add(computerleader, constraints, 0, 0, 1, 1); // 使用网格组布局添加控件add(bioleader, constraints, 0, 1, 1, 1);add(mechleader, constraints, 1, 0, 1, 1);add(schoolleader, constraints, 1, 1, 1, 1);/ /单击这个按钮,进入到计算机系领导信息系统computerleader.addActionListener(new ActionListener() {public void actionPerformed(ActionEvent Event) {String sql = "select * from leaderinfo where duty='主任'and major='计算机系'";Show_Leader leaderinformation = new Show_Leader("Computer department leader information system", sql);}});/ /单击这个按钮,进入到法律系领导信息系统bioleader.addActionListener(new ActionListener() {public void actionPerformed(ActionEvent Event) {String sql = "select * from leaderinfo where duty='主任' and major='法律系'";Show_Leader leaderinformation = new Show_Leader("Legal department leader information system", sql);}});/ /单击这个按钮,进入到数学系领导信息系统mechleader.addActionListener(new ActionListener() {public void actionPerformed(ActionEvent Event) {String sql = "select * from leaderinfo where duty='主任'and major='数学系'";Show_Leader leaderinformation = new Show_Leader("Mathematics department leader information system", sql);}});/ /单击这个按钮,进入到学校领导信息系统schoolleader.addActionListener(new ActionListener() {public void actionPerformed(ActionEvent Event) {String sql = "select * from leaderinfo where duty='主任'and major='学校'";Show_Leader leaderinformation = new Show_Leader("学校领导信息系统", 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 markmanageframe extends JPanel {private static final long serialVersionUID = 1L;static final int WIDTH = 400;static final int HEIGHT = 200;JFrame markframe;public markmanageframe() {markframe = new JFrame();markframe.setBackground(Color.black);markframe.setTitle("Student mark management system");markframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);markframe.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;markframe.setLocation(x, y);markframe.setVisible(true);markframe.setResizable(false);markframe.add(this, BorderLayout.CENTER);JButton computerone = new JButton("Mark of computer No.1");JButton computertwo = new JButton("Mark of computer No.2");JButton computerthree = new JButton("Mark of computer No.3");JButton bioone = new JButton("Mark of legal No.1");JButton mechone = new JButton("Mark of legal No.2");JButton mechtwo = new JButton("Mark of mathematics No.1");JButton mechthree = new JButton("Mark of 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);markframe.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 markinfo where grade='一班' and major='计算机系'";Show_Mark info = new Show_Mark("Mark system of computerNo.1", sql);}});/ /单击这个按钮,进入到计算机系二班学生分数信息系统computertwo.addActionListener(new ActionListener() {public void actionPerformed(ActionEvent Event) {String sql = "select * from markinfo where grade='二班'and major='计算机系'";Show_Mark markinformation = new Show_Mark("Mark system of computer No.2",sql);}});/ /单击这个按钮,进入到计算机系三班学生分数信息系统computerthree.addActionListener(new ActionListener() {public void actionPerformed(ActionEvent Event) {String sql = "select * from markinfo where grade='三班' and major='计算机系'";Show_Mark markinformation = new Show_Mark("Mark system of computer No.3",sql);}});/ /单击这个按钮,进入到法律系一班学生分数信息系统bioone.addActionListener(new ActionListener() {public void actionPerformed(ActionEvent Event) {String sql = "select * from markinfo where grade ='一班'and major='法律系'";Show_Mark markinformation = new Show_Mark("Mark system of Legal No.1",sql);}});/ /单击这个按钮,进入到法律系二班学生分数信息系统mechone.addActionListener(new ActionListener() {public void actionPerformed(ActionEvent Event) {String sql = "select * from markinfo where grade='二班'and major='法律系'";Show_Mark markinformation = new Show_Mark("Mark system of legal No.2",sql);}});/ /单击这个按钮,进入数学系一班学生分数信息系统mechtwo.addActionListener(new ActionListener() {public void actionPerformed(ActionEvent Event) {String sql = "select * from markinfo where grade='一班'and major='数学系'";Show_Mark markinformation = new Show_Mark("Mark system of Mathematics No.1",sql);}});/ /单击这个按钮,数学系二班学生分数信息系统mechthree.addActionListener(new ActionListener() {public void actionPerformed(ActionEvent Event) {String sql = "select * from markinfo where grade='二班'and major='数学系'";Show_Mark markinformation = new Show_Mark("Mark system of mathematics No.1",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 coursemanageframe extends JPanel {private static final long serialVersionUID = 1L;static final int WIDTH = 400;static final int HEIGHT = 200;JFrame courseframe;public coursemanageframe() {courseframe = new JFrame();courseframe.setBackground(Color.black);courseframe.setTitle("Student Course Management System"); courseframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); courseframe.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;courseframe.setLocation(x, y);courseframe.setVisible(true);courseframe.setResizable(false);courseframe.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);courseframe.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 courseinfo where grade='一班' and major='计算机系'";Show_Course info = new Show_Course("Student course information system of computer No.1", sql);}});/ /单击这个按钮,进入到计算机系二班学生课程信息系统computertwo.addActionListener(new ActionListener() {public void actionPerformed(ActionEvent Event) {String sql = "select * from courseinfo where grade='二班'and major='计算机系'";Show_Course courseinformation = new Show_Course("Student course information system of computer No.2",sql);}});// /单击这个按钮,进入到计算机系三班学生课程信息系统computerthree.addActionListener(new ActionListener() {public void actionPerformed(ActionEvent Event) {String sql = "select * from courseinfo where grade='三班' and major='计算机系'";Show_Course courseinformation = new Show_Course("Student course information system of computer No.3",sql);}});// /单击这个按钮,进入到法律系一班学生课程信息系统bioone.addActionListener(new ActionListener() {public void actionPerformed(ActionEvent Event) {String sql = "select * from courseinfo where grade ='一班'and major='法律系'";Show_Course courseinformation = new Show_Course("Student course information system of legal No.1",sql);}});// /单击这个按钮,进入到法律系二班学生课程信息系统mechone.addActionListener(new ActionListener() {public void actionPerformed(ActionEvent Event) {String sql = "select * from courseinfo where grade='二班'and major='法律系'";Show_Course courseinformation = new Show_Course("Studentcourse information system of legal No.2",sql);}});// /单击这个按钮,进入数学系一班学生课程信息系统mechtwo.addActionListener(new ActionListener() {public void actionPerformed(ActionEvent Event) {String sql = "select * from courseinfo where grade='一班'and major='数学系'";Show_Course courseinformation = new Show_Course("Student course information system of mathematics No.1",sql);}});// /单击这个按钮,数学系二班学生课程信息系统mechthree.addActionListener(new ActionListener() {public void actionPerformed(ActionEvent Event) {String sql = "select * from courseinfo where grade='二班'and major='数学系'";Show_Course courseinformation = new Show_Course("Student course information system of 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 From_student {public Vector getstudent(Connection con, String sql) {Vector v = new Vector();try {Statement st = con.createStatement();ResultSet rs = st.executeQuery(sql);。