## 学生成绩管理系统
### 数据库设计
使用数据库为scoreDB
#### 班级信息表class
| 字段名 | 描述 | 数据类型 | 约束 |
| :-------- | :------- | ----------- | ----------- |
| classNo | 班级编号 | char(10) | primary key |
| className | 班级名称 | varchar(20) | not null |
| institute | 所属学院 | varchar(20) | not null |
| grade | 年级 | int | not null |
| classNum | 班级人数 | int | not null |
#### 学生信息表student
| 字段名 | 描述 | 数据类型 | 约束 |
| -------- | -------- | ----------- | ----------- |
| stuNo | 学号 | char(10) | primary key |
| stuName | 姓名 | varchar(20) | not null |
| sex | 性别 | int | not null |
| birthday | 出生日期 | date | not null |
| nat | 民族 | varchar(20) | not null |
| classNo | 所属班级 | varchar(20) | not null |
#### 课程信息表course
| 字段名 | 属性 | 数据类型 | 约束 |
| ----------- | -------- | ----------- | ----------- |
| courseNo | 课程号 | char(10) | primary key |
| courseName | 课程名 | varchar(20) | not null |
| credit | 学分 | int | not null |
| courseHour | 课时数 | int | not null |
| priorCourse | 先修课程 | varchar(20) | not null |
#### 成绩表score
| 字段名 | 属性 | 数据类型 | 约束 |
| -------- | -------- | -------- | ----------- |
| stuNo | 学号 | char(10) | primary key |
| courseNo | 课程号 | char(10) | primary key |
| term | 开课学期 | char(10) | not null |
| score | 成绩 | int | not null |
#### 账号表account
| 字段名 | 描述 | 数据类型 | 约束 |
| --------- | -------- | ----------- | ---------------------------- |
| id | 用户id | int | primary key ,auto_increament |
| username | 用户名 | varchar(20) | not null |
| password | 密码 | varchar(20) | not null |
| authority | 用户权限 | int | not null |
#### 详细建表sql
```sql
use scoreDB;
/* 删除数据库中所有的表 */
SELECT concat('DROP TABLE IF EXISTS' , table_name, ';')
FROM information_schema.tables
WHERE table_schema = 'scoreDB';
/* 班级信息表class */
drop table IF EXISTS class;
CREATE TABLE class(
classNo CHAR(10) PRIMARY KEY ,
className VARCHAR (20) NOT NULL,
institute VARCHAR (20) NOT NULL,
grade INT NOT NULL,
classNum INT NOT NULL
);
/* 插入班级信息 */
INSERT INTO class (classNo, className, institute, grade, classNum) VALUES
('20011', '通信201','通信学院',1, 1);
/* 学生信息表student */
/* sex:0-未知 1-男 2-女 */
drop table IF EXISTS student;
CREATE TABLE student(
stuNo CHAR(10) PRIMARY KEY,
stuName VARCHAR (20) NOT NULL,
sex INT NOT NULL,
birthday DATE NOT NULL,
nat VARCHAR(20) NOT NULL,
classNo VARCHAR (20) NOT NULL
);
/* 插入学生信息 */
INSERT INTO student (stuNo, stuName, sex, birthday, nat, classNo) VALUES
('20066','王兰花',2,'2000-01-01','汉族','20011');
INSERT INTO student (stuNo, stuName, sex, birthday, nat, classNo) VALUES
('20068','李子豪',1,'2000-06-06','汉族','20011');
INSERT INTO student (stuNo, stuName, sex, birthday, nat, classNo) VALUES
('20088','苏梅',2,'2000-02-12','汉族','20011');
/* 重新计算班级人数 */
UPDATE class SET classNum = (select count(*) from student where classNo='20011')
where classNo='20011';
/* 课程信息表course */
drop TABLE IF EXISTS course;
CREATE TABLE course(
courseNo CHAR(10) PRIMARY KEY,
courseName VARCHAR (20) NOT NULL,
credit INT NOT NULL,
courseHour INT NOT NULL,
priorCourse VARCHAR (20) NOT NULL
);
/* 插入课程信息 */
INSERT INTO course (courseNo, courseName, credit, courseHour, priorCourse) VALUES
('ke-001','高等数学',4, 60, 'null');
INSERT INTO course (courseNo, courseName, credit, courseHour, priorCourse) VALUES
('ke-002','线性代数',4, 60, 'null');
INSERT INTO course (courseNo, courseName, credit, courseHour, priorCourse) VALUES
('ke-003','通信原理',4, 60, '高等数学');
INSERT INTO course (courseNo, courseName, credit, courseHour, priorCourse) VALUES
('ke-004','电子技术基础',4, 60, '高等数学');
INSERT INTO course (courseNo, courseName, credit, courseHour, priorCourse) VALUES
('ke-005','电工学',4, 60, '高等数学');
INSERT INTO course (courseNo, courseName, credit, courseHour, priorCourse) VALUES
('ke-006','自动控制原理',4, 60, '高等数学');
/* 成绩表score */
drop TABLE IF EXISTS score;
CREATE TABLE score(
stuNo CHAR(10) ,
courseNo CHAR(10) ,
term VARCHAR (10) NOT NULL,
score INT NOT NULL,
PRIMARY KEY (stuNo, courseNo)
);
/* 插入成绩信息 */
INSERT INTO score (stuNo, courseNo, term, score) VALUES
('20066', 'ke-001', '2020年春季学期', 80);
INSERT INTO score (stuNo, courseNo, term, score) VALUES
('20066', 'ke-002', '2020年春季学期', 88);
INSERT INTO score (stuNo, courseNo, term, score) VALUES
('20066', 'ke-003', '2020年春季学期', 88);
INSERT INTO score (stuNo, courseNo, term, score) VALUES
('20066', 'ke-004', '2020年春季学期', 88);
INSERT INTO score (stuNo, courseNo, term, score) VALUES
('20066', 'ke-005', '2020年春季学期', 88);
INSERT INTO score (stuNo, courseNo, term, score) VALUES
('20066', 'ke-006', '2020年春季学期', 88);
INSERT INTO score (stuNo, courseNo, term, score) VALUES
('20068', 'ke-001', '2020年春季学期', 60);
INSERT INTO score (stuNo, courseNo, term, score) VALUES
('20068', 'ke-002', '2020年春季学期', 68);
INSERT INTO score (stuNo, courseNo, term, score) VALUES
('20068', 'ke-003', '2020年春季学期', 68);
INSERT INTO score (stuNo, courseNo, term, score) VALUES
('20068', 'ke-004', '2020年春季学期', 68);
INSERT INTO score (stuNo, courseNo, term, score) VALUES
('20068', 'ke-005', '2020年春季学期', 68);
INSERT INTO score (stuNo, courseNo, term, score) VALUES
('20068', 'ke-006', '2020年春季学期', 68);
INSERT INTO score (stuNo, courseNo, term, score) VALUES
('20088', 'ke-001', '2020年春季学期', 90);
INSERT INTO score (stuNo, courseNo, term, score) VALUES
('20088', 'ke-002', '2020年春季学期', 98);
INSERT INTO score (stuNo, courseNo, term, score) VALUES
('20088', 'ke-003', '2020年春季学期', 98);
INSERT INTO score (stuNo, courseNo, term, score) VALUES
('20088', 'ke-004', '2020年春季学期', 98);
INSERT INTO score (stuNo, courseNo, term, score) VALUES
('20088', 'ke-005', '2020年春季学期', 98);
INSERT INTO score (stuNo, courseNo, term, score) VALUES
('20088', 'ke-006', '2020年春季学期', 98);
/* 用户表user */
/* authority是权限字段,共设两个值 1-学生 2-教师 */
drop TABLE IF EXISTS account;
CREATE TABLE account(
id INT AUTO_INCREMENT PRIMARY KEY,
username VARCHAR(20) NOT NULL,
password VARCHAR(20) NOT NULL,
authority INT NOT NULL
);
/* 用户表插入值 */
INSERT INTO account (username, password, authority) VALUES ('20066', '666666', 1);
INSERT INTO account (username, password, authority) VALUES ('20068', '666666', 1);
INSERT INTO account (username, password, authority) VALUES ('20088', '666666', 1);
INSERT INTO account (userna
没有合适的资源?快使用搜索试试~ 我知道了~
温馨提示
基于springboot+mybatis 的学生成绩管理系统源码,特别适合新手小白进行开发全流程学习,本科毕业设计,课程设计等。项目经过严格测试,确保可以运行! 数据库设计 使用数据库为scoreDB 班级信息表class 字段名 描述 数据类型 约束 classNo 班级编号 char(10) primary key className 班级名称 varchar(20) not null institute 所属学院 varchar(20) not null grade 年级 int not null classNum 班级人数 int not null 学生信息表student 字段名 描述 数据类型 约束 stuNo 学号 char(10) primary key
资源推荐
资源详情
资源评论
收起资源包目录
studentManageSystem-master.zip (66个子文件)
studentManageSystem-master
mvnw.cmd 6KB
pom.xml 2KB
.gitattributes 66B
image
1.PNG 40KB
2.PNG 53KB
5.PNG 37KB
6.PNG 49KB
4.PNG 36KB
3.PNG 60KB
src
a.txt 3KB
test
java
com
learn
system
SystemApplicationTests.java 217B
main
resources
mapper
manageMapper.xml 2KB
studentMapper.xml 2KB
accountMapper.xml 1KB
application.properties 274B
templates
regist.html 3KB
welcome.html 6KB
deleteStu.html 4KB
checkScore.html 3KB
checkCourse.html 3KB
index.html 3KB
insertStuInfo.html 4KB
模板.html 1KB
static
js
bootstrap.js 132KB
bootstrap.bundle.js.map 400KB
bootstrap.bundle.min.js.map 311KB
bootstrap.min.js 59KB
bootstrap.bundle.min.js 79KB
bootstrap.bundle.js 223KB
bootstrap.js.map 250KB
jquery-3.2.1.js 262KB
bootstrap.min.js.map 190KB
css
bootstrap-grid.css.map 154KB
bootstrap.min.css 156KB
bootstrap-grid.css 66KB
bootstrap-grid.min.css.map 112KB
bootstrap-reboot.min.css.map 32KB
bootstrap.css.map 493KB
bootstrap.css 193KB
bootstrap-reboot.css 5KB
bootstrap-reboot.css.map 76KB
bootstrap-grid.min.css 50KB
bootstrap.min.css.map 627KB
bootstrap-reboot.min.css 4KB
java
com
learn
system
mapper
ManageMapper.java 1KB
AccountMapper.java 874B
StudentMapper.java 877B
controller
AccountController.java 5KB
ManageController.java 6KB
StudentController.java 4KB
pojo
Score.java 2KB
ClassInfo.java 1KB
Course.java 2KB
Student.java 2KB
Account.java 1KB
service
StudentService.java 906B
serviceImpl
ManageServiceImpl.java 2KB
AccountServiceImpl.java 1017B
StudentServiceImpl.java 3KB
AccountService.java 697B
ManageService.java 1KB
SystemApplication.java 321B
create.sql 6KB
mvnw 10KB
.gitignore 333B
README.md 33KB
共 66 条
- 1
资源评论
白话机器学习
- 粉丝: 8299
- 资源: 7686
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- MFC 列表控件修改实例
- 基于MATLAB光学三维重构中的菱形展开算法 .rar
- 基于MATLAB光学三维重构中的时间相位展开算法+文档.rar
- 基于matlab实现的 Crust 算法的三维点云重构物体表面程序.rar
- 基于matlab的小波包分解应用于机械振动信号的故障分析.rar
- 基于matlab实现的hough变换检测直线,检测直线之后用颜色标记出来.rar
- ESP8266通过MQTT协议将温湿度数据传输至OnenNet云平台源码+详细说明.zip
- 基于matlab实现的 分析机械力学中的工程振动问题,实例1 .rar
- Java期末考试复习笔记
- 基于matlab实现的NSGA2遗传算法的地铁隧道上方基坑工程优化设计.rar
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功