1 Star 0 Fork 1

daijiapeng/本科毕业设计-Egg.js-基于web的在线考试系统后端

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
examdb.sql 38.98 KB
一键复制 编辑 原始数据 按行查看 历史
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665
/*
Navicat Premium Data Transfer
Source Server : localhost_3306
Source Server Type : MySQL
Source Server Version : 80031
Source Host : localhost:3306
Source Schema : examdb
Target Server Type : MySQL
Target Server Version : 80031
File Encoding : 65001
Date: 24/05/2023 10:38:33
*/
SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;
-- ----------------------------
-- Table structure for c_notice
-- ----------------------------
DROP TABLE IF EXISTS `c_notice`;
CREATE TABLE `c_notice` (
`id` int NOT NULL AUTO_INCREMENT,
`title` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL,
`content` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL,
`u_id` int NOT NULL,
`c_id` int NOT NULL,
`datetime` datetime NOT NULL,
PRIMARY KEY (`id`) USING BTREE,
INDEX `u_id`(`u_id`) USING BTREE,
INDEX `c_id`(`c_id`) USING BTREE,
CONSTRAINT `c_notice_ibfk_1` FOREIGN KEY (`u_id`) REFERENCES `user` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
CONSTRAINT `c_notice_ibfk_2` FOREIGN KEY (`c_id`) REFERENCES `my_class` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE = InnoDB AUTO_INCREMENT = 11 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci ROW_FORMAT = DYNAMIC;
-- ----------------------------
-- Records of c_notice
-- ----------------------------
INSERT INTO `c_notice` VALUES (10, '123123', '123123', 1, 42, '2023-05-13 10:32:04');
-- ----------------------------
-- Table structure for class_log
-- ----------------------------
DROP TABLE IF EXISTS `class_log`;
CREATE TABLE `class_log` (
`id` int NOT NULL AUTO_INCREMENT,
`date` datetime NOT NULL COMMENT '事件发生的时间',
`description` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '事件的描述',
`c_id` int NOT NULL COMMENT '被该事件影响的班级',
`u_id` int NOT NULL COMMENT '被该事件影响的用户',
PRIMARY KEY (`id`) USING BTREE,
INDEX `c_id`(`c_id`) USING BTREE,
INDEX `u_id`(`u_id`) USING BTREE,
CONSTRAINT `class_log_ibfk_1` FOREIGN KEY (`c_id`) REFERENCES `my_class` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
CONSTRAINT `class_log_ibfk_2` FOREIGN KEY (`u_id`) REFERENCES `user` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE = InnoDB AUTO_INCREMENT = 47 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '班级的动态日志记录' ROW_FORMAT = DYNAMIC;
-- ----------------------------
-- Records of class_log
-- ----------------------------
INSERT INTO `class_log` VALUES (11, '2023-04-03 11:16:48', '创建了班级', 1, 41);
INSERT INTO `class_log` VALUES (13, '2023-04-03 14:00:32', '加入了班级', 1, 1);
INSERT INTO `class_log` VALUES (19, '2023-04-19 15:05:36', '创建了班级', 36, 1);
INSERT INTO `class_log` VALUES (25, '2023-05-08 16:05:13', '退出了班级', 1, 1);
INSERT INTO `class_log` VALUES (27, '2023-05-10 10:29:18', '加入了班级', 36, 41);
INSERT INTO `class_log` VALUES (28, '2023-05-10 10:34:20', '加入了班级', 36, 41);
INSERT INTO `class_log` VALUES (29, '2023-05-10 10:36:35', '加入了班级', 36, 41);
INSERT INTO `class_log` VALUES (30, '2023-05-10 10:40:54', '创建了班级', 42, 1);
INSERT INTO `class_log` VALUES (31, '2023-05-10 10:42:23', '加入了班级', 42, 40);
INSERT INTO `class_log` VALUES (32, '2023-05-10 10:42:35', '退出了班级', 42, 40);
INSERT INTO `class_log` VALUES (33, '2023-05-10 10:52:02', '加入了班级', 42, 40);
INSERT INTO `class_log` VALUES (34, '2023-05-10 10:52:47', '加入了班级', 42, 40);
INSERT INTO `class_log` VALUES (35, '2023-05-10 10:52:53', '退出了班级', 42, 40);
INSERT INTO `class_log` VALUES (36, '2023-05-10 11:19:38', '加入了班级', 42, 40);
INSERT INTO `class_log` VALUES (37, '2023-05-10 11:19:47', '退出了班级', 42, 40);
INSERT INTO `class_log` VALUES (38, '2023-05-10 11:25:52', '加入了班级', 42, 40);
INSERT INTO `class_log` VALUES (39, '2023-05-10 11:25:59', '退出了班级', 42, 40);
INSERT INTO `class_log` VALUES (40, '2023-05-10 11:27:06', '加入了班级', 42, 40);
INSERT INTO `class_log` VALUES (41, '2023-05-10 11:27:16', '退出了班级', 42, 40);
INSERT INTO `class_log` VALUES (42, '2023-05-13 10:39:25', '加入了班级', 42, 40);
INSERT INTO `class_log` VALUES (43, '2023-05-13 10:39:32', '退出了班级', 42, 40);
INSERT INTO `class_log` VALUES (45, '2023-05-13 11:46:21', '加入了班级', 42, 40);
INSERT INTO `class_log` VALUES (46, '2023-05-14 10:58:56', '创建了班级', 44, 1);
-- ----------------------------
-- Table structure for e_question
-- ----------------------------
DROP TABLE IF EXISTS `e_question`;
CREATE TABLE `e_question` (
`id` int NOT NULL AUTO_INCREMENT,
`e_id` int NOT NULL COMMENT '考试id',
`q_id` int NOT NULL COMMENT '题目id',
PRIMARY KEY (`id`) USING BTREE,
INDEX `e_id`(`e_id`) USING BTREE,
INDEX `q_id`(`q_id`) USING BTREE,
CONSTRAINT `e_question_ibfk_1` FOREIGN KEY (`e_id`) REFERENCES `exam` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
CONSTRAINT `e_question_ibfk_2` FOREIGN KEY (`q_id`) REFERENCES `question` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE = InnoDB AUTO_INCREMENT = 46 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci ROW_FORMAT = DYNAMIC;
-- ----------------------------
-- Records of e_question
-- ----------------------------
INSERT INTO `e_question` VALUES (31, 35, 51);
INSERT INTO `e_question` VALUES (32, 35, 88);
INSERT INTO `e_question` VALUES (33, 35, 60);
INSERT INTO `e_question` VALUES (34, 35, 69);
INSERT INTO `e_question` VALUES (35, 35, 85);
INSERT INTO `e_question` VALUES (36, 36, 54);
INSERT INTO `e_question` VALUES (37, 36, 55);
INSERT INTO `e_question` VALUES (38, 36, 48);
INSERT INTO `e_question` VALUES (39, 36, 87);
INSERT INTO `e_question` VALUES (40, 36, 88);
INSERT INTO `e_question` VALUES (41, 36, 72);
INSERT INTO `e_question` VALUES (42, 36, 91);
INSERT INTO `e_question` VALUES (43, 36, 76);
INSERT INTO `e_question` VALUES (44, 36, 43);
INSERT INTO `e_question` VALUES (45, 36, 45);
INSERT INTO `e_question` VALUES (46, 37, 43);
INSERT INTO `e_question` VALUES (47, 37, 56);
INSERT INTO `e_question` VALUES (48, 37, 49);
-- ----------------------------
-- Table structure for exam
-- ----------------------------
DROP TABLE IF EXISTS `exam`;
CREATE TABLE `exam` (
`id` int NOT NULL AUTO_INCREMENT,
`c_id` int NOT NULL COMMENT '班级id',
`name` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '可自定义考试名字,不自定义则默认为班级名',
`start_time` datetime NOT NULL COMMENT '考试开始时间',
`end_time` datetime NOT NULL COMMENT '考试结束时间',
`total_score` int NOT NULL COMMENT '总分,老师填完所有问题后由程序自动计算得出',
`pass_score` int NOT NULL COMMENT '及格分数,程序计算完总分后由老师手动填入',
`create_time` datetime NOT NULL,
PRIMARY KEY (`id`) USING BTREE,
INDEX `eclass`(`c_id`) USING BTREE,
CONSTRAINT `eclass` FOREIGN KEY (`c_id`) REFERENCES `my_class` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE = InnoDB AUTO_INCREMENT = 37 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci ROW_FORMAT = DYNAMIC;
-- ----------------------------
-- Records of exam
-- ----------------------------
INSERT INTO `exam` VALUES (35, 42, 'Java考试', '2023-05-03 16:00:00', '2023-06-12 16:00:00', 0, 60, '2023-05-17 19:29:48');
INSERT INTO `exam` VALUES (36, 42, 'java', '2023-05-16 16:00:00', '2023-06-17 16:00:00', 0, 60, '2023-05-18 15:50:12');
INSERT INTO `exam` VALUES (37, 42, '测试1', '2023-05-23 16:00:00', '2023-06-21 16:00:00', 0, 60, '2023-05-24 08:50:45');
-- ----------------------------
-- Table structure for exam_log
-- ----------------------------
DROP TABLE IF EXISTS `exam_log`;
CREATE TABLE `exam_log` (
`id` int NOT NULL AUTO_INCREMENT,
`date` datetime NOT NULL COMMENT '事件发生的时间',
`description` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '事件的描述',
`e_id` int NOT NULL COMMENT '被该事件影响的考试',
`u_id` int NOT NULL COMMENT '被该事件影响的用户',
PRIMARY KEY (`id`) USING BTREE,
INDEX `c_id`(`e_id`) USING BTREE,
INDEX `u_id`(`u_id`) USING BTREE,
CONSTRAINT `exam_log_ibfk_1` FOREIGN KEY (`e_id`) REFERENCES `exam` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
CONSTRAINT `exam_log_ibfk_2` FOREIGN KEY (`u_id`) REFERENCES `user` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE = InnoDB AUTO_INCREMENT = 34 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '班级的动态日志记录' ROW_FORMAT = DYNAMIC;
-- ----------------------------
-- Records of exam_log
-- ----------------------------
INSERT INTO `exam_log` VALUES (32, '2023-05-17 19:29:48', '创建了考试', 35, 1);
INSERT INTO `exam_log` VALUES (33, '2023-05-18 15:50:12', '创建了考试', 36, 1);
INSERT INTO `exam_log` VALUES (34, '2023-05-24 08:50:45', '创建了考试', 37, 1);
-- ----------------------------
-- Table structure for grade
-- ----------------------------
DROP TABLE IF EXISTS `grade`;
CREATE TABLE `grade` (
`u_id` int NOT NULL COMMENT '学生id',
`e_id` int NOT NULL COMMENT '考试id',
`pass` tinyint(1) NOT NULL DEFAULT 0 COMMENT '是否已通过考试',
`id` int NOT NULL AUTO_INCREMENT,
`teacherShow` tinyint(1) NOT NULL COMMENT '老师是否已阅卷',
`userCommit` tinyint(1) NOT NULL DEFAULT 0 COMMENT '用户已提交',
`right_count` int NOT NULL DEFAULT 0,
PRIMARY KEY (`id`) USING BTREE,
INDEX `eexam`(`e_id`) USING BTREE,
INDEX `u_id`(`u_id`) USING BTREE,
CONSTRAINT `grade_ibfk_1` FOREIGN KEY (`e_id`) REFERENCES `exam` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
CONSTRAINT `grade_ibfk_2` FOREIGN KEY (`u_id`) REFERENCES `user` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE = InnoDB AUTO_INCREMENT = 22 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci ROW_FORMAT = DYNAMIC;
-- ----------------------------
-- Records of grade
-- ----------------------------
INSERT INTO `grade` VALUES (40, 35, 0, 20, 1, 1, 2);
INSERT INTO `grade` VALUES (40, 36, 0, 21, 1, 1, 5);
-- ----------------------------
-- Table structure for my_class
-- ----------------------------
DROP TABLE IF EXISTS `my_class`;
CREATE TABLE `my_class` (
`id` int NOT NULL AUTO_INCREMENT,
`name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL,
`head` text CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL,
`create_time` datetime NOT NULL,
`code` varchar(8) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '唯一识别码',
PRIMARY KEY (`id`) USING BTREE,
UNIQUE INDEX `name`(`name`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 45 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci ROW_FORMAT = DYNAMIC;
-- ----------------------------
-- Records of my_class
-- ----------------------------
INSERT INTO `my_class` VALUES (1, '测试班级', '/public/image/class_head.png', '2023-04-03 11:16:48', 'hjpwdt9d');
INSERT INTO `my_class` VALUES (36, '我的测试班级', '/public/image/class_head.png', '2023-04-19 15:05:36', 'vnxbwxts');
INSERT INTO `my_class` VALUES (42, '测试班级1', '/public/image/class_head.png', '2023-05-10 10:40:54', 'k3gafm6l');
INSERT INTO `my_class` VALUES (44, '测试班级2', '/public/image/class_head.png', '2023-05-14 10:58:56', '4seyd2uc');
-- ----------------------------
-- Table structure for q_answer
-- ----------------------------
DROP TABLE IF EXISTS `q_answer`;
CREATE TABLE `q_answer` (
`id` int NOT NULL AUTO_INCREMENT,
`answer` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL,
`q_id` int NOT NULL,
`isRight` tinyint(1) NOT NULL COMMENT '是否是正确答案',
PRIMARY KEY (`id`) USING BTREE,
INDEX `q_id`(`q_id`) USING BTREE,
CONSTRAINT `q_answer_ibfk_1` FOREIGN KEY (`q_id`) REFERENCES `question` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE = InnoDB AUTO_INCREMENT = 275 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci ROW_FORMAT = DYNAMIC;
-- ----------------------------
-- Records of q_answer
-- ----------------------------
INSERT INTO `q_answer` VALUES (105, '.java', 43, 0);
INSERT INTO `q_answer` VALUES (106, '.class', 43, 1);
INSERT INTO `q_answer` VALUES (107, '.html', 43, 0);
INSERT INTO `q_answer` VALUES (108, '.exe', 43, 0);
INSERT INTO `q_answer` VALUES (109, '3', 44, 1);
INSERT INTO `q_answer` VALUES (110, '3.5', 44, 0);
INSERT INTO `q_answer` VALUES (111, '4', 44, 0);
INSERT INTO `q_answer` VALUES (112, '5', 44, 0);
INSERT INTO `q_answer` VALUES (113, 'public', 45, 0);
INSERT INTO `q_answer` VALUES (114, 'private', 45, 0);
INSERT INTO `q_answer` VALUES (115, 'protected', 45, 1);
INSERT INTO `q_answer` VALUES (116, 'static', 45, 0);
INSERT INTO `q_answer` VALUES (117, 'static void method( )', 46, 1);
INSERT INTO `q_answer` VALUES (118, 'public void method( )', 46, 1);
INSERT INTO `q_answer` VALUES (119, ' final void method( )', 46, 0);
INSERT INTO `q_answer` VALUES (120, 'abstract void method( )', 46, 0);
INSERT INTO `q_answer` VALUES (121, 'fieldname ', 47, 1);
INSERT INTO `q_answer` VALUES (122, 'super ', 47, 0);
INSERT INTO `q_answer` VALUES (123, '3number ', 47, 0);
INSERT INTO `q_answer` VALUES (124, '#number', 47, 0);
INSERT INTO `q_answer` VALUES (125, 'import java.sql.;', 48, 0);
INSERT INTO `q_answer` VALUES (126, 'import java.util.;', 48, 0);
INSERT INTO `q_answer` VALUES (127, 'import java.io.;', 48, 1);
INSERT INTO `q_answer` VALUES (128, 'import java.net.;', 48, 0);
INSERT INTO `q_answer` VALUES (129, '跨平台性', 49, 1);
INSERT INTO `q_answer` VALUES (130, '面向对象性', 49, 0);
INSERT INTO `q_answer` VALUES (131, '多线程性', 49, 0);
INSERT INTO `q_answer` VALUES (132, '安全性', 49, 0);
INSERT INTO `q_answer` VALUES (133, '类就是对象,对象就是类,实例是对象的另一个名称,三者没有差别', 50, 1);
INSERT INTO `q_answer` VALUES (134, '类是对象的抽象,对象是类的具体化,实例是对象的另一个名称', 50, 0);
INSERT INTO `q_answer` VALUES (135, '对象是类的抽象,类是对象的具体化,实例是对象的另一个名称', 50, 0);
INSERT INTO `q_answer` VALUES (136, '类是对象的抽象,对象是类的具体化,实例是类的另一个名称', 50, 0);
INSERT INTO `q_answer` VALUES (137, '封装', 51, 0);
INSERT INTO `q_answer` VALUES (138, '继承', 51, 0);
INSERT INTO `q_answer` VALUES (139, '多态', 51, 0);
INSERT INTO `q_answer` VALUES (140, '结构化', 51, 1);
INSERT INTO `q_answer` VALUES (141, 'JFrame', 52, 0);
INSERT INTO `q_answer` VALUES (142, 'JButton', 52, 1);
INSERT INTO `q_answer` VALUES (143, 'JPanel', 52, 0);
INSERT INTO `q_answer` VALUES (144, 'JApplet', 52, 0);
INSERT INTO `q_answer` VALUES (147, '父类中private修饰的属性和方法在子类中不被继承', 54, 1);
INSERT INTO `q_answer` VALUES (148, '父类中public修饰的属性和方法在子类中被继承且可访问', 54, 0);
INSERT INTO `q_answer` VALUES (149, '父类中protected修饰的属性和方法在子类中被继承且可访问', 54, 0);
INSERT INTO `q_answer` VALUES (150, '父类中default修饰的属性和方法在之类中被继承,若父类和子类在同一个包中,则也可访问', 54, 0);
INSERT INTO `q_answer` VALUES (151, '父类中private修饰的属性和方法在子类中不被继承', 55, 1);
INSERT INTO `q_answer` VALUES (152, '父类中public修饰的属性和方法在子类中被继承且可访问', 55, 0);
INSERT INTO `q_answer` VALUES (153, '父类中protected修饰的属性和方法在子类中被继承且可访问', 55, 0);
INSERT INTO `q_answer` VALUES (154, '父类中default修饰的属性和方法在之类中被继承,若父类和子类在同一个包中,则也可访问', 55, 0);
INSERT INTO `q_answer` VALUES (155, '父类中private修饰的属性和方法在子类中不被继承', 56, 1);
INSERT INTO `q_answer` VALUES (156, '父类中public修饰的属性和方法在子类中被继承且可访问', 56, 0);
INSERT INTO `q_answer` VALUES (157, '父类中protected修饰的属性和方法在子类中被继承且可访问', 56, 0);
INSERT INTO `q_answer` VALUES (158, '父类中default修饰的属性和方法在之类中被继承,若父类和子类在同一个包中,则也可访问', 56, 0);
INSERT INTO `q_answer` VALUES (159, '对', 57, 0);
INSERT INTO `q_answer` VALUES (160, '错', 57, 1);
INSERT INTO `q_answer` VALUES (161, '对', 58, 0);
INSERT INTO `q_answer` VALUES (162, '错', 58, 1);
INSERT INTO `q_answer` VALUES (163, '对', 59, 1);
INSERT INTO `q_answer` VALUES (164, '错', 59, 0);
INSERT INTO `q_answer` VALUES (165, '对', 60, 1);
INSERT INTO `q_answer` VALUES (166, '错', 60, 0);
INSERT INTO `q_answer` VALUES (167, '对', 61, 0);
INSERT INTO `q_answer` VALUES (168, '错', 61, 1);
INSERT INTO `q_answer` VALUES (169, '对', 62, 0);
INSERT INTO `q_answer` VALUES (170, '错', 62, 1);
INSERT INTO `q_answer` VALUES (171, '对', 63, 1);
INSERT INTO `q_answer` VALUES (172, '错', 63, 0);
INSERT INTO `q_answer` VALUES (173, '对', 64, 1);
INSERT INTO `q_answer` VALUES (174, '错', 64, 0);
INSERT INTO `q_answer` VALUES (175, '对', 65, 1);
INSERT INTO `q_answer` VALUES (176, '错', 65, 0);
INSERT INTO `q_answer` VALUES (177, '对', 66, 0);
INSERT INTO `q_answer` VALUES (178, '错', 66, 1);
INSERT INTO `q_answer` VALUES (179, '对', 67, 1);
INSERT INTO `q_answer` VALUES (180, '错', 67, 0);
INSERT INTO `q_answer` VALUES (181, '对', 68, 1);
INSERT INTO `q_answer` VALUES (182, '错', 68, 0);
INSERT INTO `q_answer` VALUES (183, 'String args', 69, 0);
INSERT INTO `q_answer` VALUES (184, 'String args[]', 69, 1);
INSERT INTO `q_answer` VALUES (185, 'Char arg', 69, 0);
INSERT INTO `q_answer` VALUES (186, 'StringBuffer args[]', 69, 0);
INSERT INTO `q_answer` VALUES (187, '在Java中类只允许单一继承', 70, 1);
INSERT INTO `q_answer` VALUES (188, '在Java中一个类只能实现一个接口', 70, 0);
INSERT INTO `q_answer` VALUES (189, '在Java中一个类不能同时继承一个类和实现一个接口', 70, 0);
INSERT INTO `q_answer` VALUES (190, '在Java中接口只允许单一继承', 70, 0);
INSERT INTO `q_answer` VALUES (191, 'Graphics ', 71, 1);
INSERT INTO `q_answer` VALUES (192, 'Graphics2D ', 71, 0);
INSERT INTO `q_answer` VALUES (193, 'String ', 71, 0);
INSERT INTO `q_answer` VALUES (194, 'Color', 71, 0);
INSERT INTO `q_answer` VALUES (195, 'int', 72, 1);
INSERT INTO `q_answer` VALUES (196, 'Boolean', 72, 0);
INSERT INTO `q_answer` VALUES (197, 'float ', 72, 0);
INSERT INTO `q_answer` VALUES (198, 'char', 72, 0);
INSERT INTO `q_answer` VALUES (199, 'static ', 73, 1);
INSERT INTO `q_answer` VALUES (200, 'package ', 73, 0);
INSERT INTO `q_answer` VALUES (201, 'private ', 73, 0);
INSERT INTO `q_answer` VALUES (202, 'public', 73, 0);
INSERT INTO `q_answer` VALUES (203, 'init()', 74, 0);
INSERT INTO `q_answer` VALUES (204, 'start()', 74, 0);
INSERT INTO `q_answer` VALUES (205, 'destroy() ', 74, 1);
INSERT INTO `q_answer` VALUES (206, 'stop()', 74, 0);
INSERT INTO `q_answer` VALUES (207, 'Java程序只有两类:Application和Applet', 75, 0);
INSERT INTO `q_answer` VALUES (208, '类的方法只能由public修饰', 75, 1);
INSERT INTO `q_answer` VALUES (209, '面向对象的程序设计的优点有可重用性、可扩展性、可管理性', 75, 0);
INSERT INTO `q_answer` VALUES (210, 'Java语言通过接口支持多重继承', 75, 0);
INSERT INTO `q_answer` VALUES (211, 'public static void main ()', 76, 0);
INSERT INTO `q_answer` VALUES (212, 'public static void main (String args[ ])', 76, 1);
INSERT INTO `q_answer` VALUES (213, 'public static int main (String [ ] args)', 76, 0);
INSERT INTO `q_answer` VALUES (214, 'public void main (String args[ ])', 76, 0);
INSERT INTO `q_answer` VALUES (215, 'ItemListener ', 77, 1);
INSERT INTO `q_answer` VALUES (216, 'ActionListener ', 77, 0);
INSERT INTO `q_answer` VALUES (217, 'itemStateChanged ', 77, 0);
INSERT INTO `q_answer` VALUES (218, 'Event', 77, 0);
INSERT INTO `q_answer` VALUES (219, 'FlowLayout ', 78, 1);
INSERT INTO `q_answer` VALUES (220, 'BorderLayout ', 78, 0);
INSERT INTO `q_answer` VALUES (221, 'GirdLayout ', 78, 0);
INSERT INTO `q_answer` VALUES (222, 'CardLayout', 78, 0);
INSERT INTO `q_answer` VALUES (223, 'public', 79, 1);
INSERT INTO `q_answer` VALUES (224, 'super ', 79, 0);
INSERT INTO `q_answer` VALUES (225, '3number ', 79, 0);
INSERT INTO `q_answer` VALUES (226, 'width', 79, 0);
INSERT INTO `q_answer` VALUES (227, 'fieldname ', 80, 1);
INSERT INTO `q_answer` VALUES (228, 'super ', 80, 0);
INSERT INTO `q_answer` VALUES (229, '3number ', 80, 0);
INSERT INTO `q_answer` VALUES (230, '#number', 80, 0);
INSERT INTO `q_answer` VALUES (231, 's += “books”; ', 81, 0);
INSERT INTO `q_answer` VALUES (232, 's = s + 100;', 81, 0);
INSERT INTO `q_answer` VALUES (233, 'int len = s.length; ', 81, 1);
INSERT INTO `q_answer` VALUES (234, 'String t = s + “abc”;', 81, 0);
INSERT INTO `q_answer` VALUES (235, 'name ', 82, 0);
INSERT INTO `q_answer` VALUES (236, 'hello ', 82, 0);
INSERT INTO `q_answer` VALUES (237, 'false ', 82, 1);
INSERT INTO `q_answer` VALUES (238, 'good', 82, 0);
INSERT INTO `q_answer` VALUES (239, 'public ', 83, 0);
INSERT INTO `q_answer` VALUES (240, 'class ', 83, 0);
INSERT INTO `q_answer` VALUES (241, 'interface ', 83, 1);
INSERT INTO `q_answer` VALUES (242, 'static', 83, 0);
INSERT INTO `q_answer` VALUES (243, 'public ', 84, 0);
INSERT INTO `q_answer` VALUES (244, 'class ', 84, 0);
INSERT INTO `q_answer` VALUES (245, 'interface ', 84, 1);
INSERT INTO `q_answer` VALUES (246, 'static', 84, 0);
INSERT INTO `q_answer` VALUES (247, 'p.add(b);', 85, 0);
INSERT INTO `q_answer` VALUES (248, 'p.add(b,“North”);', 85, 0);
INSERT INTO `q_answer` VALUES (249, 'p.add(b,“South”);', 85, 1);
INSERT INTO `q_answer` VALUES (250, 'b.add(p,“North”);', 85, 0);
INSERT INTO `q_answer` VALUES (251, 'Button b=new Button();', 86, 1);
INSERT INTO `q_answer` VALUES (252, 'button b=new button();', 86, 0);
INSERT INTO `q_answer` VALUES (253, 'Button b=new b(); ', 86, 0);
INSERT INTO `q_answer` VALUES (254, 'b.setLabel(“确定”);', 86, 0);
INSERT INTO `q_answer` VALUES (255, '抽象类可以用来定义接口', 87, 0);
INSERT INTO `q_answer` VALUES (256, '定义抽象类时需要abstract', 87, 1);
INSERT INTO `q_answer` VALUES (257, '抽象类可以是对接口的实现', 87, 0);
INSERT INTO `q_answer` VALUES (258, '抽象类中的所有方法都是具体的', 87, 0);
INSERT INTO `q_answer` VALUES (259, '读取客户端文件', 88, 0);
INSERT INTO `q_answer` VALUES (260, '在客户端主机上创建新文件', 88, 0);
INSERT INTO `q_answer` VALUES (261, '在客户端装载程序库', 88, 0);
INSERT INTO `q_answer` VALUES (262, '读取客户端部分系统变量', 88, 1);
INSERT INTO `q_answer` VALUES (263, '在Java中,若要处理某类事件,必须定义相关的事件处理类', 89, 0);
INSERT INTO `q_answer` VALUES (264, '在对事件源实例化之后,要注册相应事件的监听器', 89, 0);
INSERT INTO `q_answer` VALUES (265, '事件处理类必须实现与该类事件相对应的监听器接口', 89, 0);
INSERT INTO `q_answer` VALUES (266, '事件源通常是一个构件,也称做监听器', 89, 1);
INSERT INTO `q_answer` VALUES (267, 'start( )', 90, 0);
INSERT INTO `q_answer` VALUES (268, '.sleep( ) ', 90, 0);
INSERT INTO `q_answer` VALUES (269, 'main( )', 90, 1);
INSERT INTO `q_answer` VALUES (270, 'stop( )', 90, 0);
INSERT INTO `q_answer` VALUES (271, 'Button b=new Button();', 91, 1);
INSERT INTO `q_answer` VALUES (272, 'button b=new button();', 91, 0);
INSERT INTO `q_answer` VALUES (273, 'Button b=new b();', 91, 0);
INSERT INTO `q_answer` VALUES (274, 'b.setLabel(“确定”);', 91, 0);
-- ----------------------------
-- Table structure for q_image
-- ----------------------------
DROP TABLE IF EXISTS `q_image`;
CREATE TABLE `q_image` (
`id` int NOT NULL AUTO_INCREMENT,
`src` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '图片路径',
`q_id` int NOT NULL COMMENT '对应的题目id',
PRIMARY KEY (`id`) USING BTREE,
INDEX `q_id`(`q_id`) USING BTREE,
CONSTRAINT `q_image_ibfk_1` FOREIGN KEY (`q_id`) REFERENCES `question` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci ROW_FORMAT = DYNAMIC;
-- ----------------------------
-- Records of q_image
-- ----------------------------
-- ----------------------------
-- Table structure for q_tag
-- ----------------------------
DROP TABLE IF EXISTS `q_tag`;
CREATE TABLE `q_tag` (
`id` int NOT NULL AUTO_INCREMENT,
`t_id` int NOT NULL,
`q_id` int NOT NULL,
PRIMARY KEY (`id`) USING BTREE,
INDEX `t_id`(`t_id`) USING BTREE,
INDEX `q_id`(`q_id`) USING BTREE,
CONSTRAINT `q_tag_ibfk_1` FOREIGN KEY (`t_id`) REFERENCES `tag` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
CONSTRAINT `q_tag_ibfk_2` FOREIGN KEY (`q_id`) REFERENCES `question` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE = InnoDB AUTO_INCREMENT = 55 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci ROW_FORMAT = DYNAMIC;
-- ----------------------------
-- Records of q_tag
-- ----------------------------
INSERT INTO `q_tag` VALUES (7, 3, 43);
INSERT INTO `q_tag` VALUES (8, 3, 44);
INSERT INTO `q_tag` VALUES (9, 3, 45);
INSERT INTO `q_tag` VALUES (10, 3, 46);
INSERT INTO `q_tag` VALUES (11, 3, 47);
INSERT INTO `q_tag` VALUES (12, 3, 48);
INSERT INTO `q_tag` VALUES (13, 3, 49);
INSERT INTO `q_tag` VALUES (14, 3, 50);
INSERT INTO `q_tag` VALUES (15, 3, 51);
INSERT INTO `q_tag` VALUES (16, 3, 52);
INSERT INTO `q_tag` VALUES (17, 3, 54);
INSERT INTO `q_tag` VALUES (18, 3, 55);
INSERT INTO `q_tag` VALUES (19, 3, 56);
INSERT INTO `q_tag` VALUES (20, 3, 57);
INSERT INTO `q_tag` VALUES (21, 3, 58);
INSERT INTO `q_tag` VALUES (22, 3, 59);
INSERT INTO `q_tag` VALUES (23, 3, 60);
INSERT INTO `q_tag` VALUES (24, 3, 61);
INSERT INTO `q_tag` VALUES (25, 3, 62);
INSERT INTO `q_tag` VALUES (26, 3, 63);
INSERT INTO `q_tag` VALUES (27, 3, 64);
INSERT INTO `q_tag` VALUES (28, 3, 65);
INSERT INTO `q_tag` VALUES (29, 3, 66);
INSERT INTO `q_tag` VALUES (30, 3, 67);
INSERT INTO `q_tag` VALUES (31, 3, 68);
INSERT INTO `q_tag` VALUES (32, 3, 69);
INSERT INTO `q_tag` VALUES (33, 3, 70);
INSERT INTO `q_tag` VALUES (34, 3, 71);
INSERT INTO `q_tag` VALUES (35, 3, 72);
INSERT INTO `q_tag` VALUES (36, 3, 73);
INSERT INTO `q_tag` VALUES (37, 3, 74);
INSERT INTO `q_tag` VALUES (38, 3, 75);
INSERT INTO `q_tag` VALUES (39, 3, 76);
INSERT INTO `q_tag` VALUES (40, 3, 77);
INSERT INTO `q_tag` VALUES (41, 3, 78);
INSERT INTO `q_tag` VALUES (42, 3, 79);
INSERT INTO `q_tag` VALUES (43, 3, 80);
INSERT INTO `q_tag` VALUES (44, 3, 81);
INSERT INTO `q_tag` VALUES (45, 3, 82);
INSERT INTO `q_tag` VALUES (46, 3, 83);
INSERT INTO `q_tag` VALUES (47, 3, 84);
INSERT INTO `q_tag` VALUES (48, 3, 85);
INSERT INTO `q_tag` VALUES (49, 3, 86);
INSERT INTO `q_tag` VALUES (50, 3, 87);
INSERT INTO `q_tag` VALUES (51, 3, 88);
INSERT INTO `q_tag` VALUES (52, 3, 89);
INSERT INTO `q_tag` VALUES (53, 3, 90);
INSERT INTO `q_tag` VALUES (54, 3, 91);
-- ----------------------------
-- Table structure for question
-- ----------------------------
DROP TABLE IF EXISTS `question`;
CREATE TABLE `question` (
`id` int NOT NULL AUTO_INCREMENT,
`u_id` int NOT NULL COMMENT '添加者id',
`content` text CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '题目内容',
`type` tinyint(1) NOT NULL COMMENT '题目类型,0为选择,1为多选,2为判断',
PRIMARY KEY (`id`) USING BTREE,
INDEX `u_id`(`u_id`) USING BTREE,
CONSTRAINT `question_ibfk_1` FOREIGN KEY (`u_id`) REFERENCES `user` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE = InnoDB AUTO_INCREMENT = 92 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci ROW_FORMAT = DYNAMIC;
-- ----------------------------
-- Records of question
-- ----------------------------
INSERT INTO `question` VALUES (43, 1, '编译Java Application 源程序文件将产生相应的字节码文件,这些字节码文件的扩展名为', 0);
INSERT INTO `question` VALUES (44, 1, '设 x = 1 , y = 2 , z = 3,则表达式 y+=z--/++x 的值是', 0);
INSERT INTO `question` VALUES (45, 1, '不允许作为类及类成员的访问控制符的是', 0);
INSERT INTO `question` VALUES (46, 1, '为AB类的一个无形式参数无返回值的方法method书写方法头,使得使用类名AB作为前缀就可以调用它,该方法头的形式为', 1);
INSERT INTO `question` VALUES (47, 1, '如下哪个是合法的Java中的标识符', 0);
INSERT INTO `question` VALUES (48, 1, '下列哪一个import命令可以使我们在程序中创建输入/输出流对象', 0);
INSERT INTO `question` VALUES (49, 1, 'Java“一次编译,随处运行”的特点在于其', 0);
INSERT INTO `question` VALUES (50, 1, '下列有关类、对象和实例的叙述,正确的是', 0);
INSERT INTO `question` VALUES (51, 1, '下列( )不是面向对象程序设计方法的特点', 0);
INSERT INTO `question` VALUES (52, 1, '下列哪个属于容器的构件', 0);
INSERT INTO `question` VALUES (54, 1, '下列有关父类属性和方法继承规则的描述错误的是', 0);
INSERT INTO `question` VALUES (55, 1, '在异常处理中,若try中的代码可能产生多种异常则可以对应多个catch语句,若catch中的参数类型有父类子类关系,此时应该将父类放在后面,子类放在前面。', 2);
INSERT INTO `question` VALUES (56, 1, '子类只能继承父类的public,protected和同一个包中的package级的成员。', 2);
INSERT INTO `question` VALUES (57, 1, '在类中实现一个接口,则一定要实现接口中的所有方法。', 2);
INSERT INTO `question` VALUES (58, 1, '抽象方法不仅有方法头,还应该有方法体。', 2);
INSERT INTO `question` VALUES (59, 1, '在比较str1和str2两个字符串对象值是否相等时使用语句str1==str2。', 2);
INSERT INTO `question` VALUES (60, 1, 'Java的源代码中定义几个类,编译结果就生成几个以.class为后缀的字节码文件。', 2);
INSERT INTO `question` VALUES (61, 1, 'Java程序里,创建新的类对象用关键字new,回收无用的类对象使用关键字free。', 2);
INSERT INTO `question` VALUES (62, 1, '构造函数用于创建类的实例对象,构造函数名应与类名相同,返回类型为void。', 2);
INSERT INTO `question` VALUES (63, 1, '如果源文件包含import语句,则该语句必须是除空行和注释行外的第一个语句行。', 2);
INSERT INTO `question` VALUES (64, 1, '拥有abstract方法的类是抽象类,但抽象类中可以没有abstract方法。', 2);
INSERT INTO `question` VALUES (65, 1, '静态初始化器是在其所属的类加载内存时由系统自动调用执行。 ', 2);
INSERT INTO `question` VALUES (66, 1, '在Java中对象可以赋值,只要使用赋值号(等号)即可,相当于生成了一个各属性与赋值对象相同的新对象。 ', 2);
INSERT INTO `question` VALUES (67, 1, 'Java applet也能够存取客户机磁盘上的文件。', 2);
INSERT INTO `question` VALUES (68, 1, '进程是程序的一次动态执行过程。一个进程在其执行过程中,可以产生多个线程——多线程,形成多条执行线索。', 2);
INSERT INTO `question` VALUES (69, 1, 'Java application中的主类需包含main方法,以下哪项是main方法的正确形参?', 0);
INSERT INTO `question` VALUES (70, 1, '以下关于继承的叙述正确的是', 0);
INSERT INTO `question` VALUES (71, 1, 'paint()方法使用哪种类型的参数? ', 0);
INSERT INTO `question` VALUES (72, 1, '以下哪个不是Java的原始数据类型', 0);
INSERT INTO `question` VALUES (73, 1, '若需要定义一个类域或类方法,应使用哪种修饰符?', 0);
INSERT INTO `question` VALUES (74, 1, '在浏览器中执行applet 程序,以下选项中的哪个方法将被最先执行', 0);
INSERT INTO `question` VALUES (75, 1, '下列说法中,不正确的一项是', 0);
INSERT INTO `question` VALUES (76, 1, 'main()方法是Java Application程序执行的入口点,关于main()方法的方法头,下面哪项是合法的。', 0);
INSERT INTO `question` VALUES (77, 1, '在类中若要处理ItemEvent事件,则该类需要实现的接口是', 0);
INSERT INTO `question` VALUES (78, 1, '将GUI窗口中的组件按照从左到右如打字式排列的布局管理器是', 0);
INSERT INTO `question` VALUES (79, 1, '如下哪个是Java中的标识符', 0);
INSERT INTO `question` VALUES (80, 1, '如下哪个是Java中的标识符', 0);
INSERT INTO `question` VALUES (81, 1, '已知如下定义:String s = “story”; 下面哪个语句不是合法的', 0);
INSERT INTO `question` VALUES (82, 1, '如下哪个是Java中有效的关键字', 0);
INSERT INTO `question` VALUES (83, 1, '定义一个类,必须使用的关键字是', 0);
INSERT INTO `question` VALUES (84, 1, '定义一个接口必须使用的关键字是', 0);
INSERT INTO `question` VALUES (85, 1, '如果容器组件p的布局是BorderLayout,则在p的下边中添加一个按钮b,应该使用的语句是', 0);
INSERT INTO `question` VALUES (86, 1, '声明并创建一个按钮对象b,应该使用的语句是', 0);
INSERT INTO `question` VALUES (87, 1, '以下关于抽象类和接口的说法正确的是', 0);
INSERT INTO `question` VALUES (88, 1, 'Applet可以做下列哪些操作', 0);
INSERT INTO `question` VALUES (89, 1, '下列说法中,错误的一项是', 0);
INSERT INTO `question` VALUES (90, 1, '下列哪项是不能改变线程状态的方法?', 0);
INSERT INTO `question` VALUES (91, 1, '声明并创建一个按钮对象b,应该使用的语句是', 0);
-- ----------------------------
-- Table structure for tag
-- ----------------------------
DROP TABLE IF EXISTS `tag`;
CREATE TABLE `tag` (
`id` int NOT NULL AUTO_INCREMENT,
`name` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL,
PRIMARY KEY (`id`) USING BTREE,
UNIQUE INDEX `name`(`name`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 7 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci ROW_FORMAT = DYNAMIC;
-- ----------------------------
-- Records of tag
-- ----------------------------
INSERT INTO `tag` VALUES (5, 'c');
INSERT INTO `tag` VALUES (6, 'c#');
INSERT INTO `tag` VALUES (3, 'java');
-- ----------------------------
-- Table structure for u_answer
-- ----------------------------
DROP TABLE IF EXISTS `u_answer`;
CREATE TABLE `u_answer` (
`u_id` int NOT NULL COMMENT '学生id',
`q_id` int NOT NULL COMMENT '问题id',
`answer` text CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '答案',
`e_id` int NOT NULL,
`id` int NOT NULL AUTO_INCREMENT,
PRIMARY KEY (`id`, `u_id`) USING BTREE,
INDEX `u_id`(`u_id`) USING BTREE,
INDEX `u_answer_ibfk_2`(`q_id`) USING BTREE,
INDEX `e_id`(`e_id`) USING BTREE,
CONSTRAINT `u_answer_ibfk_1` FOREIGN KEY (`u_id`) REFERENCES `user` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
CONSTRAINT `u_answer_ibfk_2` FOREIGN KEY (`q_id`) REFERENCES `question` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
CONSTRAINT `u_answer_ibfk_3` FOREIGN KEY (`e_id`) REFERENCES `exam` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE = InnoDB AUTO_INCREMENT = 233 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci ROW_FORMAT = DYNAMIC;
-- ----------------------------
-- Records of u_answer
-- ----------------------------
INSERT INTO `u_answer` VALUES (40, 51, '封装', 35, 218);
INSERT INTO `u_answer` VALUES (40, 88, '读取客户端部分系统变量', 35, 219);
INSERT INTO `u_answer` VALUES (40, 60, '错', 35, 220);
INSERT INTO `u_answer` VALUES (40, 69, 'Char arg', 35, 221);
INSERT INTO `u_answer` VALUES (40, 85, 'p.add(b,“South”);', 35, 222);
INSERT INTO `u_answer` VALUES (40, 54, '父类中private修饰的属性和方法在子类中不被继承', 36, 223);
INSERT INTO `u_answer` VALUES (40, 55, '父类中private修饰的属性和方法在子类中不被继承', 36, 224);
INSERT INTO `u_answer` VALUES (40, 48, 'import java.sql.;', 36, 225);
INSERT INTO `u_answer` VALUES (40, 87, '抽象类可以用来定义接口', 36, 226);
INSERT INTO `u_answer` VALUES (40, 88, '读取客户端文件', 36, 227);
INSERT INTO `u_answer` VALUES (40, 72, 'int', 36, 228);
INSERT INTO `u_answer` VALUES (40, 91, 'Button b=new Button();', 36, 229);
INSERT INTO `u_answer` VALUES (40, 76, 'public static void main ()', 36, 230);
INSERT INTO `u_answer` VALUES (40, 43, '.class', 36, 231);
INSERT INTO `u_answer` VALUES (40, 45, 'private', 36, 232);
-- ----------------------------
-- Table structure for u_class
-- ----------------------------
DROP TABLE IF EXISTS `u_class`;
CREATE TABLE `u_class` (
`id` int NOT NULL AUTO_INCREMENT,
`c_id` int NOT NULL COMMENT '班级id',
`u_id` int NOT NULL COMMENT '用户Id',
`isTeacher` tinyint(1) NOT NULL DEFAULT 0,
`in_review` tinyint(1) NOT NULL DEFAULT 1 COMMENT '用户是否正在审核中',
PRIMARY KEY (`id`) USING BTREE,
INDEX `class`(`c_id`) USING BTREE,
INDEX `stu`(`u_id`) USING BTREE,
CONSTRAINT `u_class_ibfk_1` FOREIGN KEY (`c_id`) REFERENCES `my_class` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
CONSTRAINT `u_class_ibfk_2` FOREIGN KEY (`u_id`) REFERENCES `user` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE = InnoDB AUTO_INCREMENT = 48 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci ROW_FORMAT = DYNAMIC;
-- ----------------------------
-- Records of u_class
-- ----------------------------
INSERT INTO `u_class` VALUES (10, 1, 41, 1, 0);
INSERT INTO `u_class` VALUES (36, 36, 41, 0, 0);
INSERT INTO `u_class` VALUES (37, 42, 1, 1, 0);
INSERT INTO `u_class` VALUES (46, 42, 40, 0, 0);
INSERT INTO `u_class` VALUES (47, 44, 1, 1, 0);
-- ----------------------------
-- Table structure for user
-- ----------------------------
DROP TABLE IF EXISTS `user`;
CREATE TABLE `user` (
`id` int NOT NULL AUTO_INCREMENT COMMENT 'id',
`name` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '学生名字',
`phone` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '学生手机号',
`email` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '学生邮箱',
`head` text CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL COMMENT '学生头像',
`signature` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '个性签名',
`gender` tinyint(1) NOT NULL COMMENT '性别,0为女,1为男,其他值为不公开',
`password` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL,
`admin` tinyint(1) NOT NULL DEFAULT 0 COMMENT '是否是后台管理员,0为假,1为真',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 45 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci ROW_FORMAT = DYNAMIC;
-- ----------------------------
-- Records of user
-- ----------------------------
INSERT INTO `user` VALUES (1, '戴佳鹏', '13375422741', '1557522386@qq.com', '/public/image/user_head.png', '这个人还没有签名哦~', -1, '336648', 0);
INSERT INTO `user` VALUES (40, '李梓萌', '12244445555', '155@qq.com', '/public/image/user_head.png', '这个人还没有签名哦~', 0, '123', 0);
INSERT INTO `user` VALUES (41, '雷军', '13345553212', '12345@qq.com', '/public/image/user_head.png', '这个人还没有签名哦~', -1, '321', 0);
INSERT INTO `user` VALUES (42, '王晓保', '12312345678', '1558822@qqc.c', '/public/image/user_head.png', '这个人还没有签名哦~', -1, '123', 0);
INSERT INTO `user` VALUES (43, 'user', '12345678901', '123@qq.com', '/public/image/user_head.png', '这个人还没有签名哦~', -1, '336648', 0);
INSERT INTO `user` VALUES (44, 'djp', '123', '12223@qq.com', '/public/image/user_head.png', '这个人还没有签名哦~', -1, '123', 0);
SET FOREIGN_KEY_CHECKS = 1;
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
JavaScript
1
https://gitee.com/daijiapeng/exam_server.git
git@gitee.com:daijiapeng/exam_server.git
daijiapeng
exam_server
本科毕业设计-Egg.js-基于web的在线考试系统后端
master

搜索帮助