├── img ├── 1.png ├── 12.png ├── add.png ├── an.png ├── an2.png ├── an3.png ├── add2.png ├── find.png ├── find2.png ├── info.png ├── login.png ├── update.png └── update2.png ├── StudentSystem ├── src │ ├── 1.png │ ├── 2.png │ └── indi │ │ └── wrenn │ │ └── studentsystem │ │ ├── bean │ │ ├── User.java │ │ ├── Student.java │ │ └── AnalyzeResult.java │ │ ├── util │ │ ├── Tools.java │ │ ├── CreateSql.java │ │ └── WindowUtil.java │ │ ├── dao │ │ ├── JdbcHelper.java │ │ ├── ManageHelper.java │ │ └── JdbcConfig.java │ │ ├── model │ │ ├── ScoreModel.java │ │ ├── StudentModel.java │ │ └── ScoreAnalyzeModel.java │ │ ├── frame │ │ ├── DetailsFrame.java │ │ ├── ModifyFrame.java │ │ ├── AddScoreFrame.java │ │ ├── AddStudentFrame.java │ │ ├── QueryScoreFrame.java │ │ ├── QueryStudentFrame.java │ │ ├── ScoreAnalyzeFrame.java │ │ ├── UpdateScoreFrame.java │ │ ├── AddStudentScoreFrame.java │ │ ├── ConditionsQueryFrame.java │ │ ├── DeleteStudentFrame.java │ │ ├── ModifyStudentFrame.java │ │ ├── ScoreAnalyzeOption.java │ │ ├── ScoresRankingFrame.java │ │ ├── UpdatePasswordFrame.java │ │ ├── QueryStudentScoreFrame.java │ │ ├── StudentSystemMainFrame.java │ │ ├── ConditionsQueryScoreFrame.java │ │ ├── ScoreConditionsQueryFrame.java │ │ ├── StudentSystemLoginFrame.java │ │ ├── UpdateStudentScoreFrame.java │ │ ├── StudentSystemRegisterFrame.java │ │ └── ImagePanel.java │ │ └── run │ │ └── TestLogin.java ├── lib │ └── mysql-connector-java-5.1.6-bin.jar └── database │ └── StudentSystemDao.sql ├── README.md └── LICENSE /img/1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cckevincyh/StudentSystem/HEAD/img/1.png -------------------------------------------------------------------------------- /img/12.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cckevincyh/StudentSystem/HEAD/img/12.png -------------------------------------------------------------------------------- /img/add.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cckevincyh/StudentSystem/HEAD/img/add.png -------------------------------------------------------------------------------- /img/an.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cckevincyh/StudentSystem/HEAD/img/an.png -------------------------------------------------------------------------------- /img/an2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cckevincyh/StudentSystem/HEAD/img/an2.png -------------------------------------------------------------------------------- /img/an3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cckevincyh/StudentSystem/HEAD/img/an3.png -------------------------------------------------------------------------------- /img/add2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cckevincyh/StudentSystem/HEAD/img/add2.png -------------------------------------------------------------------------------- /img/find.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cckevincyh/StudentSystem/HEAD/img/find.png -------------------------------------------------------------------------------- /img/find2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cckevincyh/StudentSystem/HEAD/img/find2.png -------------------------------------------------------------------------------- /img/info.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cckevincyh/StudentSystem/HEAD/img/info.png -------------------------------------------------------------------------------- /img/login.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cckevincyh/StudentSystem/HEAD/img/login.png -------------------------------------------------------------------------------- /img/update.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cckevincyh/StudentSystem/HEAD/img/update.png -------------------------------------------------------------------------------- /img/update2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cckevincyh/StudentSystem/HEAD/img/update2.png -------------------------------------------------------------------------------- /StudentSystem/src/1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cckevincyh/StudentSystem/HEAD/StudentSystem/src/1.png -------------------------------------------------------------------------------- /StudentSystem/src/2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cckevincyh/StudentSystem/HEAD/StudentSystem/src/2.png -------------------------------------------------------------------------------- /StudentSystem/lib/mysql-connector-java-5.1.6-bin.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cckevincyh/StudentSystem/HEAD/StudentSystem/lib/mysql-connector-java-5.1.6-bin.jar -------------------------------------------------------------------------------- /StudentSystem/src/indi/wrenn/studentsystem/bean/User.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cckevincyh/StudentSystem/HEAD/StudentSystem/src/indi/wrenn/studentsystem/bean/User.java -------------------------------------------------------------------------------- /StudentSystem/src/indi/wrenn/studentsystem/util/Tools.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cckevincyh/StudentSystem/HEAD/StudentSystem/src/indi/wrenn/studentsystem/util/Tools.java -------------------------------------------------------------------------------- /StudentSystem/src/indi/wrenn/studentsystem/bean/Student.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cckevincyh/StudentSystem/HEAD/StudentSystem/src/indi/wrenn/studentsystem/bean/Student.java -------------------------------------------------------------------------------- /StudentSystem/src/indi/wrenn/studentsystem/dao/JdbcHelper.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cckevincyh/StudentSystem/HEAD/StudentSystem/src/indi/wrenn/studentsystem/dao/JdbcHelper.java -------------------------------------------------------------------------------- /StudentSystem/src/indi/wrenn/studentsystem/dao/ManageHelper.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cckevincyh/StudentSystem/HEAD/StudentSystem/src/indi/wrenn/studentsystem/dao/ManageHelper.java -------------------------------------------------------------------------------- /StudentSystem/src/indi/wrenn/studentsystem/model/ScoreModel.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cckevincyh/StudentSystem/HEAD/StudentSystem/src/indi/wrenn/studentsystem/model/ScoreModel.java -------------------------------------------------------------------------------- /StudentSystem/src/indi/wrenn/studentsystem/util/CreateSql.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cckevincyh/StudentSystem/HEAD/StudentSystem/src/indi/wrenn/studentsystem/util/CreateSql.java -------------------------------------------------------------------------------- /StudentSystem/src/indi/wrenn/studentsystem/util/WindowUtil.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cckevincyh/StudentSystem/HEAD/StudentSystem/src/indi/wrenn/studentsystem/util/WindowUtil.java -------------------------------------------------------------------------------- /StudentSystem/src/indi/wrenn/studentsystem/bean/AnalyzeResult.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cckevincyh/StudentSystem/HEAD/StudentSystem/src/indi/wrenn/studentsystem/bean/AnalyzeResult.java -------------------------------------------------------------------------------- /StudentSystem/src/indi/wrenn/studentsystem/frame/DetailsFrame.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cckevincyh/StudentSystem/HEAD/StudentSystem/src/indi/wrenn/studentsystem/frame/DetailsFrame.java -------------------------------------------------------------------------------- /StudentSystem/src/indi/wrenn/studentsystem/frame/ModifyFrame.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cckevincyh/StudentSystem/HEAD/StudentSystem/src/indi/wrenn/studentsystem/frame/ModifyFrame.java -------------------------------------------------------------------------------- /StudentSystem/src/indi/wrenn/studentsystem/model/StudentModel.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cckevincyh/StudentSystem/HEAD/StudentSystem/src/indi/wrenn/studentsystem/model/StudentModel.java -------------------------------------------------------------------------------- /StudentSystem/src/indi/wrenn/studentsystem/frame/AddScoreFrame.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cckevincyh/StudentSystem/HEAD/StudentSystem/src/indi/wrenn/studentsystem/frame/AddScoreFrame.java -------------------------------------------------------------------------------- /StudentSystem/src/indi/wrenn/studentsystem/frame/AddStudentFrame.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cckevincyh/StudentSystem/HEAD/StudentSystem/src/indi/wrenn/studentsystem/frame/AddStudentFrame.java -------------------------------------------------------------------------------- /StudentSystem/src/indi/wrenn/studentsystem/frame/QueryScoreFrame.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cckevincyh/StudentSystem/HEAD/StudentSystem/src/indi/wrenn/studentsystem/frame/QueryScoreFrame.java -------------------------------------------------------------------------------- /StudentSystem/src/indi/wrenn/studentsystem/frame/QueryStudentFrame.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cckevincyh/StudentSystem/HEAD/StudentSystem/src/indi/wrenn/studentsystem/frame/QueryStudentFrame.java -------------------------------------------------------------------------------- /StudentSystem/src/indi/wrenn/studentsystem/frame/ScoreAnalyzeFrame.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cckevincyh/StudentSystem/HEAD/StudentSystem/src/indi/wrenn/studentsystem/frame/ScoreAnalyzeFrame.java -------------------------------------------------------------------------------- /StudentSystem/src/indi/wrenn/studentsystem/frame/UpdateScoreFrame.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cckevincyh/StudentSystem/HEAD/StudentSystem/src/indi/wrenn/studentsystem/frame/UpdateScoreFrame.java -------------------------------------------------------------------------------- /StudentSystem/src/indi/wrenn/studentsystem/model/ScoreAnalyzeModel.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cckevincyh/StudentSystem/HEAD/StudentSystem/src/indi/wrenn/studentsystem/model/ScoreAnalyzeModel.java -------------------------------------------------------------------------------- /StudentSystem/src/indi/wrenn/studentsystem/frame/AddStudentScoreFrame.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cckevincyh/StudentSystem/HEAD/StudentSystem/src/indi/wrenn/studentsystem/frame/AddStudentScoreFrame.java -------------------------------------------------------------------------------- /StudentSystem/src/indi/wrenn/studentsystem/frame/ConditionsQueryFrame.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cckevincyh/StudentSystem/HEAD/StudentSystem/src/indi/wrenn/studentsystem/frame/ConditionsQueryFrame.java -------------------------------------------------------------------------------- /StudentSystem/src/indi/wrenn/studentsystem/frame/DeleteStudentFrame.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cckevincyh/StudentSystem/HEAD/StudentSystem/src/indi/wrenn/studentsystem/frame/DeleteStudentFrame.java -------------------------------------------------------------------------------- /StudentSystem/src/indi/wrenn/studentsystem/frame/ModifyStudentFrame.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cckevincyh/StudentSystem/HEAD/StudentSystem/src/indi/wrenn/studentsystem/frame/ModifyStudentFrame.java -------------------------------------------------------------------------------- /StudentSystem/src/indi/wrenn/studentsystem/frame/ScoreAnalyzeOption.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cckevincyh/StudentSystem/HEAD/StudentSystem/src/indi/wrenn/studentsystem/frame/ScoreAnalyzeOption.java -------------------------------------------------------------------------------- /StudentSystem/src/indi/wrenn/studentsystem/frame/ScoresRankingFrame.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cckevincyh/StudentSystem/HEAD/StudentSystem/src/indi/wrenn/studentsystem/frame/ScoresRankingFrame.java -------------------------------------------------------------------------------- /StudentSystem/src/indi/wrenn/studentsystem/frame/UpdatePasswordFrame.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cckevincyh/StudentSystem/HEAD/StudentSystem/src/indi/wrenn/studentsystem/frame/UpdatePasswordFrame.java -------------------------------------------------------------------------------- /StudentSystem/src/indi/wrenn/studentsystem/frame/QueryStudentScoreFrame.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cckevincyh/StudentSystem/HEAD/StudentSystem/src/indi/wrenn/studentsystem/frame/QueryStudentScoreFrame.java -------------------------------------------------------------------------------- /StudentSystem/src/indi/wrenn/studentsystem/frame/StudentSystemMainFrame.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cckevincyh/StudentSystem/HEAD/StudentSystem/src/indi/wrenn/studentsystem/frame/StudentSystemMainFrame.java -------------------------------------------------------------------------------- /StudentSystem/src/indi/wrenn/studentsystem/frame/ConditionsQueryScoreFrame.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cckevincyh/StudentSystem/HEAD/StudentSystem/src/indi/wrenn/studentsystem/frame/ConditionsQueryScoreFrame.java -------------------------------------------------------------------------------- /StudentSystem/src/indi/wrenn/studentsystem/frame/ScoreConditionsQueryFrame.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cckevincyh/StudentSystem/HEAD/StudentSystem/src/indi/wrenn/studentsystem/frame/ScoreConditionsQueryFrame.java -------------------------------------------------------------------------------- /StudentSystem/src/indi/wrenn/studentsystem/frame/StudentSystemLoginFrame.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cckevincyh/StudentSystem/HEAD/StudentSystem/src/indi/wrenn/studentsystem/frame/StudentSystemLoginFrame.java -------------------------------------------------------------------------------- /StudentSystem/src/indi/wrenn/studentsystem/frame/UpdateStudentScoreFrame.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cckevincyh/StudentSystem/HEAD/StudentSystem/src/indi/wrenn/studentsystem/frame/UpdateStudentScoreFrame.java -------------------------------------------------------------------------------- /StudentSystem/src/indi/wrenn/studentsystem/frame/StudentSystemRegisterFrame.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cckevincyh/StudentSystem/HEAD/StudentSystem/src/indi/wrenn/studentsystem/frame/StudentSystemRegisterFrame.java -------------------------------------------------------------------------------- /StudentSystem/src/indi/wrenn/studentsystem/dao/JdbcConfig.java: -------------------------------------------------------------------------------- 1 | package indi.wrenn.studentsystem.dao; 2 | 3 | public interface JdbcConfig { 4 | String DRIVER = "com.mysql.jdbc.Driver"; 5 | String URL = "jdbc:mysql://localhost:3306/StudentSystemDao"; 6 | String USERNAME = "root"; 7 | String PASSWORD = ""; 8 | } 9 | -------------------------------------------------------------------------------- /StudentSystem/src/indi/wrenn/studentsystem/run/TestLogin.java: -------------------------------------------------------------------------------- 1 | package indi.wrenn.studentsystem.run; 2 | 3 | import indi.wrenn.studentsystem.frame.StudentSystemLoginFrame; 4 | 5 | public class TestLogin { 6 | public static void main(String[] args) { 7 | StudentSystemLoginFrame frame = new StudentSystemLoginFrame(); 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /StudentSystem/src/indi/wrenn/studentsystem/frame/ImagePanel.java: -------------------------------------------------------------------------------- 1 | package indi.wrenn.studentsystem.frame; 2 | 3 | import java.awt.Graphics; 4 | import java.awt.Image; 5 | 6 | import javax.swing.ImageIcon; 7 | import javax.swing.JPanel; 8 | 9 | public class ImagePanel extends JPanel{ 10 | private ImageIcon icon; 11 | private Image img; 12 | 13 | public ImagePanel(){ 14 | icon=new ImageIcon(StudentSystemMainFrame.class.getResource("/1.png" )); 15 | img=icon.getImage(); 16 | } 17 | public void paintComponent(Graphics g) 18 | { 19 | super.paintComponent(g); 20 | g.drawImage(img,0,0,null ); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # StudentSystem 2 | # java学生管理系统 3 | 4 | 5 | 该系统主要功能有: 6 | 1) 学生基本信息和学生成绩的管理 7 | 学生基本信息:姓名、学号、专业、班级、所属院系。 8 | 各科成绩:高等数学、英语、数据结构、计算机组成原理、面向对象程序设计 9 | 系统可以完成对各类信息的添加、修改、删除等功能。 10 | 2) 成绩的统计汇总 11 | 可以计算班级平均成绩,某科最高成绩,最低成绩,优、良、中、及格、不及格各个成绩等级的人数,每位同学的总成绩、班级总成绩,总成绩排名等。 12 | 3) 成绩信息查询 13 | 查询功能是系统的核心功能之一。在系统中既有单条件查询也有多条件查询,可以精确查询和模糊查询。可以按照班级、成绩范围、科目等查询。可以自己根据需要合理设计。 14 | 4) 系统登录功能 15 | 进入系统,需要登录。可以注册用户,有完整的用户注册、用户登录和密码修改功能。 16 | 17 | 18 | 系统管理模块:因为本系统是用来管理学生成绩的,所以系统运行的正常和安全性非常重要,为了达到此目的本系统需要一个管理系统安全的系统管理模块。其任务是维护系统的正常运行和安全性设置。该模块的主要任务是维护系统的正常运行和安全性设置包括注册、登录、修改密码、退出登录等等。 19 | 20 | 教师管理模块:该模块的主要任务是维护系统的正常运行和安全性设置,实现对学生的个人信息的管理工作,对学生信息进行维护更新,从而方便学校管理部门对学校的基本情况的快速查询和了解。包括添加学生信息、查询和修改学生信息、删除学生信息等等。 21 | 22 | 成绩管理模块:因为本系统需要对学生成绩进行统计、分析。这也是本系统的一个重要的作用,所以有必要专门构建一个管理学生成绩的模块。方便教师等快速把握学生、班级、学校的学习状况。学校的成绩管理工作是检验学生学习情况的一个主要手段,本模块包括成绩添加、成绩修改、成绩查询、成绩的统计等功能模块。 23 | 24 | ![image](https://github.com/cckevincyh/StudentSystem/blob/master/img/12.png) 25 | 26 | ## 界面 27 | 28 | ### 登录界面 29 | 30 | ![image](https://github.com/cckevincyh/StudentSystem/blob/master/img/login.png) 31 | 32 | ### 主界面 33 | 34 | ![image](https://github.com/cckevincyh/StudentSystem/blob/master/img/1.png) 35 | 36 | 37 | ### 查询学生详细信息界面 38 | 39 | ![image](https://github.com/cckevincyh/StudentSystem/blob/master/img/info.png) 40 | 41 | ### 添加学生界面 42 | 43 | ![image](https://github.com/cckevincyh/StudentSystem/blob/master/img/add.png) 44 | 45 | ### 添加学生成绩界面 46 | 47 | ![image](https://github.com/cckevincyh/StudentSystem/blob/master/img/add2.png) 48 | 49 | 50 | ### 修改学生界面 51 | 52 | ![image](https://github.com/cckevincyh/StudentSystem/blob/master/img/update.png) 53 | 54 | ### 修改学生成绩界面 55 | 56 | ![image](https://github.com/cckevincyh/StudentSystem/blob/master/img/update2.png) 57 | 58 | ### 查询学生界面 59 | 60 | ![image](https://github.com/cckevincyh/StudentSystem/blob/master/img/find.png) 61 | 62 | ### 查询学生成绩界面 63 | 64 | ![image](https://github.com/cckevincyh/StudentSystem/blob/master/img/find2.png) 65 | 66 | ### 成绩界分析面 67 | 68 | ![image](https://github.com/cckevincyh/StudentSystem/blob/master/img/an.png) 69 | 70 | ![image](https://github.com/cckevincyh/StudentSystem/blob/master/img/an2.png) 71 | 72 | ![image](https://github.com/cckevincyh/StudentSystem/blob/master/img/an3.png) 73 | -------------------------------------------------------------------------------- /StudentSystem/database/StudentSystemDao.sql: -------------------------------------------------------------------------------- 1 | create database StudentSystemDao; 2 | 3 | 4 | use StudentSystemDao; 5 | create table tb_Department( #所属院系表 6 | Department_ID varchar(30) primary key, #院系编号 7 | Department_Name nvarchar(50) unique not null #院系名 8 | ); 9 | 10 | 11 | use StudentSystemDao; 12 | create table tb_Major( #专业表 13 | Major_ID varchar(30) primary key, #专业编号 14 | Major_Name nvarchar(50) unique not null, #专业名称 15 | Department_ID varchar(30) not null, #所属院系ID 16 | foreign key(Department_ID) references tb_Department(Department_ID) #所属院系设置为院系表的外键 17 | ); 18 | 19 | 20 | 21 | 22 | 23 | use StudentSystemDao; 24 | create table tb_Classe( #班级表 25 | Classe int not null, #班级 26 | Grade int not null, #年级 27 | Major_ID varchar(30) not null, #专业编号 28 | primary key(Classe,Grade,Major_ID) #班级,年级和专业编号共为主键 29 | ); 30 | 31 | 32 | 33 | 34 | use StudentSystemDao; 35 | create table tb_Student( #学生表 36 | Student_Id varchar(30) primary key, #学生学号 37 | Student_Name nvarchar(50) not null, #学生姓名 38 | Student_Sex nchar(1) default '男' not null check (StudentSex in('男','女')), #学生性别 39 | Grade int not null, #年级 40 | Classe int not null, #班级 41 | Major_ID varchar(30) not null, #专业编号 42 | Major_Name nvarchar(50) not null, #专业名称 43 | Department_ID varchar(30) not null, #所属院系ID 44 | Department_Name nvarchar(50) not null, #院系名称 45 | foreign key(Department_ID) references tb_Department(Department_ID), #所属院系编号设置为外键 46 | foreign key(Major_ID) references tb_Major(Major_ID), #专业编号设置为外键 47 | foreign key(Department_Name) references tb_Department(Department_Name), #所属院系名称设置为外键 48 | foreign key(Major_Name) references tb_Major(Major_Name) #专业名称设置为外键 49 | ); 50 | 51 | 52 | 53 | 54 | use StudentSystemDao; 55 | create table tb_User( #用户表 56 | User_name nvarchar(30) primary key, #用户名 57 | Password_ varchar(30) not null, #密码 58 | IsLogin bit not null DEFAULT 0 #是否重复登陆 59 | 60 | ); 61 | 62 | 63 | 64 | use StudentSystemDao; 65 | create table tb_Course( #课程表 66 | Course_Name nvarchar(50) not null, #课程名称 67 | Major_ID varchar(30) not null, #所属专业编号 68 | foreign key(Major_ID) references tb_Major(Major_ID),#专业编号设置为专业表的外键 69 | Grade int not null, #年级 70 | primary key(Course_Name,Major_ID,Grade) #课程名称,专业,年级共为主键 71 | ); 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | use StudentSystemDao; 80 | create table tb_Score( #成绩表 81 | Student_Id varchar(30) not null, #学生ID 82 | Student_Name nvarchar(50) not null, #学生姓名 83 | Course_Name varchar(30) not null, #课程名称 84 | primary key(Course_Name,Student_Id), #学生ID和课程名称共同组成主键 85 | foreign key(Student_Id) references tb_Student(Student_Id), #学生ID设置为学生表的外键 86 | foreign key(Course_Name) references tb_Course(Course_Name), 87 | Score dec(4,1) default null check(Score between 0.0 and 100.0) #成绩在0到100之间 88 | ); 89 | 90 | 91 | 92 | 93 | 94 | /*插入院系*/ 95 | insert into tb_Department(Department_ID ,Department_Name) values('01','艺术系'); 96 | insert into tb_Department(Department_ID ,Department_Name) values('02','中国语言文学系'); 97 | insert into tb_Department(Department_ID ,Department_Name) values('03','电子信息系'); 98 | insert into tb_Department(Department_ID ,Department_Name) values('04','计算机科学与技术系'); 99 | insert into tb_Department(Department_ID ,Department_Name) values('05','物流与信息管理系'); 100 | insert into tb_Department(Department_ID ,Department_Name) values('06','旅游管理系'); 101 | insert into tb_Department(Department_ID ,Department_Name) values('07','机械与汽车工程系'); 102 | insert into tb_Department(Department_ID ,Department_Name) values('08','国际贸易与金融系'); 103 | insert into tb_Department(Department_ID ,Department_Name) values('09','工商管理系'); 104 | insert into tb_Department(Department_ID ,Department_Name) values('10','公共管理系'); 105 | insert into tb_Department(Department_ID ,Department_Name) values('11','建筑学系'); 106 | insert into tb_Department(Department_ID ,Department_Name) values('12','化学与药学系'); 107 | insert into tb_Department(Department_ID ,Department_Name) values('13','外语系'); 108 | insert into tb_Department(Department_ID ,Department_Name) values('14','音乐舞蹈学院'); 109 | 110 | 111 | 112 | /*插入专业*/ 113 | insert into tb_Major(Major_ID,Major_Name,Department_ID) values('01','视觉传达设计专业','01'); 114 | insert into tb_Major(Major_ID,Major_Name,Department_ID) values('02','动画专业','01'); 115 | insert into tb_Major(Major_ID,Major_Name,Department_ID) values('03','汉语言文学专业','02'); 116 | insert into tb_Major(Major_ID,Major_Name,Department_ID) values('04','广告学专业','02'); 117 | insert into tb_Major(Major_ID,Major_Name,Department_ID) values('05','汉语国际教育专业','02'); 118 | insert into tb_Major(Major_ID,Major_Name,Department_ID) values('06','电子信息科学与技术专业','03'); 119 | insert into tb_Major(Major_ID,Major_Name,Department_ID) values('07','微电子科学与工程专业','03'); 120 | insert into tb_Major(Major_ID,Major_Name,Department_ID) values('08','自动化专业','03'); 121 | insert into tb_Major(Major_ID,Major_Name,Department_ID) values('09','通信工程专业','03'); 122 | insert into tb_Major(Major_ID,Major_Name,Department_ID) values('10','测控技术与仪器专业','03'); 123 | insert into tb_Major(Major_ID,Major_Name,Department_ID) values('11','计算机科学与技术专业','04'); 124 | insert into tb_Major(Major_ID,Major_Name,Department_ID) values('12','软件工程专业','04'); 125 | insert into tb_Major(Major_ID,Major_Name,Department_ID) values('13','网络工程专业','04'); 126 | insert into tb_Major(Major_ID,Major_Name,Department_ID) values('14','物流管理专业','05'); 127 | insert into tb_Major(Major_ID,Major_Name,Department_ID) values('15','信息管理与信息系统专业','05'); 128 | insert into tb_Major(Major_ID,Major_Name,Department_ID) values('16','电子商务专业','05'); 129 | insert into tb_Major(Major_ID,Major_Name,Department_ID) values('17','旅游管理专业','06'); 130 | insert into tb_Major(Major_ID,Major_Name,Department_ID) values('18','机械设计制造及其自动化专业','07'); 131 | insert into tb_Major(Major_ID,Major_Name,Department_ID) values('19','汽车服务工程专业','07'); 132 | insert into tb_Major(Major_ID,Major_Name,Department_ID) values('20','车辆工程专业','07'); 133 | insert into tb_Major(Major_ID,Major_Name,Department_ID) values('21','工业工程专业','07'); 134 | insert into tb_Major(Major_ID,Major_Name,Department_ID) values('22','国际经济与贸易专业','08'); 135 | insert into tb_Major(Major_ID,Major_Name,Department_ID) values('23','金融学专业','08'); 136 | insert into tb_Major(Major_ID,Major_Name,Department_ID) values('24','工商管理专业','09'); 137 | insert into tb_Major(Major_ID,Major_Name,Department_ID) values('25','市场营销专业','09'); 138 | insert into tb_Major(Major_ID,Major_Name,Department_ID) values('26','人力资源管理专业','09'); 139 | insert into tb_Major(Major_ID,Major_Name,Department_ID) values('27','会计学专业','09'); 140 | insert into tb_Major(Major_ID,Major_Name,Department_ID) values('28','行政管理专业','10'); 141 | insert into tb_Major(Major_ID,Major_Name,Department_ID) values('29','劳动与社会保障专业','10'); 142 | insert into tb_Major(Major_ID,Major_Name,Department_ID) values('30','社会工作专业','10'); 143 | insert into tb_Major(Major_ID,Major_Name,Department_ID) values('31','建筑学专业','11'); 144 | insert into tb_Major(Major_ID,Major_Name,Department_ID) values('32','城乡规划专业','11'); 145 | insert into tb_Major(Major_ID,Major_Name,Department_ID) values('33','应用化学专业','12'); 146 | insert into tb_Major(Major_ID,Major_Name,Department_ID) values('34','制药工程(生物制药)专业','12'); 147 | insert into tb_Major(Major_ID,Major_Name,Department_ID) values('35','药物制剂专业','12'); 148 | insert into tb_Major(Major_ID,Major_Name,Department_ID) values('36','中药学专业','12'); 149 | insert into tb_Major(Major_ID,Major_Name,Department_ID) values('37','化学工程与工艺专业','12'); 150 | insert into tb_Major(Major_ID,Major_Name,Department_ID) values('38','英语专业','13'); 151 | insert into tb_Major(Major_ID,Major_Name,Department_ID) values('39','日语专业','13'); 152 | insert into tb_Major(Major_ID,Major_Name,Department_ID) values('40','朝鲜语(韩国语)专业','13'); 153 | insert into tb_Major(Major_ID,Major_Name,Department_ID) values('41','音乐表演专业','14'); 154 | insert into tb_Major(Major_ID,Major_Name,Department_ID) values('42','舞蹈编导专业','14'); 155 | 156 | 157 | 158 | /*添加班级*/ 159 | insert into tb_Classe(Classe,Grade,Major_ID) values(1,2014,'11'); 160 | insert into tb_Classe(Classe,Grade,Major_ID) values(2,2014,'11'); 161 | insert into tb_Classe(Classe,Grade,Major_ID) values(3,2014,'11'); 162 | insert into tb_Classe(Classe,Grade,Major_ID) values(4,2014,'11'); 163 | insert into tb_Classe(Classe,Grade,Major_ID) values(5,2014,'11'); 164 | insert into tb_Classe(Classe,Grade,Major_ID) values(6,2014,'11'); 165 | insert into tb_Classe(Classe,Grade,Major_ID) values(7,2014,'11'); 166 | insert into tb_Classe(Classe,Grade,Major_ID) values(8,2014,'11'); 167 | insert into tb_Classe(Classe,Grade,Major_ID) values(9,2014,'11'); 168 | insert into tb_Classe(Classe,Grade,Major_ID) values(1,2014,'12'); 169 | insert into tb_Classe(Classe,Grade,Major_ID) values(2,2014,'12'); 170 | insert into tb_Classe(Classe,Grade,Major_ID) values(3,2014,'12'); 171 | insert into tb_Classe(Classe,Grade,Major_ID) values(4,2014,'12'); 172 | insert into tb_Classe(Classe,Grade,Major_ID) values(5,2014,'12'); 173 | insert into tb_Classe(Classe,Grade,Major_ID) values(6,2014,'12'); 174 | insert into tb_Classe(Classe,Grade,Major_ID) values(7,2014,'12'); 175 | insert into tb_Classe(Classe,Grade,Major_ID) values(8,2014,'12'); 176 | insert into tb_Classe(Classe,Grade,Major_ID) values(9,2014,'12'); 177 | insert into tb_Classe(Classe,Grade,Major_ID) values(1,2014,'13'); 178 | insert into tb_Classe(Classe,Grade,Major_ID) values(2,2014,'13'); 179 | insert into tb_Classe(Classe,Grade,Major_ID) values(3,2014,'13'); 180 | insert into tb_Classe(Classe,Grade,Major_ID) values(4,2014,'13'); 181 | insert into tb_Classe(Classe,Grade,Major_ID) values(5,2014,'13'); 182 | insert into tb_Classe(Classe,Grade,Major_ID) values(6,2014,'13'); 183 | insert into tb_Classe(Classe,Grade,Major_ID) values(7,2014,'13'); 184 | insert into tb_Classe(Classe,Grade,Major_ID) values(8,2014,'13'); 185 | insert into tb_Classe(Classe,Grade,Major_ID) values(9,2014,'13'); 186 | 187 | 188 | 189 | /*添加课程*/ 190 | insert into tb_Course(Course_Name,Major_ID,Grade) values ('高等数学','11',2014); 191 | insert into tb_Course(Course_Name,Major_ID,Grade) values ('英语','11',2014); 192 | insert into tb_Course(Course_Name,Major_ID,Grade) values ('数据结构','11',2014); 193 | insert into tb_Course(Course_Name,Major_ID,Grade) values ('计算机组成原理','11',2014); 194 | insert into tb_Course(Course_Name,Major_ID,Grade) values ('面向对象程序设计','11',2014); 195 | 196 | insert into tb_Course(Course_Name,Major_ID,Grade) values ('高等数学','12',2014); 197 | insert into tb_Course(Course_Name,Major_ID,Grade) values ('英语','12',2014); 198 | insert into tb_Course(Course_Name,Major_ID,Grade) values ('数据结构','12',2014); 199 | insert into tb_Course(Course_Name,Major_ID,Grade) values ('软件工程导论','12',2014); 200 | insert into tb_Course(Course_Name,Major_ID,Grade) values ('面向对象程序设计','12',2014); 201 | 202 | insert into tb_Course(Course_Name,Major_ID,Grade) values ('高等数学','13',2014); 203 | insert into tb_Course(Course_Name,Major_ID,Grade) values ('英语','13',2014); 204 | insert into tb_Course(Course_Name,Major_ID,Grade) values ('数据结构','13',2014); 205 | insert into tb_Course(Course_Name,Major_ID,Grade) values ('计算机网络','13',2014); 206 | insert into tb_Course(Course_Name,Major_ID,Grade) values ('面向对象程序设计','13',2014); 207 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Apache License 2 | Version 2.0, January 2004 3 | http://www.apache.org/licenses/ 4 | 5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 6 | 7 | 1. Definitions. 8 | 9 | "License" shall mean the terms and conditions for use, reproduction, 10 | and distribution as defined by Sections 1 through 9 of this document. 11 | 12 | "Licensor" shall mean the copyright owner or entity authorized by 13 | the copyright owner that is granting the License. 14 | 15 | "Legal Entity" shall mean the union of the acting entity and all 16 | other entities that control, are controlled by, or are under common 17 | control with that entity. For the purposes of this definition, 18 | "control" means (i) the power, direct or indirect, to cause the 19 | direction or management of such entity, whether by contract or 20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 21 | outstanding shares, or (iii) beneficial ownership of such entity. 22 | 23 | "You" (or "Your") shall mean an individual or Legal Entity 24 | exercising permissions granted by this License. 25 | 26 | "Source" form shall mean the preferred form for making modifications, 27 | including but not limited to software source code, documentation 28 | source, and configuration files. 29 | 30 | "Object" form shall mean any form resulting from mechanical 31 | transformation or translation of a Source form, including but 32 | not limited to compiled object code, generated documentation, 33 | and conversions to other media types. 34 | 35 | "Work" shall mean the work of authorship, whether in Source or 36 | Object form, made available under the License, as indicated by a 37 | copyright notice that is included in or attached to the work 38 | (an example is provided in the Appendix below). 39 | 40 | "Derivative Works" shall mean any work, whether in Source or Object 41 | form, that is based on (or derived from) the Work and for which the 42 | editorial revisions, annotations, elaborations, or other modifications 43 | represent, as a whole, an original work of authorship. For the purposes 44 | of this License, Derivative Works shall not include works that remain 45 | separable from, or merely link (or bind by name) to the interfaces of, 46 | the Work and Derivative Works thereof. 47 | 48 | "Contribution" shall mean any work of authorship, including 49 | the original version of the Work and any modifications or additions 50 | to that Work or Derivative Works thereof, that is intentionally 51 | submitted to Licensor for inclusion in the Work by the copyright owner 52 | or by an individual or Legal Entity authorized to submit on behalf of 53 | the copyright owner. For the purposes of this definition, "submitted" 54 | means any form of electronic, verbal, or written communication sent 55 | to the Licensor or its representatives, including but not limited to 56 | communication on electronic mailing lists, source code control systems, 57 | and issue tracking systems that are managed by, or on behalf of, the 58 | Licensor for the purpose of discussing and improving the Work, but 59 | excluding communication that is conspicuously marked or otherwise 60 | designated in writing by the copyright owner as "Not a Contribution." 61 | 62 | "Contributor" shall mean Licensor and any individual or Legal Entity 63 | on behalf of whom a Contribution has been received by Licensor and 64 | subsequently incorporated within the Work. 65 | 66 | 2. Grant of Copyright License. Subject to the terms and conditions of 67 | this License, each Contributor hereby grants to You a perpetual, 68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 69 | copyright license to reproduce, prepare Derivative Works of, 70 | publicly display, publicly perform, sublicense, and distribute the 71 | Work and such Derivative Works in Source or Object form. 72 | 73 | 3. Grant of Patent License. Subject to the terms and conditions of 74 | this License, each Contributor hereby grants to You a perpetual, 75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 76 | (except as stated in this section) patent license to make, have made, 77 | use, offer to sell, sell, import, and otherwise transfer the Work, 78 | where such license applies only to those patent claims licensable 79 | by such Contributor that are necessarily infringed by their 80 | Contribution(s) alone or by combination of their Contribution(s) 81 | with the Work to which such Contribution(s) was submitted. If You 82 | institute patent litigation against any entity (including a 83 | cross-claim or counterclaim in a lawsuit) alleging that the Work 84 | or a Contribution incorporated within the Work constitutes direct 85 | or contributory patent infringement, then any patent licenses 86 | granted to You under this License for that Work shall terminate 87 | as of the date such litigation is filed. 88 | 89 | 4. Redistribution. You may reproduce and distribute copies of the 90 | Work or Derivative Works thereof in any medium, with or without 91 | modifications, and in Source or Object form, provided that You 92 | meet the following conditions: 93 | 94 | (a) You must give any other recipients of the Work or 95 | Derivative Works a copy of this License; and 96 | 97 | (b) You must cause any modified files to carry prominent notices 98 | stating that You changed the files; and 99 | 100 | (c) You must retain, in the Source form of any Derivative Works 101 | that You distribute, all copyright, patent, trademark, and 102 | attribution notices from the Source form of the Work, 103 | excluding those notices that do not pertain to any part of 104 | the Derivative Works; and 105 | 106 | (d) If the Work includes a "NOTICE" text file as part of its 107 | distribution, then any Derivative Works that You distribute must 108 | include a readable copy of the attribution notices contained 109 | within such NOTICE file, excluding those notices that do not 110 | pertain to any part of the Derivative Works, in at least one 111 | of the following places: within a NOTICE text file distributed 112 | as part of the Derivative Works; within the Source form or 113 | documentation, if provided along with the Derivative Works; or, 114 | within a display generated by the Derivative Works, if and 115 | wherever such third-party notices normally appear. The contents 116 | of the NOTICE file are for informational purposes only and 117 | do not modify the License. You may add Your own attribution 118 | notices within Derivative Works that You distribute, alongside 119 | or as an addendum to the NOTICE text from the Work, provided 120 | that such additional attribution notices cannot be construed 121 | as modifying the License. 122 | 123 | You may add Your own copyright statement to Your modifications and 124 | may provide additional or different license terms and conditions 125 | for use, reproduction, or distribution of Your modifications, or 126 | for any such Derivative Works as a whole, provided Your use, 127 | reproduction, and distribution of the Work otherwise complies with 128 | the conditions stated in this License. 129 | 130 | 5. Submission of Contributions. Unless You explicitly state otherwise, 131 | any Contribution intentionally submitted for inclusion in the Work 132 | by You to the Licensor shall be under the terms and conditions of 133 | this License, without any additional terms or conditions. 134 | Notwithstanding the above, nothing herein shall supersede or modify 135 | the terms of any separate license agreement you may have executed 136 | with Licensor regarding such Contributions. 137 | 138 | 6. Trademarks. This License does not grant permission to use the trade 139 | names, trademarks, service marks, or product names of the Licensor, 140 | except as required for reasonable and customary use in describing the 141 | origin of the Work and reproducing the content of the NOTICE file. 142 | 143 | 7. Disclaimer of Warranty. Unless required by applicable law or 144 | agreed to in writing, Licensor provides the Work (and each 145 | Contributor provides its Contributions) on an "AS IS" BASIS, 146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 147 | implied, including, without limitation, any warranties or conditions 148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 149 | PARTICULAR PURPOSE. You are solely responsible for determining the 150 | appropriateness of using or redistributing the Work and assume any 151 | risks associated with Your exercise of permissions under this License. 152 | 153 | 8. Limitation of Liability. In no event and under no legal theory, 154 | whether in tort (including negligence), contract, or otherwise, 155 | unless required by applicable law (such as deliberate and grossly 156 | negligent acts) or agreed to in writing, shall any Contributor be 157 | liable to You for damages, including any direct, indirect, special, 158 | incidental, or consequential damages of any character arising as a 159 | result of this License or out of the use or inability to use the 160 | Work (including but not limited to damages for loss of goodwill, 161 | work stoppage, computer failure or malfunction, or any and all 162 | other commercial damages or losses), even if such Contributor 163 | has been advised of the possibility of such damages. 164 | 165 | 9. Accepting Warranty or Additional Liability. While redistributing 166 | the Work or Derivative Works thereof, You may choose to offer, 167 | and charge a fee for, acceptance of support, warranty, indemnity, 168 | or other liability obligations and/or rights consistent with this 169 | License. However, in accepting such obligations, You may act only 170 | on Your own behalf and on Your sole responsibility, not on behalf 171 | of any other Contributor, and only if You agree to indemnify, 172 | defend, and hold each Contributor harmless for any liability 173 | incurred by, or claims asserted against, such Contributor by reason 174 | of your accepting any such warranty or additional liability. 175 | 176 | END OF TERMS AND CONDITIONS 177 | 178 | APPENDIX: How to apply the Apache License to your work. 179 | 180 | To apply the Apache License to your work, attach the following 181 | boilerplate notice, with the fields enclosed by brackets "{}" 182 | replaced with your own identifying information. (Don't include 183 | the brackets!) The text should be enclosed in the appropriate 184 | comment syntax for the file format. We also recommend that a 185 | file or class name and description of purpose be included on the 186 | same "printed page" as the copyright notice for easier 187 | identification within third-party archives. 188 | 189 | Copyright {yyyy} {name of copyright owner} 190 | 191 | Licensed under the Apache License, Version 2.0 (the "License"); 192 | you may not use this file except in compliance with the License. 193 | You may obtain a copy of the License at 194 | 195 | http://www.apache.org/licenses/LICENSE-2.0 196 | 197 | Unless required by applicable law or agreed to in writing, software 198 | distributed under the License is distributed on an "AS IS" BASIS, 199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 200 | See the License for the specific language governing permissions and 201 | limitations under the License. 202 | --------------------------------------------------------------------------------