内容正文:
编写说明:湖北省技能高考《计算机类考纲百套卷》,依据《湖北省普通高等学校招收中等职业学校毕业生技能高考计算机类技能考试大纲》编写。每门课程均分三层训练:基础层(具象化支架)以拆解考点为微目标,紧扣考纲 掌握理解 要求编写考点训练卷;巩固层(关联性支架)强化知识交叉与场景关联,按考纲专题编专题训练卷;应用层(引导性支架)聚焦真题突破,结合知识模块与教材编写课程综合卷。
本试卷是第78卷,按《MySQL数据库基础》范围和要求编写。具体内容为:掌握触发器的基本概念、种类和使用场景,熟练掌握创建、删除触发器的操作方法,
湖北省《计算机类考纲百套卷》 第78卷
《MySQL数据库基础》
触发器 专题训练卷
考试时间80分钟 满分100分
班级 姓名 学号 成绩
素材
一、数据库操作题(本大题共10小题,每题10分,共100分)
1.社交网络数据库db_social包含了t_user用户表、t_friendship好友关系表、t_post动态表、点赞表
t_user包含字段uid(用户编号),username(用户名),password(密码),nickname(昵称),age(年龄),sex(性别)。
t_friendship包含字段 fsid(好友关系编号),uid(用户id),fid(好友id),createtime(添加时间)。
t_post包含字段pid(动态编号),uid(用户编号),content(内容),createtime(创建时间)
t_likes包含字段lid(点赞编号),pid(动态编号),fid(好友id),createtime(点赞时间)。
1).在t_friendship表上创建一个BEFORE INSERT触发器,名为check_self_friend。实现逻辑:当插入的好友关系中uid(用户id)等于fid(好友id)时,视为添加自己为好友,触发报错并阻止插入。
2).在t_user表上创建一个BEFORE DELETE触发器,名为delete_user_cascade。实现逻辑:当删除某个用户时,自动删除该用户在t_post表中发布的所有动态
2.线上教育数据库db_education包含了t_student学生表、t_course课程表、t_Learn学习记录表和t_video视频表
t_student包含字段sid(学生编号),sname(学生姓名),username(用户名),password(密码),classes(班级)。
t_course包含字段 cid(课程编号),cname(课程名称),description(描述),
classhour(课时)。
t_video包括字段vid(视频编号),cid(课程编号),title(标题),link(链接地址)
t_Learn学习记录表lid(学习记录编号),sid(学生编号),cid(课程编号),schedule(学习进度),createtime(创建时间)。
1).在t_Learn表上创建一个BEFORE INSERT触发器,名为check_schedule_range。实现逻辑:检查新插入的schedule(学习进度)是否在 0 到 100 之间,若超出范围则报错并阻止插入
2).假设需要在课程表中记录总学习人数,请改为:在t_Learn表上创建一个BEFORE INSERT触发器,名为update_learn_time。实现逻辑:自动将createtime(创建时间)设置为当前系统时间
3.学生成绩系统数据库db_grade包含了t_student学生表t_grade成绩表和t_course科目表
t_student包含字段sid(学生编号),sname(姓名),sex(性别),class(班级)。
t_course包含字段 cid(科目编号),cname(科目名称),total(总分)。
t_grade包含字段gid(成绩编号),sid(学生编号),cid(科目编号),score(分数)。
1).在t_grade表上创建一个BEFORE INSERT触发器,名为check_score_limit。实现逻辑:通过关联t_course表,判断新插入的score(分数)是否大于该科目对应的total(总分),若大于则报错并阻止插入
2).使用SQL命令删除上述触发器check_score_limit
4.医疗管理数据库db_treatment包含了t_patient患者表、t_doctor医生表、t_registration挂号表
t_patient包含字段pid(患者编号),pname(患者姓名),sex(性别),age(年龄),tel(联系电话)。
t_doctor包含字段 did(医生编号),dname(医生姓名),office(科室),
title(职称),tel(联系电话)。
t_registration包括字段rid(挂号编号),pid(患者编号),did(医生编号),rtime(挂号日期)。
1).在t_registration表上创建一个BEFORE INSERT触发器,名为check_registration_date。实现逻辑:检查rtime(挂号日期),若日期小于当前日期(即挂过去的号),则报错并阻止插入
2).在t_patient表上创建一个BEFORE DELETE触发器,名为delete_patient_regs。实现逻辑:当删除某个患者时,自动删除该患者在t_registration表中的所有挂号记录
5.舞蹈课程管理系统数据库db_dance包含了t_student学员表、t_course课程表
、t_class班级表和t_teacher老师表。
t_student包含字段id(学生编号),name(学生姓名),sex(性别),age(年龄),tel(联系方式),cls_id(班级编号);
t_course包含字段id(课程编号),name(课程名称),period(课时)
t_class包含字段id(班级编号),name(班级名称),tea_id(老师编号),cou_id(课程编号),time(上课时间)
t_teacher包含字段id(老师编号),name(老师姓名),sex(性别),age(年龄),tel(联系方式);
1).在t_student表上创建一个BEFORE INSERT触发器,名为check_class_exists。实现逻辑:验证新插入学生的cls_id(班级编号)是否存在于t_class表的id中,若不存在则报错并阻止插入
2).创建触发器:在t_class表上创建一个BEFORE DELETE触发器,名为prevent_delete_class。实现逻辑:若该班级下仍有学生,则报错并阻止删除该班级
6.医疗管理数据库db_treatment包含了tb_patient患者表、tb_doctor医生表和tb_registration挂号表
tb_patient包含字段pid(患者编号),pname(患者姓名),sex(性别),age(年龄),tel(联系电话)。
tb_doctor包含字段 did(医生编号),dname(医生姓名),office(科室),
title(职称),tel(联系电话)。
tb_registration包括字段rid(挂号编号),pid(患者编号),did(医生编号),rtime(挂号日期)。
1).在tb_registration表上创建一个BEFORE INSERT触发器,名为check_patient_doctor_exist。实现逻辑:验证插入的pid是否存在于tb_patient表,且did是否存在于tb_doctor表,若任一不存在则报错阻止插入
2).使用 SQL 命令删除上述触发器check_patient_doctor_exist
7.舞蹈课程管理系统数据库db_dance包含了t_student学员表、t_course课程表
、t_class班级表和t_teacher老师表。
t_student包含字段id(学生编号),name(学生姓名),sex(性别),age(年龄),tel(联系方式),cls_id(班级编号);
t_course包含字段id(课程编号),name(课程名称),period(课时)
t_class包含字段id(班级编号),name(班级名称),tea_id(老师编号),cou_id(课程编号),time(上课时间)
t_teacher包含字段id(老师编号),name(老师姓名),sex(性别),age(年龄),tel(联系方式),salary(薪资);
1).在t_teacher表上创建一个BEFORE UPDATE触发器,名为check_salary_positive。实现逻辑:当修改salary(薪资)字段时,确保新薪资大于等于 0,否则报错并阻止更新
2).在t_teacher表上创建一个BEFORE DELETE触发器,名为delete_teacher_classes。实现逻辑:当删除某个老师时,自动删除t_class表中该老师(tea_id)负责的所有班级记录
8.线上教育数据库db_education包含了t_student学生表、t_course课程表、t_Learn学习记录表和t_video视频表
t_student包含字段id(学生编号),name(学生姓名),username(用户名),password(密码)。
t_course包含字段 id(课程编号),name(课程名称),description(描述),period(课时)。
t_video包括字段id(视频编号),c_id(课程编号),title(标题),link(链接地址)
t_learn学习记录表id(学习记录编号),s_id(学生编号),c_id(课程编号),schedule(学习进度),createtime(创建时间)。
1).在t_learn表上创建一个BEFORE INSERT触发器,名为validate_schedule。实现逻辑:确保插入的schedule(学习进度)在 0 到 100 的闭区间内,否则报错
2).在t_course表上创建一个BEFORE DELETE触发器,名为delete_course_videos。实现逻辑:当删除某门课程时,自动删除t_video表中该课程(c_id)下的所有视频
9.人力资源管理系统数据库db_hrm包含了t_employee员工表、t_department部门表和t_salary薪资表
t_employee包含字段id(员工编号),name(员工姓名),sex(性别),age(年龄),position(职位),d_id(部门编号)。
t_department包含字段 id(部门编号),name(部门名称),description(部门描述)。
t_salary包含字段id(薪资编号),e_id(员工编号),money(薪资),time(薪资日期)
1).在t_salary表上创建一个BEFORE INSERT触发器,名为check_money_positive。实现逻辑:确保插入的money(薪资)大于 0,否则报错阻止插入
2).在t_department表上创建一个BEFORE DELETE触发器,名为prevent_delete_dept。实现逻辑:若该部门下仍有员工,则报错并阻止删除该部门。
10.人力资源管理系统数据库db_hrm包含了t_employee员工表、t_department部门表和t_salary薪资表
t_employee包含字段id(员工编号),name(员工姓名),sex(性别),age(年龄),position(职位),d_id(部门编号)。
t_department包含字段 id(部门编号),name(部门名称),description(部门描述)。
t_salary包含字段id(薪资编号),e_id(员工编号),money(薪资),time(薪资日期)
1).在t_employee表上创建一个BEFORE INSERT触发器,名为check_dept_exists。实现逻辑:验证插入的d_id(部门编号)是否存在于t_department表中,若不存在则报错阻止插入
2).请设计在t_salary表上创建一个AFTER UPDATE触发器,名为record_salary_change。实现逻辑:当money字段发生更新时,将旧薪资和新薪资记录到一张日志表中
原创精品资源学科网独家享有版权,侵权必究!
学科网(北京)股份有限公司
学科网(北京)股份有限公司
学科网(北京)股份有限公司
第10题/db_hrm.myd
CREATE DATABASE IF NOT EXISTS `db_hrm` /*!40100 DEFAULT CHARACTER SET utf8 */;
USE `db_hrm`;
/*
Navicat MySQL Data Transfer
Source Server : 1
Source Server Type : MySQL
Source Server Version : 50743 (5.7.43-log)
Source Host : localhost:3306
Source Schema : db_hrm
Target Server Type : MySQL
Target Server Version : 50743 (5.7.43-log)
File Encoding : 65001
Date: 05/06/2024 11:32:36
*/
SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;
-- ----------------------------
-- Table structure for t_department
-- ----------------------------
DROP TABLE IF EXISTS `t_department`;
CREATE TABLE `t_department` (
`id` int(10) NOT NULL AUTO_INCREMENT,
`name` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
`description` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 10007 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = DYNAMIC;
-- ----------------------------
-- Records of t_department
-- ----------------------------
INSERT INTO `t_department` VALUES (10001, '财务部', '财务部是指在本机构一定的整体目标下,关于资产的购置(投资),资本的融通(筹资)和经营中现金流量(营运资金),以及利润分配的管理的部门。');
INSERT INTO `t_department` VALUES (10002, '行政部', '行政部门是组织或企业中负责管理和支持日常行政事务的部门。');
INSERT INTO `t_department` VALUES (10003, '销售部', '销售部门是组织内负责销售和市场推广活动的部门。其主要职责是促进产品或服务的销售,实现组织的销售目标和利润增长。销售部门通常与市场部门密切协作,共同制定销售策略和营销计划。');
INSERT INTO `t_department` VALUES (10004, '技术部', '技术部门是一个组织内负责技术开发、技术支持和技术管理的部门。其主要职责是提供技术解决方案,支持组织的技术需求,并确保技术的有效运作和发展。');
INSERT INTO `t_department` VALUES (10005, '后勤部', '后勤部是为其它各部门职能能够顺利实现提供物质服务的一个部门');
-- ----------------------------
-- Table structure for t_employee
-- ----------------------------
DROP TABLE IF EXISTS `t_employee`;
CREATE TABLE `t_employee` (
`id` int(10) NOT NULL AUTO_INCREMENT,
`name` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
`sex` char(2) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
`age` int(5) NULL DEFAULT NULL,
`position` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
`d_id` int(10) NULL DEFAULT NULL,
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 10052 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = DYNAMIC;
-- ----------------------------
-- Records of t_employee
-- ----------------------------
INSERT INTO `t_employee` VALUES (10001, '曹岚', '女', 25, '正式员工', 10003);
INSERT INTO `t_employee` VALUES (10002, '丁子韬', '男', 34, '正式员工', 10004);
INSERT INTO `t_employee` VALUES (10003, '陈睿', '男', 40, '高级员工', 10005);
INSERT INTO `t_employee` VALUES (10004, '彭宇宁', '男', 28, '经理', 10003);
INSERT INTO `t_employee` VALUES (10005, '孟宇宁', '男', 34, '高级员工', 10005);
INSERT INTO `t_employee` VALUES (10006, '郭嘉伦', '男', 27, '高级员工', 10004);
INSERT INTO `t_employee` VALUES (10007, '顾子异', '男', 32, '高级员工', 10003);
INSERT INTO `t_employee` VALUES (10008, '孔岚', '女', 27, '经理', 10005);
INSERT INTO `t_employee` VALUES (10009, '曹宇宁', '男', 29, '高级员工', 10002);
INSERT INTO `t_employee` VALUES (10010, '向云熙', '男', 34, '高级员工', 10001);
INSERT INTO `t_employee` VALUES (10011, '陈致远', '男', 25, '经理', 10001);
INSERT INTO `t_employee` VALUES (10012, '武璐', '女', 34, '正式员工', 10003);
INSERT INTO `t_employee` VALUES (10013, '郝晓明', '男', 31, '实习生', 10005);
INSERT INTO `t_employee` VALUES (10014, '韩晓明', '男', 30, '实习生', 10003);
INSERT INTO `t_employee` VALUES (10015, '戴安琪', '女', 24, '实习生', 10002);
INSERT INTO `t_employee` VALUES (10016, '徐宇宁', '男', 35, '经理', 10002);
INSERT INTO `t_employee` VALUES (10017, '魏安琪', '女', 40, '实习生', 10004);
INSERT INTO `t_employee` VALUES (10018, '余安琪', '女', 36, '高级员工', 10002);
INSERT INTO `t_employee` VALUES (10019, '向璐', '女', 29, '经理', 10004);
INSERT INTO `t_employee` VALUES (10020, '崔致远', '男', 35, '高级员工', 10002);
INSERT INTO `t_employee` VALUES (10021, '任宇宁', '男', 29, '实习生', 10005);
INSERT INTO `t_employee` VALUES (10022, '叶睿', '男', 36, '高级员工', 10004);
INSERT INTO `t_employee` VALUES (10023, '邓宇宁', '男', 35, '实习生', 10004);
INSERT INTO `t_employee` VALUES (10024, '阎秀英', '女', 34, '高级员工', 10001);
INSERT INTO `t_employee` VALUES (10025, '孟致远', '男', 34, '实习生', 10001);
INSERT INTO `t_employee` VALUES (10026, '雷睿', '男', 39, '实习生', 10004);
INSERT INTO `t_employee` VALUES (10027, '罗璐', '女', 27, '正式员工', 10002);
INSERT INTO `t_employee` VALUES (10028, '蔡睿', '男', 30, '实习生', 10001);
INSERT INTO `t_employee` VALUES (10029, '袁岚', '女', 34, '实习生', 10002);
INSERT INTO `t_employee` VALUES (10030, '江宇宁', '男', 29, '高级员工', 10001);
INSERT INTO `t_employee` VALUES (10031, '董安琪', '女', 31, '正式员工', 10002);
INSERT INTO `t_employee` VALUES (10032, '阎嘉伦', '男', 24, '正式员工', 10005);
INSERT INTO `t_employee` VALUES (10033, '魏致远', '男', 27, '正式员工', 10002);
INSERT INTO `t_employee` VALUES (10034, '于嘉伦', '男', 23, '实习生', 10002);
INSERT INTO `t_employee` VALUES (10035, '韩宇宁', '男', 25, '正式员工', 10002);
INSERT INTO `t_employee` VALUES (10036, '宋杰宏', '男', 34, '高级员工', 10003);
INSERT INTO `t_employee` VALUES (10037, '汪璐', '女', 31, '实习生', 10001);
INSERT INTO `t_employee` VALUES (10038, '韩子异', '男', 31, '正式员工', 10003);
INSERT INTO `t_employee` VALUES (10039, '高睿', '男', 31, '正式员工', 10002);
INSERT INTO `t_employee` VALUES (10040, '钱宇宁', '男', 28, '实习生', 10005);
INSERT INTO `t_employee` VALUES (10041, '钟子韬', '男', 29, '高级员工', 10001);
INSERT INTO `t_employee` VALUES (10042, '萧子韬', '男', 34, '正式员工', 10005);
INSERT INTO `t_employee` VALUES (10043, '吴云熙', '男', 30, '高级员工', 10005);
INSERT INTO `t_employee` VALUES (10044, '苏震南', '男', 37, '高级员工', 10001);
INSERT INTO `t_employee` VALUES (10045, '黄岚', '女', 26, '正式员工', 10003);
INSERT INTO `t_employee` VALUES (10046, '赵宇宁', '男', 33, '高级员工', 10005);
INSERT INTO `t_employee` VALUES (10047, '许嘉伦', '男', 29, '实习生', 10002);
INSERT INTO `t_employee` VALUES (10048, '孔睿', '男', 37, '高级员工', 10004);
INSERT INTO `t_employee` VALUES (10049, '陈云熙', '男', 25, '正式员工', 10001);
INSERT INTO `t_employee` VALUES (10050, '金宇宁', '男', 28, '正式员工', 10005);
-- ----------------------------
-- Records of t_purchase
-- ----------------------------
-- ----------------------------
-- Table structure for t_salary
-- ----------------------------
DROP TABLE IF EXISTS `t_salary`;
CREATE TABLE `t_salary` (
`id` int(10) NOT NULL AUTO_INCREMENT,
`e_id` int(10) NULL DEFAULT NULL,
`money` decimal(10, 2) NULL DEFAULT NULL,
`time` date NULL DEFAULT NULL,
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 10101 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = DYNAMIC;
-- ----------------------------
-- Records of t_salary
-- ----------------------------
INSERT INTO `t_salary` VALUES (10001, 10046, 6433.00, '2023-12-15');
INSERT INTO `t_salary` VALUES (10002, 10041, 9790.00, '2023-12-15');
INSERT INTO `t_salary` VALUES (10003, 10040, 8464.00, '2023-12-15');
INSERT INTO `t_salary` VALUES (10004, 10028, 7018.00, '2023-12-15');
INSERT INTO `t_salary` VALUES (10005, 10013, 5402.00, '2023-12-15');
INSERT INTO `t_salary` VALUES (10006, 10022, 6368.00, '2023-12-15');
INSERT INTO `t_salary` VALUES (10007, 10024, 7404.00, '2023-12-15');
INSERT INTO `t_salary` VALUES (10008, 10042, 5401.00, '2023-12-15');
INSERT INTO `t_salary` VALUES (10009, 10007, 6049.00, '2023-12-15');
INSERT INTO `t_salary` VALUES (10010, 10048, 5281.00, '2023-12-15');
INSERT INTO `t_salary` VALUES (10011, 10033, 7063.00, '2023-12-15');
INSERT INTO `t_salary` VALUES (10012, 10035, 8835.00, '2023-12-15');
INSERT INTO `t_salary` VALUES (10013, 10026, 7035.00, '2023-12-15');
INSERT INTO `t_salary` VALUES (10014, 10012, 9922.00, '2023-12-15');
INSERT INTO `t_salary` VALUES (10015, 10039, 6497.00, '2023-12-15');
INSERT INTO `t_salary` VALUES (10016, 10017, 5886.00, '2023-12-15');
INSERT INTO `t_salary` VALUES (10017, 10032, 5266.00, '2023-12-15');
INSERT INTO `t_salary` VALUES (10018, 10034, 6711.00, '2023-12-15');
INSERT INTO `t_salary` VALUES (10019, 10050, 7245.00, '2023-12-15');
INSERT INTO `t_salary` VALUES (10020, 10049, 9272.00, '2023-12-15');
INSERT INTO `t_salary` VALUES (10021, 10003, 5735.00, '2023-12-15');
INSERT INTO `t_salary` VALUES (10022, 10014, 5654.00, '2023-12-15');
INSERT INTO `t_salary` VALUES (10023, 10025, 6875.00, '2023-12-15');
INSERT INTO `t_salary` VALUES (10024, 10021, 7578.00, '2023-12-15');
INSERT INTO `t_salary` VALUES (10025, 10011, 5949.00, '2023-12-15');
INSERT INTO `t_salary` VALUES (10026, 10020, 6050.00, '2023-12-15');
INSERT INTO `t_salary` VALUES (10027, 10027, 9881.00, '2023-12-15');
INSERT INTO `t_salary` VALUES (10028, 10037, 5912.00, '2023-12-15');
INSERT INTO `t_salary` VALUES (10029, 10005, 6696.00, '2023-12-15');
INSERT INTO `t_salary` VALUES (10030, 10002, 9584.00, '2023-12-15');
INSERT INTO `t_salary` VALUES (10031, 10043, 6744.00, '2023-12-15');
INSERT INTO `t_salary` VALUES (10032, 10006, 7471.00, '2023-12-15');
INSERT INTO `t_salary` VALUES (10033, 10031, 9545.00, '2023-12-15');
INSERT INTO `t_salary` VALUES (10034, 10029, 5758.00, '2023-12-15');
INSERT INTO `t_salary` VALUES (10035, 10038, 9656.00, '2023-12-15');
INSERT INTO `t_salary` VALUES (10036, 10019, 8875.00, '2023-12-15');
INSERT INTO `t_salary` VALUES (10037, 10009, 9506.00, '2023-12-15');
INSERT INTO `t_salary` VALUES (10038, 10018, 7310.00, '2023-12-15');
INSERT INTO `t_salary` VALUES (10039, 10047, 9341.00, '2023-12-15');
INSERT INTO `t_salary` VALUES (10040, 10001, 10000.00, '2023-12-15');
INSERT INTO `t_salary` VALUES (10041, 10015, 7182.00, '2023-12-15');
INSERT INTO `t_salary` VALUES (10042, 10023, 7322.00, '2023-12-15');
INSERT INTO `t_salary` VALUES (10043, 10008, 8605.00, '2023-12-15');
INSERT INTO `t_salary` VALUES (10044, 10001, 8406.00, '2023-12-15');
INSERT INTO `t_salary` VALUES (10045, 10030, 6779.00, '2023-12-15');
INSERT INTO `t_salary` VALUES (10046, 10045, 7257.00, '2023-12-15');
INSERT INTO `t_salary` VALUES (10047, 10036, 8226.00, '2023-12-15');
INSERT INTO `t_salary` VALUES (10048, 10044, 6933.00, '2023-12-15');
INSERT INTO `t_salary` VALUES (10049, 10016, 9858.00, '2023-12-15');
INSERT INTO `t_salary` VALUES (10050, 10004, 5995.00, '2023-12-15');
INSERT INTO `t_salary` VALUES (10051, 10035, 6439.00, '2023-11-15');
INSERT INTO `t_salary` VALUES (10052, 10027, 9253.00, '2023-11-15');
INSERT INTO `t_salary` VALUES (10053, 10038, 9502.00, '2023-11-15');
INSERT INTO `t_salary` VALUES (10054, 10016, 5817.00, '2023-11-15');
INSERT INTO `t_salary` VALUES (10055, 10013, 9357.00, '2023-11-15');
INSERT INTO `t_salary` VALUES (10056, 10040, 7632.00, '2023-11-15');
INSERT INTO `t_salary` VALUES (10057, 10050, 8117.00, '2023-11-15');
INSERT INTO `t_salary` VALUES (10058, 10014, 6203.00, '2023-11-15');
INSERT INTO `t_salary` VALUES (10059, 10002, 6592.00, '2023-11-15');
INSERT INTO `t_salary` VALUES (10060, 10045, 5942.00, '2023-11-15');
INSERT INTO `t_salary` VALUES (10061, 10003, 6926.00, '2023-11-15');
INSERT INTO `t_salary` VALUES (10062, 10015, 9381.00, '2023-11-15');
INSERT INTO `t_salary` VALUES (10063, 10049, 5525.00, '2023-11-15');
INSERT INTO `t_salary` VALUES (10064, 10048, 7493.00, '2023-11-15');
INSERT INTO `t_salary` VALUES (10065, 10021, 6205.00, '2023-11-15');
INSERT INTO `t_salary` VALUES (10066, 10042, 9429.00, '2023-11-15');
INSERT INTO `t_salary` VALUES (10067, 10018, 6815.00, '2023-11-15');
INSERT INTO `t_salary` VALUES (10068, 10024, 8044.00, '2023-11-15');
INSERT INTO `t_salary` VALUES (10069, 10020, 6381.00, '2023-11-15');
INSERT INTO `t_salary` VALUES (10070, 10006, 6020.00, '2023-11-15');
INSERT INTO `t_salary` VALUES (10071, 10044, 9105.00, '2023-11-15');
INSERT INTO `t_salary` VALUES (10072, 10036, 7961.00, '2023-11-15');
INSERT INTO `t_salary` VALUES (10073, 10047, 9417.00, '2023-11-15');
INSERT INTO `t_salary` VALUES (10074, 10031, 9481.00, '2023-11-15');
INSERT INTO `t_salary` VALUES (10075, 10032, 8984.00, '2023-11-15');
INSERT INTO `t_salary` VALUES (10076, 10019, 9756.00, '2023-11-15');
INSERT INTO `t_salary` VALUES (10077, 10025, 7597.00, '2023-11-15');
INSERT INTO `t_salary` VALUES (10078, 10010, 7616.00, '2023-11-15');
INSERT INTO `t_salary` VALUES (10079, 10008, 6574.00, '2023-11-15');
INSERT INTO `t_salary` VALUES (10080, 10046, 9142.00, '2023-11-15');
INSERT INTO `t_salary` VALUES (10081, 10041, 5881.00, '2023-11-15');
INSERT INTO `t_salary` VALUES (10082, 10001, 5874.00, '2023-11-15');
INSERT INTO `t_salary` VALUES (10083, 10005, 8222.00, '2023-11-15');
INSERT INTO `t_salary` VALUES (10084, 10009, 6899.00, '2023-11-15');
INSERT INTO `t_salary` VALUES (10085, 10029, 6606.00, '2023-11-15');
INSERT INTO `t_salary` VALUES (10086, 10017, 5412.00, '2023-11-15');
INSERT INTO `t_salary` VALUES (10087, 10023, 9739.00, '2023-11-15');
INSERT INTO `t_salary` VALUES (10088, 10028, 8329.00, '2023-11-15');
INSERT INTO `t_salary` VALUES (10089, 10033, 7426.00, '2023-11-15');
INSERT INTO `t_salary` VALUES (10090, 10012, 7572.00, '2023-11-15');
INSERT INTO `t_salary` VALUES (10091, 10034, 7821.00, '2023-11-15');
INSERT INTO `t_salary` VALUES (10092, 10026, 9401.00, '2023-11-15');
INSERT INTO `t_salary` VALUES (10093, 10022, 8226.00, '2023-11-15');
INSERT INTO `t_salary` VALUES (10094, 10030, 8020.00, '2023-11-15');
INSERT INTO `t_salary` VALUES (10095, 10011, 8723.00, '2023-11-15');
INSERT INTO `t_salary` VALUES (10096, 10039, 8327.00, '2023-11-15');
INSERT INTO `t_salary` VALUES (10097, 10004, 7497.00, '2023-11-15');
INSERT INTO `t_salary` VALUES (10098, 10043, 5230.00, '2023-11-15');
INSERT INTO `t_salary` VALUES (10099, 10007, 9206.00, '2023-11-15');
INSERT INTO `t_salary` VALUES (10100, 10037, 7612.00, '2023-11-15');
第1题/db_social.myd
/*
Navicat MySQL Data Transfer
Source Server : 1
Source Server Type : MySQL
Source Server Version : 50743 (5.7.43-log)
Source Host : localhost:3306
Source Schema : db_social
Target Server Type : MySQL
Target Server Version : 50743 (5.7.43-log)
File Encoding : 65001
Date: 04/12/2023 15:10:14
*/
SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;
-- ----------------------------
-- Table structure for t_friendship
-- ----------------------------
DROP TABLE IF EXISTS `t_friendship`;
CREATE TABLE `t_friendship` (
`fsid` int(10) NOT NULL AUTO_INCREMENT
`uid` int(10) NULL DEFAULT NULL
`fid` int(10) NULL DEFAULT NULL
`createtime` datetime NULL DEFAULT NULL
PRIMARY KEY (`fsid`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 10051 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
-- ----------------------------
-- Records of t_friendship
-- ----------------------------
INSERT INTO `t_friendship` VALUES (10001 10003 10009 '2002-04-04 01:50:50');
INSERT INTO `t_friendship` VALUES (10002 10012 10005 '2001-05-20 04:00:06');
INSERT INTO `t_friendship` VALUES (10003 10009 10004 '2010-12-19 01:07:49');
INSERT INTO `t_friendship` VALUES (10004 10008 10001 '2010-02-10 10:30:30');
INSERT INTO `t_friendship` VALUES (10005 10011 10013 '2014-03-30 01:38:33');
INSERT INTO `t_friendship` VALUES (10006 10001 10020 '2007-10-08 17:28:48');
INSERT INTO `t_friendship` VALUES (10007 10019 10009 '2007-12-06 23:26:42');
INSERT INTO `t_friendship` VALUES (10008 10010 10016 '2005-03-21 12:18:51');
INSERT INTO `t_friendship` VALUES (10009 10007 10017 '2016-06-15 04:52:59');
INSERT INTO `t_friendship` VALUES (10010 10014 10004 '2007-10-26 09:36:32');
INSERT INTO `t_friendship` VALUES (10011 10018 10011 '2019-04-05 20:55:26');
INSERT INTO `t_friendship` VALUES (10012 10020 10003 '2017-03-25 13:46:34');
INSERT INTO `t_friendship` VALUES (10013 10006 10006 '2019-12-08 01:28:33');
INSERT INTO `t_friendship` VALUES (10014 10005 10014 '2000-01-30 13:45:26');
INSERT INTO `t_friendship` VALUES (10015 10017 10012 '2010-07-06 23:56:41');
INSERT INTO `t_friendship` VALUES (10016 10002 10001 '2003-11-18 02:35:48');
INSERT INTO `t_friendship` VALUES (10017 10013 10003 '2004-09-26 06:30:19');
INSERT INTO `t_friendship` VALUES (10018 10016 10013 '2016-05-06 21:42:34');
INSERT INTO `t_friendship` VALUES (10019 10004 10018 '2016-07-22 16:42:12');
INSERT INTO `t_friendship` VALUES (10020 10015 10002 '2008-08-13 11:52:14');
INSERT INTO `t_friendship` VALUES (10021 10019 10010 '2019-10-19 05:15:00');
INSERT INTO `t_friendship` VALUES (10022 10019 10017 '2015-05-17 23:29:15');
INSERT INTO `t_friendship` VALUES (10023 10018 10013 '2002-02-04 14:25:32');
INSERT INTO `t_friendship` VALUES (10024 10002 10014 '2003-05-29 06:46:36');
INSERT INTO `t_friendship` VALUES (10025 10002 10001 '2012-09-05 06:09:52');
INSERT INTO `t_friendship` VALUES (10026 10015 10016 '2019-09-21 07:11:07');
INSERT INTO `t_friendship` VALUES (10027 10010 10006 '2001-08-04 13:09:40');
INSERT INTO `t_friendship` VALUES (10028 10008 10002 '2000-05-03 01:46:48');
INSERT INTO `t_friendship` VALUES (10029 10011 10010 '2023-05-13 10:03:10');
INSERT INTO `t_friendship` VALUES (10030 10015 10010 '2023-09-18 12:05:18');
INSERT INTO `t_friendship` VALUES (10031 10003 10010 '2023-10-14 10:58:49');
INSERT INTO `t_friendship` VALUES (10032 10017 10020 '2014-01-03 07:56:10');
INSERT INTO `t_friendship` VALUES (10033 10013 10008 '2002-06-10 13:18:22');
INSERT INTO `t_friendship` VALUES (10034 10012 10011 '2004-04-26 00:18:56');
INSERT INTO `t_friendship` VALUES (10035 10017 10016 '2015-02-03 02:01:15');
INSERT INTO `t_friendship` VALUES (10036 10009 10006 '2014-04-09 05:30:28');
INSERT INTO `t_friendship` VALUES (10037 10005 10004 '2013-02-10 07:48:18');
INSERT INTO `t_friendship` VALUES (10038 10013 10020 '2022-03-03 18:35:47');
INSERT INTO `t_friendship` VALUES (10039 10020 10010 '2021-01-11 01:13:43');
INSERT INTO `t_friendship` VALUES (10040 10009 10010 '2015-11-24 22:22:40');
INSERT INTO `t_friendship` VALUES (10041 10004 10013 '2000-06-27 13:32:43');
INSERT INTO `t_friendship` VALUES (10042 10011 10002 '2020-02-01 05:44:39');
INSERT INTO `t_friendship` VALUES (10043 10018 10006 '2011-01-01 09:56:26');
INSERT INTO `t_friendship` VALUES (10044 10005 10014 '2015-02-26 02:27:57');
INSERT INTO `t_friendship` VALUES (10045 10008 10004 '2011-06-30 04:45:03');
INSERT INTO `t_friendship` VALUES (10046 10010 10013 '2013-08-22 02:37:54');
INSERT INTO `t_friendship` VALUES (10047 10001 10003 '2006-08-28 16:12:09');
INSERT INTO `t_friendship` VALUES (10048 10016 10011 '2022-03-22 03:48:39');
INSERT INTO `t_friendship` VALUES (10049 10014 10012 '2022-05-09 05:44:28');
INSERT INTO `t_friendship` VALUES (10050 10006 10002 '2020-01-06 03:24:32');
-- ----------------------------
-- Table structure for t_likes
-- ----------------------------
DROP TABLE IF EXISTS `t_likes`;
CREATE TABLE `t_likes` (
`lid` int(10) NOT NULL AUTO_INCREMENT
`pid` int(11) NULL DEFAULT NULL
`fid` int(11) NULL DEFAULT NULL
`createtime` datetime NULL DEFAULT NULL
PRIMARY KEY (`lid`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 10101 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
-- ----------------------------
-- Records of t_likes
-- ----------------------------
INSERT INTO `t_likes` VALUES (10001 10032 10017 '2001-10-04 21:44:01');
INSERT INTO `t_likes` VALUES (10002 10023 10001 '2022-02-18 08:37:36');
INSERT INTO `t_likes` VALUES (10003 10009 10016 '2003-07-23 17:16:43');
INSERT INTO `t_likes` VALUES (10004 10008 10013 '2008-06-02 00:36:15');
INSERT INTO `t_likes` VALUES (10005 10011 10008 '2023-11-20 20:30:02');
INSERT INTO `t_likes` VALUES (10006 10041 10003 '2003-08-09 18:06:15');
INSERT INTO `t_likes` VALUES (10007 10026 10012 '2015-08-14 16:05:12');
INSERT INTO `t_likes` VALUES (10008 10044 10002 '2012-02-17 16:58:03');
INSERT INTO `t_likes` VALUES (10009 10038 10004 '2008-07-25 03:46:02');
INSERT INTO `t_likes` VALUES (10010 10015 10005 '2004-03-03 04:12:39');
INSERT INTO `t_likes` VALUES (10011 10047 10014 '2005-08-03 16:55:45');
INSERT INTO `t_likes` VALUES (10012 10007 10009 '2013-10-27 14:55:15');
INSERT INTO `t_likes` VALUES (10013 10027 10007 '2010-03-09 15:35:03');
INSERT INTO `t_likes` VALUES (10014 10025 10019 '2015-02-11 10:27:53');
INSERT INTO `t_likes` VALUES (10015 10022 10018 '2010-07-18 18:07:15');
INSERT INTO `t_likes` VALUES (10016 10018 10006 '2014-05-15 22:12:11');
INSERT INTO `t_likes` VALUES (10017 10045 10015 '2005-11-04 15:59:38');
INSERT INTO `t_likes` VALUES (10018 10033 10011 '2005-12-22 05:47:18');
INSERT INTO `t_likes` VALUES (10019 10001 10010 '2015-10-08 04:53:15');
INSERT INTO `t_likes` VALUES (10020 10017 10020 '2009-05-13 13:46:05');
INSERT INTO `t_likes` VALUES (10021 10019 10008 '2002-06-26 21:34:07');
INSERT INTO `t_likes` VALUES (10022 10016 10002 '2005-06-29 14:02:06');
INSERT INTO `t_likes` VALUES (10023 10003 10017 '2003-12-22 10:50:10');
INSERT INTO `t_likes` VALUES (10024 10021 10011 '2019-07-14 18:23:10');
INSERT INTO `t_likes` VALUES (10025 10034 10018 '2019-11-28 02:18:34');
INSERT INTO `t_likes` VALUES (10026 10006 10013 '2003-04-08 16:16:39');
INSERT INTO `t_likes` VALUES (10027 10048 10009 '2023-01-06 06:36:19');
INSERT INTO `t_likes` VALUES (10028 10042 10013 '2013-07-13 11:11:06');
INSERT INTO `t_likes` VALUES (10029 10036 10002 '2015-04-30 14:41:42');
INSERT INTO `t_likes` VALUES (10030 10002 10007 '2012-02-29 09:33:42');
INSERT INTO `t_likes` VALUES (10031 10037 10019 '2007-07-31 03:46:45');
INSERT INTO `t_likes` VALUES (10032 10029 10008 '2003-10-27 16:27:50');
INSERT INTO `t_likes` VALUES (10033 10012 10014 '2009-01-26 02:43:55');
INSERT INTO `t_likes` VALUES (10034 10030 10018 '2016-07-12 13:31:24');
INSERT INTO `t_likes` VALUES (10035 10035 10017 '2000-01-25 02:43:04');
INSERT INTO `t_likes` VALUES (10036 10028 10019 '2019-01-04 21:35:33');
INSERT INTO `t_likes` VALUES (10037 10031 10008 '2006-04-21 08:35:30');
INSERT INTO `t_likes` VALUES (10038 10049 10017 '2000-07-26 06:08:06');
INSERT INTO `t_likes` VALUES (10039 10004 10009 '2023-09-05 15:22:10');
INSERT INTO `t_likes` VALUES (10040 10043 10001 '2015-03-26 15:54:46');
INSERT INTO `t_likes` VALUES (10041 10005 10014 '2015-05-21 02:43:43');
INSERT INTO `t_likes` VALUES (10042 10046 10013 '2018-04-28 11:35:59');
INSERT INTO `t_likes` VALUES (10043 10024 10020 '2020-12-30 04:43:22');
INSERT INTO `t_likes` VALUES (10044 10050 10006 '2015-12-27 07:07:00');
INSERT INTO `t_likes` VALUES (10045 10014 10002 '2001-07-12 09:10:50');
INSERT INTO `t_likes` VALUES (10046 10040 10001 '2013-08-12 19:47:56');
INSERT INTO `t_likes` VALUES (10047 10039 10003 '2003-04-08 16:00:47');
INSERT INTO `t_likes` VALUES (10048 10013 10010 '2009-02-21 01:51:41');
INSERT INTO `t_likes` VALUES (10049 10010 10017 '2009-06-22 17:34:07');
INSERT INTO `t_likes` VALUES (10050 10020 10004 '2019-10-24 00:30:07');
INSERT INTO `t_likes` VALUES (10051 10037 10009 '2017-01-26 15:41:20');
INSERT INTO `t_likes` VALUES (10052 10019 10010 '2004-03-05 07:49:17');
INSERT INTO `t_likes` VALUES (10053 10024 10007 '2003-08-12 01:06:49');
INSERT INTO `t_likes` VALUES (10054 10018 10015 '2009-11-15 17:25:31');
INSERT INTO `t_likes` VALUES (10055 10011 10019 '2008-08-31 14:41:22');
INSERT INTO `t_likes` VALUES (10056 10027 10004 '2021-07-30 12:50:58');
INSERT INTO `t_likes` VALUES (10057 10040 10012 '2009-06-18 03:32:59');
INSERT INTO `t_likes` VALUES (10058 10041 10011 '2005-07-15 08:40:49');
INSERT INTO `t_likes` VALUES (10059 10027 10001 '2023-11-03 00:16:59');
INSERT INTO `t_likes` VALUES (10060 10017 10003 '2022-01-09 05:57:27');
INSERT INTO `t_likes` VALUES (10061 10025 10005 '2003-02-11 00:42:46');
INSERT INTO `t_likes` VALUES (10062 10021 10004 '2016-07-31 05:26:24');
INSERT INTO `t_likes` VALUES (10063 10036 10012 '2005-02-21 01:16:20');
INSERT INTO `t_likes` VALUES (10064 10017 10019 '2023-01-30 23:58:39');
INSERT INTO `t_likes` VALUES (10065 10026 10013 '2022-08-03 04:41:12');
INSERT INTO `t_likes` VALUES (10066 10007 10014 '2004-02-06 13:25:20');
INSERT INTO `t_likes` VALUES (10067 10007 10018 '2023-10-29 12:47:27');
INSERT INTO `t_likes` VALUES (10068 10039 10020 '2016-09-27 15:00:18');
INSERT INTO `t_likes` VALUES (10069 10046 10015 '2015-05-06 03:39:44');
INSERT INTO `t_likes` VALUES (10070 10002 10007 '2016-02-05 05:48:52');
INSERT INTO `t_likes` VALUES (10071 10047 10002 '2015-03-18 13:22:58');
INSERT INTO `t_likes` VALUES (10072 10021 10011 '2002-12-21 21:16:38');
INSERT INTO `t_likes` VALUES (10073 10040 10017 '2018-01-28 02:31:12');
INSERT INTO `t_likes` VALUES (10074 10050 10008 '2022-12-27 15:45:29');
INSERT INTO `t_likes` VALUES (10075 10005 10010 '2010-10-12 06:34:09');
INSERT INTO `t_likes` VALUES (10076 10050 10002 '2021-08-21 22:27:44');
INSERT INTO `t_likes` VALUES (10077 10044 10017 '2004-04-07 10:52:28');
INSERT INTO `t_likes` VALUES (10078 10030 10015 '2013-07-11 19:36:53');
INSERT INTO `t_likes` VALUES (10079 10010 10008 '2018-09-07 11:29:25');
INSERT INTO `t_likes` VALUES (10080 10014 10006 '2002-01-31 00:05:49');
INSERT INTO `t_likes` VALUES (10081 10011 10010 '2021-10-19 00:55:37');
INSERT INTO `t_likes` VALUES (10082 10018 10016 '2000-03-10 09:20:16');
INSERT INTO `t_likes` VALUES (10083 10012 10007 '2009-03-22 19:06:25');
INSERT INTO `t_likes` VALUES (10084 10006 10009 '2016-09-18 14:11:18');
INSERT INTO `t_likes` VALUES (10085 10008 10012 '2010-11-20 08:14:55');
INSERT INTO `t_likes` VALUES (10086 10043 10004 '2008-02-27 12:30:05');
INSERT INTO `t_likes` VALUES (10087 10030 10003 '2000-03-29 07:18:02');
INSERT INTO `t_likes` VALUES (10088 10026 10018 '2016-02-23 23:15:54');
INSERT INTO `t_likes` VALUES (10089 10048 10017 '2006-10-05 01:59:59');
INSERT INTO `t_likes` VALUES (10090 10044 10008 '2020-09-09 00:03:47');
INSERT INTO `t_likes` VALUES (10091 10008 10018 '2020-08-29 18:22:05');
INSERT INTO `t_likes` VALUES (10092 10009 10012 '2019-10-31 01:59:48');
INSERT INTO `t_likes` VALUES (10093 10025 10013 '2011-03-16 13:02:56');
INSERT INTO `t_likes` VALUES (10094 10043 10006 '2023-10-22 19:31:52');
INSERT INTO `t_likes` VALUES (10095 10001 10020 '2011-07-23 22:21:20');
INSERT INTO `t_likes` VALUES (10096 10034 10008 '2006-11-08 11:59:44');
INSERT INTO `t_likes` VALUES (10097 10024 10003 '2021-04-06 01:14:15');
INSERT INTO `t_likes` VALUES (10098 10039 10014 '2019-06-16 04:55:10');
INSERT INTO `t_likes` VALUES (10099 10032 10001 '2007-11-02 19:19:16');
INSERT INTO `t_likes` VALUES (10100 10029 10020 '2014-02-04 05:11:29');
-- ----------------------------
-- Table structure for t_post
-- ----------------------------
DROP TABLE IF EXISTS `t_post`;
CREATE TABLE `t_post` (
`pid` int(10) NOT NULL AUTO_INCREMENT
`uid` char(10) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL
`content` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL
`createtime` date NULL DEFAULT NULL
PRIMARY KEY (`pid`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 10051 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
-- ----------------------------
-- Records of t_post
-- ----------------------------
INSERT INTO `t_post` VALUES (10001 '10003' 'To successfully establish a new connection to local/remote server - no matter via SSL or SSH set the database login information in the General tab.' '2020-10-04');
INSERT INTO `t_post` VALUES (10002 '10006' 'You will succeed because most people are lazy. Creativity is intelligence having fun. The Main Window consists of several toolbars and panes for you to work on connections database objects and advanced tools.' '2014-07-10');
INSERT INTO `t_post` VALUES (10003 '10011' 'Flexible settings enable you to set up a custom key for comparison and synchronization. The first step is as good as half over. HTTP Tunneling is a method for connecting to a server that uses the same protocol (http://) and the same port ' '2007-06-05');
INSERT INTO `t_post` VALUES (10004 '10002' 'In a Telnet session all communications including username and password are transmitted in plain-text allowing anyone to listen-in on your session and steal passwords and other information. SSH serves to prevent such vulnerabilities ' '2000-03-20');
INSERT INTO `t_post` VALUES (10005 '10019' 'All the Navicat Cloud objects are located under different projects. You can share the project to other Navicat Cloud accounts for collaboration. Navicat Monitor is a safe simple and agentless remote server monitoring tool that is packed ' '2021-05-19');
INSERT INTO `t_post` VALUES (10006 '10009' 'It can also manage cloud databases such as Amazon Redshift Amazon RDS Alibaba Cloud. Features in Navicat are sophisticated enough to provide professional developers for all their specific needs yet easy to learn for users who are new ' '2013-07-27');
INSERT INTO `t_post` VALUES (10007 '10012' 'You must be the change you wish to see in the world. Navicat Cloud could not connect and access your databases. By which it means it could only store your connection settings queries model files and virtual group; your database passwords ' '2016-05-17');
INSERT INTO `t_post` VALUES (10008 '10010' 'It is used while your ISPs do not allow direct connections but allows establishing HTTP connections. Navicat Monitor requires a repository to store alerts and metrics for historical analysis. Instead of wondering when your next vacation ' '2013-06-26');
INSERT INTO `t_post` VALUES (10009 '10017' 'It can also manage cloud databases such as Amazon Redshift Amazon RDS Alibaba Cloud. Features in Navicat are sophisticated enough to provide professional developers for all their specific needs yet easy to learn for users who are new ' '2014-03-09');
INSERT INTO `t_post` VALUES (10010 '10018' 'You can select any connections objects or projects and then select the corresponding buttons on the Information Pane. Navicat Cloud provides a cloud service for synchronizing connections queries model files and virtual group information ' '2017-08-24');
INSERT INTO `t_post` VALUES (10011 '10008' 'Navicat allows you to transfer data from one database and/or schema to another with detailed analytical process. If you wait all that happens is you get older.' '2013-01-01');
INSERT INTO `t_post` VALUES (10012 '10007' 'You cannot save people you can just love them. Typically it is employed as an encrypted version of Telnet. The Navigation pane employs tree structure which allows you to take action upon the database and their objects through their pop-up ' '2015-12-09');
INSERT INTO `t_post` VALUES (10013 '10001' 'To successfully establish a new connection to local/remote server - no matter via SSL or SSH set the database login information in the General tab. If your Internet Service Provider (ISP) does not provide direct access to its server Secure ' '2007-04-07');
INSERT INTO `t_post` VALUES (10014 '10020' 'Always keep your eyes open. Keep watching. Because whatever you see can inspire you. Champions keep playing until they get it right. Navicat 15 has added support for the system-wide dark mode.' '2012-01-31');
INSERT INTO `t_post` VALUES (10015 '10014' 'A man’s best friends are his ten fingers. All the Navicat Cloud objects are located under different projects. You can share the project to other Navicat Cloud accounts for collaboration. What you get by achieving your goals is not as ' '2015-01-04');
INSERT INTO `t_post` VALUES (10016 '10015' 'Navicat is a multi-connections Database Administration tool allowing you to connect to MySQL Oracle PostgreSQL SQLite SQL Server MariaDB and/or MongoDB databases making database administration to multiple kinds of database so easy.' '2013-08-24');
INSERT INTO `t_post` VALUES (10017 '10016' 'Actually it is just in an idea when feel oneself can achieve and cannot achieve. A man is not old until regrets take the place of dreams.' '2008-07-11');
INSERT INTO `t_post` VALUES (10018 '10013' 'The Information Pane shows the detailed object information project activities the DDL of database objects object dependencies membership of users/roles and preview.' '2006-12-28');
INSERT INTO `t_post` VALUES (10019 '10004' 'Navicat Cloud could not connect and access your databases. By which it means it could only store your connection settings queries model files and virtual group; your database passwords and data (e.g. tables views etc) will not be ' '2013-07-30');
INSERT INTO `t_post` VALUES (10020 '10005' 'HTTP Tunneling is a method for connecting to a server that uses the same protocol (http://) and the same port (port 80) as a web server does. A man is not old until regrets take the place of dreams.' '2023-09-01');
INSERT INTO `t_post` VALUES (10021 '10007' 'Always keep your eyes open. Keep watching. Because whatever you see can inspire you. There is no way to happiness. Happiness is the way. The reason why a great man is great is that he resolves to be a great man.' '2018-01-18');
INSERT INTO `t_post` VALUES (10022 '10006' 'All the Navicat Cloud objects are located under different projects. You can share the project to other Navicat Cloud accounts for collaboration.' '2001-11-07');
INSERT INTO `t_post` VALUES (10023 '10019' 'Genius is an infinite capacity for taking pains. Navicat Monitor is a safe simple and agentless remote server monitoring tool that is packed with powerful features to make your monitoring effective as possible.' '2022-04-06');
INSERT INTO `t_post` VALUES (10024 '10012' 'If your Internet Service Provider (ISP) does not provide direct access to its server Secure Tunneling Protocol (SSH) / HTTP is another solution. What you get by achieving your goals is not as important as what you become by achieving your goals.' '2002-07-07');
INSERT INTO `t_post` VALUES (10025 '10014' 'If you wait all that happens is you get older. With its well-designed Graphical User Interface(GUI) Navicat lets you quickly and easily create organize access and share information in a secure and easy way.' '2004-06-25');
INSERT INTO `t_post` VALUES (10026 '10004' 'To clear or reload various internal caches flush tables or acquire locks control-click your connection in the Navigation pane and select Flush and choose the flush option. You must have the reload privilege to use this feature.' '2004-05-09');
INSERT INTO `t_post` VALUES (10027 '10005' 'I may not have gone where I intended to go but I think I have ended up where I needed to be. A comfort zone is a beautiful place but nothing ever grows there.' '2003-08-15');
INSERT INTO `t_post` VALUES (10028 '10006' 'Champions keep playing until they get it right. Remember that failure is an event not a person. Navicat Data Modeler is a powerful and cost-effective database design tool which helps you build high-quality conceptual logical and physical data models.' '2016-10-28');
INSERT INTO `t_post` VALUES (10029 '10010' 'What you get by achieving your goals is not as important as what you become by achieving your goals. After logged in the Navicat Cloud feature the Navigation pane will be divided into Navicat Cloud and My Connections sections.' '2021-10-29');
INSERT INTO `t_post` VALUES (10030 '10014' 'To successfully establish a new connection to local/remote server - no matter via SSL or SSH set the database login information in the General tab. If the Show objects under schema in navigation pane option is checked at the Preferences ' '2007-03-17');
INSERT INTO `t_post` VALUES (10031 '10001' 'If it scares you it might be a good thing to try. I destroy my enemies when I make them my friends. HTTP Tunneling is a method for connecting to a server that uses the same protocol (http://) and the same port (port 80) as a web server does.' '2005-12-06');
INSERT INTO `t_post` VALUES (10032 '10019' 'You can select any connections objects or projects and then select the corresponding buttons on the Information Pane. Navicat Monitor requires a repository to store alerts and metrics for historical analysis.' '2014-12-11');
INSERT INTO `t_post` VALUES (10033 '10018' 'Creativity is intelligence having fun. I destroy my enemies when I make them my friends. Navicat is a multi-connections Database Administration tool allowing you to connect to MySQL Oracle PostgreSQL SQLite SQL Server MariaDB and/or ' '2017-03-22');
INSERT INTO `t_post` VALUES (10034 '10012' 'To connect to a database or schema simply double-click it in the pane. Flexible settings enable you to set up a custom key for comparison and synchronization. Import Wizard allows you to import data to tables/collections from CSV TXT XML DBF and more.' '2022-11-13');
INSERT INTO `t_post` VALUES (10035 '10017' 'If the Show objects under schema in navigation pane option is checked at the Preferences window all database objects are also displayed in the pane. Secure Sockets Layer(SSL) is a protocol for transmitting private documents via the Internet. ' '2012-02-23');
INSERT INTO `t_post` VALUES (10036 '10008' 'Optimism is the one quality more associated with success and happiness than any other. A query is used to extract data from the database in a readable format according to the user\'s request.' '2005-12-16');
INSERT INTO `t_post` VALUES (10037 '10002' 'The past has no power over the present moment. Navicat Monitor can be installed on any local computer or virtual machine and does not require any software installation on the servers being monitored.' '2016-04-13');
INSERT INTO `t_post` VALUES (10038 '10010' 'All the Navicat Cloud objects are located under different projects. You can share the project to other Navicat Cloud accounts for collaboration. It collects process metrics such as CPU load RAM usage and a variety of other resources over SSH/SNMP.' '2010-10-20');
INSERT INTO `t_post` VALUES (10039 '10003' 'It provides strong authentication and secure encrypted communications between two hosts known as SSH Port Forwarding (Tunneling) over an insecure network.' '2019-07-20');
INSERT INTO `t_post` VALUES (10040 '10020' 'Optimism is the one quality more associated with success and happiness than any other. In a Telnet session all communications including username and password are transmitted in plain-text allowing anyone to listen-in on your session ' '2003-11-25');
INSERT INTO `t_post` VALUES (10041 '10007' 'Creativity is intelligence having fun. A comfort zone is a beautiful place but nothing ever grows there. After comparing data the window shows the number of records that will be inserted updated or deleted in the target.' '2003-03-21');
INSERT INTO `t_post` VALUES (10042 '10001' 'SSH serves to prevent such vulnerabilities and allows you to access a remote server\'s shell without compromising security. Genius is an infinite capacity for taking pains. Anyone who has ever made anything of importance was disciplined.' '2000-03-30');
INSERT INTO `t_post` VALUES (10043 '10002' 'Import Wizard allows you to import data to tables/collections from CSV TXT XML DBF and more. Secure Sockets Layer(SSL) is a protocol for transmitting private documents via the Internet.' '2013-12-21');
INSERT INTO `t_post` VALUES (10044 '10016' 'In a Telnet session all communications including username and password are transmitted in plain-text allowing anyone to listen-in on your session and steal passwords and other information.' '2016-03-25');
INSERT INTO `t_post` VALUES (10045 '10009' 'It can also manage cloud databases such as Amazon Redshift Amazon RDS Alibaba Cloud. Features in Navicat are sophisticated enough to provide professional developers for all their specific needs yet easy to learn for users who are new ' '2004-03-05');
INSERT INTO `t_post` VALUES (10046 '10017' 'It provides strong authentication and secure encrypted communications between two hosts known as SSH Port Forwarding (Tunneling) over an insecure network. How we spend our days is of course how we spend our lives. I may not have gone ' '2015-07-06');
INSERT INTO `t_post` VALUES (10047 '10013' 'Navicat Monitor requires a repository to store alerts and metrics for historical analysis. The Information Pane shows the detailed object information project activities the DDL of database objects object dependencies membership of users/roles ' '2016-09-13');
INSERT INTO `t_post` VALUES (10048 '10016' 'Navicat Monitor is a safe simple and agentless remote server monitoring tool that is packed with powerful features to make your monitoring effective as possible.' '2005-01-10');
INSERT INTO `t_post` VALUES (10049 '10020' 'You cannot save people you can just love them. The On Startup feature allows you to control what tabs appear when you launch Navicat. Import Wizard allows you to import data to tables/collections from CSV TXT XML DBF and more.' '2010-05-16');
INSERT INTO `t_post` VALUES (10050 '10015' 'Navicat Cloud could not connect and access your databases. By which it means it could only store your connection settings queries model files and virtual group; your database passwords and data (e.g. tables views etc) will not be ' '2004-04-21');
-- ----------------------------
-- Table structure for t_user
-- ----------------------------
DROP TABLE IF EXISTS `t_user`;
CREATE TABLE `t_user` (
`uid` int(10) NOT NULL AUTO_INCREMENT
`username` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL
`password` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL
`nickname` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL
`age` int(3) NULL DEFAULT NULL
`sex` char(2) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL
PRIMARY KEY (`uid`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 10021 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
-- ----------------------------
-- Records of t_user
-- ----------------------------
INSERT INTO `t_user` VALUES (10001 'RcZMBygzEP' 'KAc0k5N7ik' 'Kimberly' 31 '女');
INSERT INTO `t_user` VALUES (10002 'xZbFVNFPfC' 'YGQPYvApoW' 'Betty' 19 '女');
INSERT INTO `t_user` VALUES (10003 'rWQkglfDHp' 'a090zWktf2' 'Barry' 43 'ç”·');
INSERT INTO `t_user` VALUES (10004 'AsWnNuQrBn' 'AzS6Fiv4TD' 'Randy' 49 'ç”·');
INSERT INTO `t_user` VALUES (10005 'ydPZCqwaWz' 'SwOjHxNc29' 'Amy' 30 '女');
INSERT INTO `t_user` VALUES (10006 'egikGPKoHB' '0IyNHa4ACw' 'Ruth' 33 '女');
INSERT INTO `t_user` VALUES (10007 'AWxdiAksDt' 'j6vFisZKc1' 'April' 38 '女');
INSERT INTO `t_user` VALUES (10008 'aUTVurILei' 'bPxFeeKhy8' 'Cynthia' 38 '女');
INSERT INTO `t_user` VALUES (10009 'RcOgLMMata' 'AxhUsVUU78' 'Tammy' 20 '女');
INSERT INTO `t_user` VALUES (10010 'iRnxECjbol' 'QCfHAiimrG' 'Alice' 15 '女');
INSERT INTO `t_user` VALUES (10011 'FhqYITqTdA' 'dVNCEepBKC' 'Thelma' 46 '女');
INSERT INTO `t_user` VALUES (10012 'hBFObiRjOn' 'qoKKRgbYzO' 'Bradley' 27 'ç”·');
INSERT INTO `t_user` VALUES (10013 'nOLwlDpyIN' 'tGuW0T5FcG' 'Jean' 28 '女');
INSERT INTO `t_user` VALUES (10014 'VYhKLehGcy' 'phKBleXEQ9' 'Jose' 44 'ç”·');
INSERT INTO `t_user` VALUES (10015 'ybKBizSikJ' 'l7sRDLObVU' 'Daniel' 48 'ç”·');
INSERT INTO `t_user` VALUES (10016 'uvOZOdSvbV' 'eYmVqLJm3z' 'Rosa' 22 '女');
INSERT INTO `t_user` VALUES (10017 'OHZBeflocp' '8O8DZeCB9R' 'Tony' 44 'ç”·');
INSERT INTO `t_user` VALUES (10018 'gHfroIcoQc' '63USEuGBeB' 'Thomas' 16 'ç”·');
INSERT INTO `t_user` VALUES (10019 'HRQGdchgoS' 'apvalUkIbQ' 'Kelly' 17 '女');
INSERT INTO `t_user` VALUES (10020 'tBFVIvbDgj' 'IwcjzMg9xB' 'Steven' 33 'ç”·');
SET FOREIGN_KEY_CHECKS = 1;
第2题/db_education.myd
/*
Navicat MySQL Data Transfer
Source Server : 1
Source Server Type : MySQL
Source Server Version : 50743 (5.7.43-log)
Source Host : localhost:3306
Source Schema : db_education
Target Server Type : MySQL
Target Server Version : 50743 (5.7.43-log)
File Encoding : 65001
Date: 05/12/2023 09:42:13
*/
SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;
-- ----------------------------
-- Table structure for t_course
-- ----------------------------
DROP TABLE IF EXISTS `t_course`;
CREATE TABLE `t_course` (
`cid` int(10) NULL DEFAULT NULL,
`cname` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
`description` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
`classhour` int(10) NULL DEFAULT NULL
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
-- ----------------------------
-- Records of t_course
-- ----------------------------
INSERT INTO `t_course` VALUES (10001, '语文', '高中语文课程', 24);
INSERT INTO `t_course` VALUES (10002, '数学', '高中数学课程', 24);
INSERT INTO `t_course` VALUES (10003, '英语', '高中英语课程', 24);
-- ----------------------------
-- Table structure for t_learn
-- ----------------------------
DROP TABLE IF EXISTS `t_learn`;
CREATE TABLE `t_learn` (
`lid` char(10) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
`sid` char(10) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
`cid` char(10) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
`schedule` int(10) NULL DEFAULT 0,
`createtime` date NULL DEFAULT NULL,
PRIMARY KEY (`lid`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
-- ----------------------------
-- Records of t_learn
-- ----------------------------
INSERT INTO `t_learn` VALUES ('10001', '10026', '10003', 8, '2001-08-21');
INSERT INTO `t_learn` VALUES ('10002', '10044', '10001', 7, '2001-01-30');
INSERT INTO `t_learn` VALUES ('10003', '10024', '10003', 15, '2011-11-02');
INSERT INTO `t_learn` VALUES ('10004', '10029', '10003', 15, '2019-08-20');
INSERT INTO `t_learn` VALUES ('10005', '10042', '10003', 19, '2005-09-13');
INSERT INTO `t_learn` VALUES ('10006', '10033', '10004', 7, '2006-09-05');
INSERT INTO `t_learn` VALUES ('10007', '10043', '10004', 16, '2015-01-16');
INSERT INTO `t_learn` VALUES ('10008', '10037', '10002', 18, '2008-06-16');
INSERT INTO `t_learn` VALUES ('10009', '10010', '10003', 4, '2011-02-08');
INSERT INTO `t_learn` VALUES ('10010', '10034', '10004', 22, '2001-03-18');
INSERT INTO `t_learn` VALUES ('10011', '10021', '10003', 3, '2005-04-02');
INSERT INTO `t_learn` VALUES ('10012', '10036', '10001', 18, '2019-02-23');
INSERT INTO `t_learn` VALUES ('10013', '10002', '10003', 10, '2002-06-14');
INSERT INTO `t_learn` VALUES ('10014', '10030', '10003', 7, '2023-11-04');
INSERT INTO `t_learn` VALUES ('10015', '10011', '10002', 1, '2002-12-28');
INSERT INTO `t_learn` VALUES ('10016', '10035', '10004', 13, '2003-05-17');
INSERT INTO `t_learn` VALUES ('10017', '10014', '10003', 9, '2017-09-01');
INSERT INTO `t_learn` VALUES ('10018', '10015', '10001', 11, '2001-05-26');
INSERT INTO `t_learn` VALUES ('10019', '10012', '10003', 8, '2009-04-21');
INSERT INTO `t_learn` VALUES ('10020', '10017', '10003', 4, '2018-08-24');
INSERT INTO `t_learn` VALUES ('10021', '10003', '10003', 5, '2019-07-31');
INSERT INTO `t_learn` VALUES ('10022', '10038', '10003', 23, '2011-12-29');
INSERT INTO `t_learn` VALUES ('10023', '10032', '10003', 14, '2003-08-19');
INSERT INTO `t_learn` VALUES ('10024', '10039', '10003', 12, '2004-02-06');
INSERT INTO `t_learn` VALUES ('10025', '10041', '10001', 21, '2002-07-12');
INSERT INTO `t_learn` VALUES ('10026', '10006', '10001', 13, '2013-10-15');
INSERT INTO `t_learn` VALUES ('10027', '10020', '10001', 16, '2020-06-08');
INSERT INTO `t_learn` VALUES ('10028', '10008', '10001', 13, '2023-11-18');
INSERT INTO `t_learn` VALUES ('10029', '10007', '10003', 10, '2000-12-21');
INSERT INTO `t_learn` VALUES ('10030', '10049', '10004', 3, '2021-12-24');
INSERT INTO `t_learn` VALUES ('10031', '10047', '10004', 7, '2005-04-17');
INSERT INTO `t_learn` VALUES ('10032', '10023', '10002', 16, '2002-09-10');
INSERT INTO `t_learn` VALUES ('10033', '10019', '10002', 7, '2021-03-27');
INSERT INTO `t_learn` VALUES ('10034', '10001', '10003', 5, '2010-10-03');
INSERT INTO `t_learn` VALUES ('10035', '10028', '10004', 11, '2008-05-06');
INSERT INTO `t_learn` VALUES ('10036', '10016', '10002', 24, '2009-05-27');
INSERT INTO `t_learn` VALUES ('10037', '10009', '10002', 2, '2021-05-03');
INSERT INTO `t_learn` VALUES ('10038', '10027', '10004', 11, '2022-10-06');
INSERT INTO `t_learn` VALUES ('10039', '10040', '10003', 8, '2023-03-01');
INSERT INTO `t_learn` VALUES ('10040', '10031', '10003', 5, '2017-04-23');
INSERT INTO `t_learn` VALUES ('10041', '10050', '10004', 0, '2017-04-16');
INSERT INTO `t_learn` VALUES ('10042', '10025', '10002', 14, '2020-11-18');
INSERT INTO `t_learn` VALUES ('10043', '10048', '10003', 3, '2000-02-01');
INSERT INTO `t_learn` VALUES ('10044', '10005', '10001', 2, '2000-07-30');
INSERT INTO `t_learn` VALUES ('10045', '10046', '10001', 6, '2009-01-21');
INSERT INTO `t_learn` VALUES ('10046', '10004', '10001', 14, '2011-05-07');
INSERT INTO `t_learn` VALUES ('10047', '10022', '10003', 14, '2007-09-05');
INSERT INTO `t_learn` VALUES ('10048', '10013', '10003', 20, '2002-04-02');
INSERT INTO `t_learn` VALUES ('10049', '10018', '10004', 10, '2010-05-19');
INSERT INTO `t_learn` VALUES ('10050', '10045', '10003', 10, '2015-10-31');
-- ----------------------------
-- Table structure for t_student
-- ----------------------------
DROP TABLE IF EXISTS `t_student`;
CREATE TABLE `t_student` (
`sid` int(10) NOT NULL AUTO_INCREMENT,
`sname` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
`username` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
`password` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
`classes` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
PRIMARY KEY (`sid`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 10051 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
-- ----------------------------
-- Records of t_student
-- ----------------------------
INSERT INTO `t_student` VALUES (10001, '贾子韬', 'rqkpnrpw', 'qGhyfhyGio', '高一1班');
INSERT INTO `t_student` VALUES (10002, '曾詩涵', 'wllbpxpf', 'Ft8qo5iwJ0', '高三2班');
INSERT INTO `t_student` VALUES (10003, '高睿', 'gzairzdb', 'C1L1N4OBX4', '高二2班');
INSERT INTO `t_student` VALUES (10004, '孔璐', 'plgtkjxy', '4ARIJvsdI7', '高三1班');
INSERT INTO `t_student` VALUES (10005, '邱璐', 'dkhtjxob', 'aa9NUeo9sF', '高一1班');
INSERT INTO `t_student` VALUES (10006, '林晓明', 'lbtkgcep', 'q7GaI78tY3', '高三1班');
INSERT INTO `t_student` VALUES (10007, '廖子异', 'heumgwpi', '9iCA9pCACl', '高二2班');
INSERT INTO `t_student` VALUES (10008, '吴宇宁', 'immknini', 'hnlwlWXfMw', '高二2班');
INSERT INTO `t_student` VALUES (10009, '陶致远', 'vaaibzte', 'zSyRZSbTll', '高三2班');
INSERT INTO `t_student` VALUES (10010, '田致远', 'hvmqiebm', 'Fvm4G9VhkZ', '高二2班');
INSERT INTO `t_student` VALUES (10011, '任震南', 'bkqoxgrp', 'ZM5Cw5utTm', '高一2班');
INSERT INTO `t_student` VALUES (10012, '雷岚', 'mhrviqys', '9aVltYbPHE', '高一2班');
INSERT INTO `t_student` VALUES (10013, '傅子韬', 'yxvpgzui', '0sPq0v3IeJ', '高一2班');
INSERT INTO `t_student` VALUES (10014, '韦杰宏', 'bqifzjrt', '9Oo6J5odqP', '高二1班');
INSERT INTO `t_student` VALUES (10015, '马子异', 'zzhjqmrz', 'a1gMAwnLs2', '高三2班');
INSERT INTO `t_student` VALUES (10016, '莫秀英', 'bxktahbz', 'IWCVNvMGL6', '高一2班');
INSERT INTO `t_student` VALUES (10017, '常宇宁', 'xdbqtnqs', 'w8Dn5mTtGp', '高一2班');
INSERT INTO `t_student` VALUES (10018, '朱子异', 'qjstcwjc', 'Zr2mtrMpVE', '高三1班');
INSERT INTO `t_student` VALUES (10019, '方震南', 'syfrtkyu', '2AoUfr5ZnK', '高一1班');
INSERT INTO `t_student` VALUES (10020, '沈宇宁', 'ictjevir', '5F24FmvV1q', '高二2班');
INSERT INTO `t_student` VALUES (10021, '吕安琪', 'caquymom', 'EAQjHmn8z7', '高一2班');
INSERT INTO `t_student` VALUES (10022, '宋璐', 'dpbgvoqx', 'TT3IPCOX5B', '高一1班');
INSERT INTO `t_student` VALUES (10023, '潘秀英', 'bqxhwqdf', 'DNGok5w6CC', '高三1班');
INSERT INTO `t_student` VALUES (10024, '莫詩涵', 'ktmtgcrs', 'OKkp6v553e', '高三1班');
INSERT INTO `t_student` VALUES (10025, '熊璐', 'txfpxsis', 'T54gy0Hb3S', '高三2班');
INSERT INTO `t_student` VALUES (10026, '潘震南', 'ihrjenzb', 'w2R8wdbUug', '高三2班');
INSERT INTO `t_student` VALUES (10027, '陈詩涵', 'qehknger', 'fPp0m6qm4A', '高一2班');
INSERT INTO `t_student` VALUES (10028, '严杰宏', 'swhwmmbn', 'UJpPxYXcfG', '高一1班');
INSERT INTO `t_student` VALUES (10029, '韩璐', 'rgwoyxfj', 'fpRrn8hP7k', '高一1班');
INSERT INTO `t_student` VALUES (10030, '汪詩涵', 'qeiwzawn', 'mdDK734hYf', '高二1班');
INSERT INTO `t_student` VALUES (10031, '尹子异', 'iojbrdtg', '0o3Ymue1Ts', '高一1班');
INSERT INTO `t_student` VALUES (10032, '贾秀英', 'pjrbxcgi', 'wvQ7ul5Ygl', '高二2班');
INSERT INTO `t_student` VALUES (10033, '吕震南', 'oedjepmq', 'EpkZMcblN4', '高三2班');
INSERT INTO `t_student` VALUES (10034, '金杰宏', 'zedxgqur', 'upz5cfstS8', '高二2班');
INSERT INTO `t_student` VALUES (10035, '汪震南', 'azlhdsgv', 'UEjf4k3J4Y', '高一1班');
INSERT INTO `t_student` VALUES (10036, '邹秀英', 'ezcuzosf', 'AVDfHqPSBA', '高一1班');
INSERT INTO `t_student` VALUES (10037, '韦子韬', 'thghwrxm', 'hOPYmq90aI', '高三2班');
INSERT INTO `t_student` VALUES (10038, '邓岚', 'xibjqcqr', 'KHVLMHEdB2', '高二1班');
INSERT INTO `t_student` VALUES (10039, '侯晓明', 'wqsboqtx', '1JlWkJhuin', '高二1班');
INSERT INTO `t_student` VALUES (10040, '方睿', 'rigthudo', 'iOolu1XLWk', '高三2班');
INSERT INTO `t_student` VALUES (10041, '丁宇宁', 'xajjnxdn', '2OPHE1Xwdt', '高二1班');
INSERT INTO `t_student` VALUES (10042, '胡嘉伦', 'njybwilz', 'T4FyjyQ06G', '高二2班');
INSERT INTO `t_student` VALUES (10043, '孟岚', 'nvkvehrp', 'JkSNXREhIK', '高三2班');
INSERT INTO `t_student` VALUES (10044, '孟云熙', 'kkkpqfgs', 'PmdSsBaIVE', '高三2班');
INSERT INTO `t_student` VALUES (10045, '曹宇宁', 'falyiyal', 'LZruWY2x3D', '高二1班');
INSERT INTO `t_student` VALUES (10046, '陶睿', 'qyatgwvv', 'reKaYJZup4', '高三2班');
INSERT INTO `t_student` VALUES (10047, '程嘉伦', 'ytehfenv', 'xK2tx3HDDg', '高二1班');
INSERT INTO `t_student` VALUES (10048, '贺子韬', 'fwloybvz', '8qdM7vBgi6', '高三2班');
INSERT INTO `t_student` VALUES (10049, '石安琪', 'dcjajfyv', 'TT2kI3uUNK', '高三2班');
INSERT INTO `t_student` VALUES (10050, '贺岚', 'vqxzrdft', 'XE4wrXCITj', '高三2班');
-- ----------------------------
-- Table structure for t_video
-- ----------------------------
DROP TABLE IF EXISTS `t_video`;
CREATE TABLE `t_video` (
`vid` int(10) NOT NULL AUTO_INCREMENT,
`cid` char(10) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
`title` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
`link` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
PRIMARY KEY (`vid`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 10073 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
-- ----------------------------
-- Records of t_video
-- ----------------------------
INSERT INTO `t_video` VALUES (10001, '10002', 'To successfully establish a new ', 'https://video.misgo.us/CenturionGardenOutdoor');
INSERT INTO `t_video` VALUES (10002, '10003', 'It is used while your ISPs do not ', 'http://video.fancm.us/ToysGames');
INSERT INTO `t_video` VALUES (10003, '10003', 'In other words, Navicat provides ', 'http://video.harada75.cn/Beauty');
INSERT INTO `t_video` VALUES (10004, '10002', 'It collects process metrics such ', 'http://video.kuliksun.co.jp/ArtsHandicraftsSewing');
INSERT INTO `t_video` VALUES (10005, '10003', 'Creativity is intelligence having fun.', 'https://video.waisanyam87.com/VideoGames');
INSERT INTO `t_video` VALUES (10006, '10002', 'Such sessions are also susceptible ', 'http://video.chin44.cn/ArtsHandicraftsSewing');
INSERT INTO `t_video` VALUES (10007, '10001', 'What you get by achieving your ', 'http://video.tanganqi.us/ToolsHomeDecoration');
INSERT INTO `t_video` VALUES (10008, '10002', 'I will greet this day with love in my heart.', 'https://video.yinyunx.net/ArtsHandicraftsSewing');
INSERT INTO `t_video` VALUES (10009, '10002', 'HTTP Tunneling is a method for ', 'http://video.fatl803.com/CenturionGardenOutdoor');
INSERT INTO `t_video` VALUES (10010, '10001', 'The first step is as good as half over. ', 'https://video.wuzhenn.jp/Handcrafts');
INSERT INTO `t_video` VALUES (10011, '10003', 'To connect to a database or schema, ', 'http://video.lu15.xyz/HouseholdKitchenAppliances');
INSERT INTO `t_video` VALUES (10012, '10001', 'The past has no power over the present moment.', 'http://video.burnsheather.info/CenturionGardenOutdoor');
INSERT INTO `t_video` VALUES (10013, '10001', 'It is used while your ISPs do not ', 'http://video.nts.com/HouseholdKitchenAppliances');
INSERT INTO `t_video` VALUES (10014, '10001', 'The reason why a great man is great ', 'http://video.cheng1.xyz/Appliances');
INSERT INTO `t_video` VALUES (10015, '10003', 'The Main Window consists of several ', 'https://video.monicacraw5.info/HealthBabyCare');
INSERT INTO `t_video` VALUES (10016, '10001', 'The first step is as good as half over.', 'https://video.kinoshitahikaru1988.jp/Appliances');
INSERT INTO `t_video` VALUES (10017, '10002', 'In the Objects tab, you can use ', 'http://video.anoguchi.com/Others');
INSERT INTO `t_video` VALUES (10018, '10001', 'To start working with your server ', 'https://video.hicksjulie.xyz/SportsOutdoor');
INSERT INTO `t_video` VALUES (10019, '10003', 'The past has no power over the present moment.', 'https://video.sklo.org/FilmSupplies');
INSERT INTO `t_video` VALUES (10020, '10003', 'The On Startup feature allows you ', 'http://video.jijiang47.net/HealthBabyCare');
INSERT INTO `t_video` VALUES (10021, '10001', 'Navicat provides a wide range advanced ', 'http://video.linzita.co.jp/ToolsHomeDecoration');
INSERT INTO `t_video` VALUES (10022, '10002', 'The Information Pane shows the ', 'https://video.barnfr4.jp/BaggageTravelEquipment');
INSERT INTO `t_video` VALUES (10023, '10002', 'If it scares you, it might be a good thing to try.', 'https://video.shi704.xyz/AppsGames');
INSERT INTO `t_video` VALUES (10024, '10001', 'Navicat Data Modeler is a powerful ', 'https://video.xu2015.xyz/VideoGames');
INSERT INTO `t_video` VALUES (10025, '10002', 'There is no way to happiness. Happiness ', 'http://video.suy.net/ArtsHandicraftsSewing');
INSERT INTO `t_video` VALUES (10026, '10002', 'I will greet this day with love in my heart.', 'http://video.tang420.org/Baby');
INSERT INTO `t_video` VALUES (10027, '10003', 'In the middle of winter I at last ', 'https://video.xiy6.xyz/BaggageTravelEquipment');
INSERT INTO `t_video` VALUES (10028, '10003', 'The Main Window consists of several ', 'https://video.jr59.jp/ComputersElectronics');
INSERT INTO `t_video` VALUES (10029, '10001', 'A query is used to extract data ', 'http://video.sakuroka1109.net/CollectiblesFineArt');
INSERT INTO `t_video` VALUES (10030, '10003', 'All journeys have secret destinations ', 'http://video.mmiyamoto.xyz/Appliances');
INSERT INTO `t_video` VALUES (10031, '10003', 'Navicat Monitor can be installed ', 'https://video.gard.com/CDsVinyl');
INSERT INTO `t_video` VALUES (10032, '10002', 'What you get by achieving your ', 'http://video.jefferywhi9.jp/AppsGames');
INSERT INTO `t_video` VALUES (10033, '10001', 'Navicat provides a wide range advanced ', 'http://video.ziyx2010.net/ArtsHandicraftsSewing');
INSERT INTO `t_video` VALUES (10034, '10001', 'Optimism is the one quality more ', 'http://video.lxiu1.co.jp/Handcrafts');
INSERT INTO `t_video` VALUES (10035, '10003', 'The On Startup feature allows you ', 'https://video.carmenhug.info/Baby');
INSERT INTO `t_video` VALUES (10036, '10002', 'The past has no power over the present moment.', 'http://video.cyuning.co.jp/ToolsHomeDecoration');
INSERT INTO `t_video` VALUES (10037, '10002', 'A man is not old until regrets ', 'http://video.yunxi84.co.jp/BeautyPersonalCare');
INSERT INTO `t_video` VALUES (10038, '10003', 'Secure Sockets Layer(SSL) is a ', 'http://video.jiechan.cn/CenturionGardenOutdoor');
INSERT INTO `t_video` VALUES (10039, '10002', 'The Main Window consists of several ', 'https://video.randyspe.us/ToolsHomeDecoration');
INSERT INTO `t_video` VALUES (10040, '10003', 'Navicat Monitor requires a repository ', 'https://video.kwokkn10.info/ArtsHandicraftsSewing');
INSERT INTO `t_video` VALUES (10041, '10001', 'If the Show objects under schema ', 'https://video.okfan.co.jp/CollectiblesFineArt');
INSERT INTO `t_video` VALUES (10042, '10003', 'To successfully establish a new ', 'https://video.liziyi.jp/IndustrialScientificSupplies');
INSERT INTO `t_video` VALUES (10043, '10003', 'SQL Editor allows you to create ', 'http://video.kcharles.com/BaggageTravelEquipment');
INSERT INTO `t_video` VALUES (10044, '10002', 'A man is not old until regrets ', 'http://video.sseiko.com/VideoGames');
INSERT INTO `t_video` VALUES (10045, '10001', 'If opportunity doesn’t knock, build a door.', 'http://video.ngkm.cn/ToolsHomeDecoration');
INSERT INTO `t_video` VALUES (10046, '10002', 'To successfully establish a new ', 'https://video.lsze.biz/MusicalInstrument');
INSERT INTO `t_video` VALUES (10047, '10002', 'I may not have gone where I intended ', 'http://video.whwu9.xyz/AppsGames');
INSERT INTO `t_video` VALUES (10048, '10001', 'You will succeed because most people are lazy.', 'https://video.bh4.us/PetSupplies');
INSERT INTO `t_video` VALUES (10049, '10003', 'Actually it is just in an idea ', 'https://video.duanxia104.net/ClothingShoesandJewelry');
INSERT INTO `t_video` VALUES (10050, '10003', 'The reason why a great man is great ', 'https://video.zhennanwe.net/IndustrialScientificSupplies');
INSERT INTO `t_video` VALUES (10051, '10002', 'Navicat Monitor can be installed ', 'http://video.xiaoziyi.cn/Beauty');
INSERT INTO `t_video` VALUES (10052, '10003', 'I destroy my enemies when I make them my friends.', 'https://video.melissa506.us/Appliances');
INSERT INTO `t_video` VALUES (10053, '10003', 'I may not have gone where I intended ', 'http://video.colemb.co.jp/IndustrialScientificSupplies');
INSERT INTO `t_video` VALUES (10054, '10001', 'Navicat provides powerful tools ', 'https://video.xiaomingli.com/Books');
INSERT INTO `t_video` VALUES (10055, '10002', 'Navicat Cloud provides a cloud ', 'http://video.cooperjuan803.biz/Appliances');
INSERT INTO `t_video` VALUES (10056, '10001', 'If your Internet Service Provider ', 'http://video.hiutung1025.co.jp/Food');
INSERT INTO `t_video` VALUES (10057, '10002', 'You can select any connections, ', 'http://video.kolu.cn/ToolsHomeDecoration');
INSERT INTO `t_video` VALUES (10058, '10003', 'SSH serves to prevent such vulnerabilities ', 'http://video.taniguchi727.com/CollectiblesFineArt');
INSERT INTO `t_video` VALUES (10059, '10003', 'There is no way to happiness. Happiness ', 'https://video.takedaminat67.net/AppsGames');
INSERT INTO `t_video` VALUES (10060, '10003', 'A query is used to extract data ', 'http://video.yunintang.jp/MusicalInstrument');
INSERT INTO `t_video` VALUES (10061, '10003', 'The Synchronize to Database function ', 'https://video.llu.biz/CollectiblesFineArt');
INSERT INTO `t_video` VALUES (10062, '10001', 'To open a query using an external ', 'http://video.yuen6.co.jp/CollectiblesFineArt');
INSERT INTO `t_video` VALUES (10063, '10002', 'If the Show objects under schema ', 'http://video.huimeicho.biz/CenturionGardenOutdoor');
INSERT INTO `t_video` VALUES (10064, '10001', 'I destroy my enemies when I make them my friends.', 'http://video.yuitomori.cn/Beauty');
INSERT INTO `t_video` VALUES (10065, '10001', 'It provides strong authentication ', 'http://video.kondo1.biz/Others');
INSERT INTO `t_video` VALUES (10066, '10001', 'Typically, it is employed as an ', 'http://video.nantanaka10.net/IndustrialScientificSupplies');
INSERT INTO `t_video` VALUES (10067, '10001', 'Navicat Monitor can be installed ', 'http://video.konaoshi1.co.jp/ArtsHandicraftsSewing');
INSERT INTO `t_video` VALUES (10068, '10002', 'The past has no power over the present moment. ', 'http://video.yoshida205.cn/ClothingShoesandJewelry');
INSERT INTO `t_video` VALUES (10069, '10001', 'It provides strong authentication ', 'https://video.chiuwaiwan2.com/BaggageTravelEquipment');
INSERT INTO `t_video` VALUES (10070, '10002', 'Typically, it is employed as an ', 'https://video.kwch.xyz/ClothingShoesandJewelry');
INSERT INTO `t_video` VALUES (10071, '10001', 'There is no way to happiness. Happiness ', 'https://video.daniels74.com/BeautyPersonalCare');
INSERT INTO `t_video` VALUES (10072, '10002', 'To connect to a database or schema, ', 'https://video.tinwingmak.co.jp/BaggageTravelEquipment');
SET FOREIGN_KEY_CHECKS = 1;
第3题/db_grade.myd
/*
Navicat MySQL Data Transfer
Source Server : 1
Source Server Type : MySQL
Source Server Version : 50743 (5.7.43-log)
Source Host : localhost:3306
Source Schema : db_grade
Target Server Type : MySQL
Target Server Version : 50743 (5.7.43-log)
File Encoding : 65001
Date: 23/11/2023 15:31:23
*/
SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;
-- ----------------------------
-- Table structure for t_course
-- ----------------------------
DROP TABLE IF EXISTS `t_course`;
CREATE TABLE `t_course` (
`cid` int(11) NOT NULL,
`cname` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
`total` int(5) NULL DEFAULT NULL,
PRIMARY KEY (`cid`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
-- ----------------------------
-- Records of t_course
-- ----------------------------
INSERT INTO `t_course` VALUES (10001, '英语', 150);
INSERT INTO `t_course` VALUES (10002, '语文', 150);
INSERT INTO `t_course` VALUES (10003, '数学', 150);
-- ----------------------------
-- Table structure for t_grade
-- ----------------------------
DROP TABLE IF EXISTS `t_grade`;
CREATE TABLE `t_grade` (
`gid` int(10) NOT NULL,
`sid` int(10) NOT NULL,
`cid` int(10) NOT NULL,
`score` int(10) NULL DEFAULT NULL,
PRIMARY KEY (`gid`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
-- ----------------------------
-- Records of t_grade
-- ----------------------------
INSERT INTO `t_grade` VALUES (10001, 10010, 10003, 53);
INSERT INTO `t_grade` VALUES (10002, 10001, 10002, 52);
INSERT INTO `t_grade` VALUES (10003, 10007, 10003, 53);
INSERT INTO `t_grade` VALUES (10004, 10001, 10001, 124);
INSERT INTO `t_grade` VALUES (10005, 10003, 10003, 119);
INSERT INTO `t_grade` VALUES (10006, 10003, 10002, 145);
INSERT INTO `t_grade` VALUES (10007, 10008, 10002, 109);
INSERT INTO `t_grade` VALUES (10008, 10006, 10002, 101);
INSERT INTO `t_grade` VALUES (10009, 10003, 10001, 128);
INSERT INTO `t_grade` VALUES (10010, 10002, 10001, 110);
INSERT INTO `t_grade` VALUES (10011, 10002, 10003, 146);
INSERT INTO `t_grade` VALUES (10012, 10007, 10001, 132);
INSERT INTO `t_grade` VALUES (10013, 10010, 10001, 126);
INSERT INTO `t_grade` VALUES (10014, 10010, 10002, 104);
INSERT INTO `t_grade` VALUES (10015, 10006, 10001, 109);
INSERT INTO `t_grade` VALUES (10016, 10001, 10003, 99);
INSERT INTO `t_grade` VALUES (10017, 10002, 10002, 138);
INSERT INTO `t_grade` VALUES (10018, 10006, 10003, 105);
INSERT INTO `t_grade` VALUES (10019, 10008, 10001, 141);
INSERT INTO `t_grade` VALUES (10020, 10005, 10002, 90);
INSERT INTO `t_grade` VALUES (10021, 10004, 10003, 54);
INSERT INTO `t_grade` VALUES (10022, 10005, 10003, 86);
INSERT INTO `t_grade` VALUES (10023, 10009, 10001, 138);
INSERT INTO `t_grade` VALUES (10024, 10005, 10001, 126);
INSERT INTO `t_grade` VALUES (10025, 10007, 10002, 111);
INSERT INTO `t_grade` VALUES (10026, 10009, 10003, 120);
INSERT INTO `t_grade` VALUES (10027, 10004, 10002, 103);
INSERT INTO `t_grade` VALUES (10028, 10009, 10002, 125);
INSERT INTO `t_grade` VALUES (10029, 10004, 10001, 87);
INSERT INTO `t_grade` VALUES (10030, 10008, 10003, 51);
-- ----------------------------
-- Table structure for t_student
-- ----------------------------
DROP TABLE IF EXISTS `t_student`;
CREATE TABLE `t_student` (
`sid` int(11) NOT NULL AUTO_INCREMENT,
`sname` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
`sex` varchar(2) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
`class` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
PRIMARY KEY (`sid`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 10011 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
-- ----------------------------
-- Records of t_student
-- ----------------------------
INSERT INTO `t_student` VALUES (10001, '夏震南', '男', '高二3班');
INSERT INTO `t_student` VALUES (10002, '孔璐', '女', '高二3班');
INSERT INTO `t_student` VALUES (10003, '田璐', '女', '高二3班');
INSERT INTO `t_student` VALUES (10004, '田秀英', '女', '高二3班');
INSERT INTO `t_student` VALUES (10005, '宋詩涵', '女', '高二3班');
INSERT INTO `t_student` VALUES (10006, '薛詩涵', '女', '高二3班');
INSERT INTO `t_student` VALUES (10007, '石震南', '男', '高二3班');
INSERT INTO `t_student` VALUES (10008, '梁致远', '男', '高二3班');
INSERT INTO `t_student` VALUES (10009, '顾璐', '女', '高二3班');
INSERT INTO `t_student` VALUES (10010, '魏晓明', '男', '高二3班');
SET FOREIGN_KEY_CHECKS = 1;
第4题/db_treatment.myd
/*
Navicat MySQL Data Transfer
Source Server : 1
Source Server Type : MySQL
Source Server Version : 50743 (5.7.43-log)
Source Host : localhost:3306
Source Schema : db_treatment
Target Server Type : MySQL
Target Server Version : 50743 (5.7.43-log)
File Encoding : 65001
Date: 05/12/2023 10:57:18
*/
SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;
-- ----------------------------
-- Table structure for t_doctor
-- ----------------------------
DROP TABLE IF EXISTS `t_doctor`;
CREATE TABLE `t_doctor` (
`did` int(10) NOT NULL AUTO_INCREMENT,
`dname` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
`office` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
`title` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
`tel` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
PRIMARY KEY (`did`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 10021 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
-- ----------------------------
-- Records of t_doctor
-- ----------------------------
INSERT INTO `t_doctor` VALUES (10001, '孟睿', '外科', '实习医生', '196-1142-8607');
INSERT INTO `t_doctor` VALUES (10002, '孙云熙', '耳鼻喉科', '实习医生', '133-0211-7241');
INSERT INTO `t_doctor` VALUES (10003, '邹岚', '内科', '高级医生', '10-560-1386');
INSERT INTO `t_doctor` VALUES (10004, '周子异', '外科', '实习医生', '199-8805-8963');
INSERT INTO `t_doctor` VALUES (10005, '朱睿', '外科', '中级医生', '191-5127-0466');
INSERT INTO `t_doctor` VALUES (10006, '常安琪', '耳鼻喉科', '实习医生', '755-780-8243');
INSERT INTO `t_doctor` VALUES (10007, '崔秀英', '儿科', '主任', '186-1296-4216');
INSERT INTO `t_doctor` VALUES (10008, '董詩涵', '外科', '主任', '760-5492-7849');
INSERT INTO `t_doctor` VALUES (10009, '崔秀英', '内科', '中级医生', '10-1750-7240');
INSERT INTO `t_doctor` VALUES (10010, '周睿', '耳鼻喉科', '高级医生', '755-834-7691');
INSERT INTO `t_doctor` VALUES (10011, '卢震南', '儿科', '中级医生', '186-5900-0614');
INSERT INTO `t_doctor` VALUES (10012, '雷震南', '耳鼻喉科', '高级医生', '178-6511-9350');
INSERT INTO `t_doctor` VALUES (10013, '雷岚', '儿科', '实习医生', '190-6306-4361');
INSERT INTO `t_doctor` VALUES (10014, '唐云熙', '内科', '中级医生', '755-0855-7704');
INSERT INTO `t_doctor` VALUES (10015, '郑震南', '儿科', '中级医生', '20-8721-5863');
INSERT INTO `t_doctor` VALUES (10016, '贾杰宏', '内科', '主任', '130-1162-3953');
INSERT INTO `t_doctor` VALUES (10017, '任睿', '耳鼻喉科', '主任', '21-4613-2793');
INSERT INTO `t_doctor` VALUES (10018, '侯安琪', '内科', '中级医生', '769-867-7575');
INSERT INTO `t_doctor` VALUES (10019, '郝杰宏', '儿科', '实习医生', '21-638-0661');
INSERT INTO `t_doctor` VALUES (10020, '秦晓明', '内科', '中级医生', '178-0882-6094');
-- ----------------------------
-- Table structure for t_patient
-- ----------------------------
DROP TABLE IF EXISTS `t_patient`;
CREATE TABLE `t_patient` (
`pid` char(10) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
`pname` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
`sex` char(2) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
`age` int(5) NULL DEFAULT NULL,
`tel` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
PRIMARY KEY (`pid`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
-- ----------------------------
-- Records of t_patient
-- ----------------------------
INSERT INTO `t_patient` VALUES ('10001', '严子韬', '男', 30, '178-8729-5799');
INSERT INTO `t_patient` VALUES ('10002', '蔡詩涵', '女', 17, '755-6590-9717');
INSERT INTO `t_patient` VALUES ('10003', '蔡嘉伦', '男', 31, '147-0244-7071');
INSERT INTO `t_patient` VALUES ('10004', '卢安琪', '女', 19, '28-018-1654');
INSERT INTO `t_patient` VALUES ('10005', '许宇宁', '男', 57, '139-8471-7072');
INSERT INTO `t_patient` VALUES ('10006', '彭璐', '女', 56, '144-0250-4252');
INSERT INTO `t_patient` VALUES ('10007', '李睿', '男', 11, '760-5963-6579');
INSERT INTO `t_patient` VALUES ('10008', '叶宇宁', '男', 33, '155-1117-9875');
INSERT INTO `t_patient` VALUES ('10009', '杨睿', '男', 48, '760-1389-9772');
INSERT INTO `t_patient` VALUES ('10010', '熊致远', '男', 11, '20-9278-7287');
INSERT INTO `t_patient` VALUES ('10011', '谭子韬', '男', 11, '10-5460-3302');
INSERT INTO `t_patient` VALUES ('10012', '龙云熙', '男', 36, '769-625-8369');
INSERT INTO `t_patient` VALUES ('10013', '潘睿', '男', 15, '146-5460-0503');
INSERT INTO `t_patient` VALUES ('10014', '胡嘉伦', '男', 23, '144-0725-3728');
INSERT INTO `t_patient` VALUES ('10015', '陶睿', '男', 50, '144-4354-4812');
INSERT INTO `t_patient` VALUES ('10016', '顾震南', '男', 33, '755-837-7148');
INSERT INTO `t_patient` VALUES ('10017', '袁岚', '女', 49, '173-5836-5107');
INSERT INTO `t_patient` VALUES ('10018', '卢詩涵', '女', 58, '760-176-4450');
INSERT INTO `t_patient` VALUES ('10019', '李璐', '女', 22, '20-8392-9908');
INSERT INTO `t_patient` VALUES ('10020', '蔡詩涵', '女', 27, '190-8099-9579');
INSERT INTO `t_patient` VALUES ('10021', '吕子异', '男', 23, '28-205-6374');
INSERT INTO `t_patient` VALUES ('10022', '侯詩涵', '女', 25, '20-4328-8586');
INSERT INTO `t_patient` VALUES ('10023', '孔睿', '男', 58, '769-118-9579');
INSERT INTO `t_patient` VALUES ('10024', '徐嘉伦', '男', 33, '21-0131-1452');
INSERT INTO `t_patient` VALUES ('10025', '傅安琪', '女', 17, '760-074-2030');
INSERT INTO `t_patient` VALUES ('10026', '蒋致远', '男', 49, '154-1502-8322');
INSERT INTO `t_patient` VALUES ('10027', '何云熙', '男', 11, '760-7767-9468');
INSERT INTO `t_patient` VALUES ('10028', '朱秀英', '女', 57, '28-951-6412');
INSERT INTO `t_patient` VALUES ('10029', '萧睿', '男', 16, '169-1837-9488');
INSERT INTO `t_patient` VALUES ('10030', '苏宇宁', '男', 28, '769-6418-4954');
INSERT INTO `t_patient` VALUES ('10031', '马睿', '男', 44, '21-868-2371');
INSERT INTO `t_patient` VALUES ('10032', '吴晓明', '男', 46, '138-8679-0662');
INSERT INTO `t_patient` VALUES ('10033', '汪震南', '男', 55, '156-1029-5325');
INSERT INTO `t_patient` VALUES ('10034', '陆嘉伦', '男', 12, '755-081-8243');
INSERT INTO `t_patient` VALUES ('10035', '韩致远', '男', 14, '28-3673-8413');
INSERT INTO `t_patient` VALUES ('10036', '陶詩涵', '女', 42, '185-8722-8093');
INSERT INTO `t_patient` VALUES ('10037', '秦璐', '女', 60, '769-275-5209');
INSERT INTO `t_patient` VALUES ('10038', '余致远', '男', 20, '179-1132-3645');
INSERT INTO `t_patient` VALUES ('10039', '梁云熙', '男', 39, '21-7784-6260');
INSERT INTO `t_patient` VALUES ('10040', '刘晓明', '男', 50, '143-5309-6600');
INSERT INTO `t_patient` VALUES ('10041', '贺杰宏', '男', 14, '760-9388-2272');
INSERT INTO `t_patient` VALUES ('10042', '廖子异', '男', 54, '10-700-0511');
INSERT INTO `t_patient` VALUES ('10043', '邵致远', '男', 45, '769-970-5598');
INSERT INTO `t_patient` VALUES ('10044', '常子韬', '男', 44, '142-2894-9338');
INSERT INTO `t_patient` VALUES ('10045', '龚睿', '男', 42, '760-8312-1246');
INSERT INTO `t_patient` VALUES ('10046', '雷秀英', '女', 34, '755-2071-2097');
INSERT INTO `t_patient` VALUES ('10047', '钟晓明', '男', 55, '769-301-9665');
INSERT INTO `t_patient` VALUES ('10048', '黎致远', '男', 39, '20-9401-0460');
INSERT INTO `t_patient` VALUES ('10049', '马杰宏', '男', 44, '142-4147-4122');
INSERT INTO `t_patient` VALUES ('10050', '魏云熙', '男', 35, '21-6786-3131');
-- ----------------------------
-- Table structure for t_registration
-- ----------------------------
DROP TABLE IF EXISTS `t_registration`;
CREATE TABLE `t_registration` (
`rid` int(10) NOT NULL AUTO_INCREMENT,
`pid` int(10) NOT NULL,
`did` int(10) NULL DEFAULT NULL,
`rtime` date NULL DEFAULT NULL,
PRIMARY KEY (`rid`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 490051 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
-- ----------------------------
-- Records of t_registration
-- ----------------------------
INSERT INTO `t_registration` VALUES (1, 10007, 10001, '2006-12-31');
INSERT INTO `t_registration` VALUES (10002, 10049, 10011, '2017-07-12');
INSERT INTO `t_registration` VALUES (20003, 10037, 10013, '2004-05-08');
INSERT INTO `t_registration` VALUES (30004, 10005, 10018, '2001-02-22');
INSERT INTO `t_registration` VALUES (40005, 10039, 10015, '2021-04-24');
INSERT INTO `t_registration` VALUES (50006, 10011, 10011, '2019-05-11');
INSERT INTO `t_registration` VALUES (60007, 10035, 10002, '2010-02-10');
INSERT INTO `t_registration` VALUES (70008, 10018, 10005, '2000-03-18');
INSERT INTO `t_registration` VALUES (80009, 10032, 10005, '2021-04-01');
INSERT INTO `t_registration` VALUES (90010, 10034, 10009, '2007-03-04');
INSERT INTO `t_registration` VALUES (100011, 10014, 10013, '2022-12-28');
INSERT INTO `t_registration` VALUES (110012, 10026, 10015, '2018-04-25');
INSERT INTO `t_registration` VALUES (120013, 10009, 10019, '2011-09-05');
INSERT INTO `t_registration` VALUES (130014, 10021, 10007, '2015-09-24');
INSERT INTO `t_registration` VALUES (140015, 10020, 10004, '2013-10-02');
INSERT INTO `t_registration` VALUES (150016, 10013, 10009, '2016-11-15');
INSERT INTO `t_registration` VALUES (160017, 10038, 10013, '2018-10-03');
INSERT INTO `t_registration` VALUES (170018, 10044, 10012, '2018-03-07');
INSERT INTO `t_registration` VALUES (180019, 10048, 10003, '2004-08-09');
INSERT INTO `t_registration` VALUES (190020, 10043, 10012, '2017-05-18');
INSERT INTO `t_registration` VALUES (200021, 10016, 10017, '2011-10-07');
INSERT INTO `t_registration` VALUES (210022, 10012, 10005, '2005-12-14');
INSERT INTO `t_registration` VALUES (220023, 10010, 10004, '2018-07-20');
INSERT INTO `t_registration` VALUES (230024, 10002, 10011, '2023-11-06');
INSERT INTO `t_registration` VALUES (240025, 10017, 10010, '2016-11-26');
INSERT INTO `t_registration` VALUES (250026, 10033, 10011, '2004-12-03');
INSERT INTO `t_registration` VALUES (260027, 10022, 10020, '2005-09-12');
INSERT INTO `t_registration` VALUES (270028, 10040, 10015, '2012-02-08');
INSERT INTO `t_registration` VALUES (280029, 10008, 10010, '2023-08-05');
INSERT INTO `t_registration` VALUES (290030, 10045, 10013, '2009-01-15');
INSERT INTO `t_registration` VALUES (300031, 10028, 10010, '2005-10-26');
INSERT INTO `t_registration` VALUES (310032, 10024, 10016, '2007-02-05');
INSERT INTO `t_registration` VALUES (320033, 10006, 10012, '2005-01-09');
INSERT INTO `t_registration` VALUES (330034, 10036, 10009, '2012-07-04');
INSERT INTO `t_registration` VALUES (340035, 10015, 10010, '2016-01-14');
INSERT INTO `t_registration` VALUES (350036, 10025, 10007, '2007-07-16');
INSERT INTO `t_registration` VALUES (360037, 10046, 10009, '2003-11-21');
INSERT INTO `t_registration` VALUES (370038, 10042, 10019, '2015-08-22');
INSERT INTO `t_registration` VALUES (380039, 10047, 10008, '2003-12-11');
INSERT INTO `t_registration` VALUES (390040, 10030, 10011, '2023-11-03');
INSERT INTO `t_registration` VALUES (400041, 10041, 10011, '2009-10-31');
INSERT INTO `t_registration` VALUES (410042, 10001, 10015, '2016-01-28');
INSERT INTO `t_registration` VALUES (420043, 10029, 10020, '2001-01-31');
INSERT INTO `t_registration` VALUES (430044, 10050, 10018, '2015-06-07');
INSERT INTO `t_registration` VALUES (440045, 10031, 10018, '2011-11-30');
INSERT INTO `t_registration` VALUES (450046, 10003, 10004, '2022-06-13');
INSERT INTO `t_registration` VALUES (460047, 10004, 10002, '2017-07-12');
INSERT INTO `t_registration` VALUES (470048, 10027, 10003, '2005-07-13');
INSERT INTO `t_registration` VALUES (480049, 10023, 10019, '2015-05-13');
INSERT INTO `t_registration` VALUES (490050, 10019, 10007, '2011-09-14');
SET FOREIGN_KEY_CHECKS = 1;
第5题/db_dance.myd
/*
Navicat MySQL Data Transfer
Source Server : 1
Source Server Type : MySQL
Source Server Version : 50743 (5.7.43-log)
Source Host : localhost:3306
Source Schema : db_dance
Target Server Type : MySQL
Target Server Version : 50743 (5.7.43-log)
File Encoding : 65001
Date: 05/01/2024 15:19:43
*/
SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;
-- ----------------------------
-- Table structure for t_class
-- ----------------------------
DROP TABLE IF EXISTS `t_class`;
CREATE TABLE `t_class` (
`id` int(10) NOT NULL AUTO_INCREMENT,
`name` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
`tea_id` int(10) NULL DEFAULT NULL,
`cou_id` int(10) NULL DEFAULT NULL,
`time` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 10011 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
-- ----------------------------
-- Records of t_class
-- ----------------------------
INSERT INTO `t_class` VALUES (10001, '周末班', 10007, 10005, '周六到周日14-15点');
INSERT INTO `t_class` VALUES (10002, '晚间班', 10009, 10005, '周一到周五19-21点 ');
INSERT INTO `t_class` VALUES (10003, '周末班', 10006, 10003, '周六到周日14-15点');
INSERT INTO `t_class` VALUES (10004, '晚间班', 10008, 10004, '周一到周五19-21点 ');
INSERT INTO `t_class` VALUES (10005, '周末班', 10010, 10004, '周六到周日14-15点');
INSERT INTO `t_class` VALUES (10006, '晚间班', 10004, 10003, '周一到周五19-21点 ');
INSERT INTO `t_class` VALUES (10007, '晚间班', 10001, 10002, '周一到周五19-21点 ');
INSERT INTO `t_class` VALUES (10008, '周末班', 10003, 10001, '周六到周日14-15点');
INSERT INTO `t_class` VALUES (10009, '晚间班', 10002, 10001, '周一到周五19-21点 ');
INSERT INTO `t_class` VALUES (10010, '周末班', 10005, 10002, '周六到周日14-15点');
-- ----------------------------
-- Table structure for t_course
-- ----------------------------
DROP TABLE IF EXISTS `t_course`;
CREATE TABLE `t_course` (
`id` int(10) NOT NULL AUTO_INCREMENT,
`name` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
`period` int(5) NULL DEFAULT NULL,
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 10006 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
-- ----------------------------
-- Records of t_course
-- ----------------------------
INSERT INTO `t_course` VALUES (10001, '街舞', 48);
INSERT INTO `t_course` VALUES (10002, '芭蕾舞', 48);
INSERT INTO `t_course` VALUES (10003, '古典舞', 48);
INSERT INTO `t_course` VALUES (10004, '形体课', 24);
INSERT INTO `t_course` VALUES (10005, '瑜伽课', 36);
-- ----------------------------
-- Table structure for t_student
-- ----------------------------
DROP TABLE IF EXISTS `t_student`;
CREATE TABLE `t_student` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
`sex` varchar(5) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
`age` int(3) NULL DEFAULT NULL,
`tel` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
`cls_id` int(11) NULL DEFAULT NULL,
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 10051 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
-- ----------------------------
-- Records of t_student
-- ----------------------------
INSERT INTO `t_student` VALUES (10001, '杨詩涵', '女', 14, '156-9749-4103', 10004);
INSERT INTO `t_student` VALUES (10002, '郝晓明', '男', 20, '28-174-4198', 10002);
INSERT INTO `t_student` VALUES (10003, '孙子韬', '男', 21, '156-3813-6615', 10005);
INSERT INTO `t_student` VALUES (10004, '贺安琪', '女', 17, '187-6178-5991', 10006);
INSERT INTO `t_student` VALUES (10005, '孔子韬', '男', 17, '21-624-3205', 10010);
INSERT INTO `t_student` VALUES (10006, '武震南', '男', 18, '760-5392-5374', 10008);
INSERT INTO `t_student` VALUES (10007, '刘震南', '男', 19, '187-6357-4724', 10004);
INSERT INTO `t_student` VALUES (10008, '孔晓明', '男', 13, '28-681-0499', 10006);
INSERT INTO `t_student` VALUES (10009, '董致远', '男', 15, '198-9626-7436', 10009);
INSERT INTO `t_student` VALUES (10010, '于致远', '男', 22, '195-9972-2529', 10010);
INSERT INTO `t_student` VALUES (10011, '孟子韬', '男', 20, '20-4120-9260', 10003);
INSERT INTO `t_student` VALUES (10012, '常睿', '男', 14, '186-7087-2697', 10008);
INSERT INTO `t_student` VALUES (10013, '何子异', '男', 15, '760-6079-5173', 10005);
INSERT INTO `t_student` VALUES (10014, '邵嘉伦', '男', 19, '760-397-6748', 10008);
INSERT INTO `t_student` VALUES (10015, '莫震南', '男', 19, '10-2148-5484', 10002);
INSERT INTO `t_student` VALUES (10016, '金睿', '男', 13, '769-744-0532', 10006);
INSERT INTO `t_student` VALUES (10017, '戴致远', '男', 18, '20-294-5771', 10006);
INSERT INTO `t_student` VALUES (10018, '陈云熙', '男', 13, '183-3750-2872', 10002);
INSERT INTO `t_student` VALUES (10019, '武子异', '男', 14, '760-202-9085', 10004);
INSERT INTO `t_student` VALUES (10020, '蔡睿', '男', 17, '28-890-3668', 10003);
INSERT INTO `t_student` VALUES (10021, '谭致远', '男', 19, '133-4773-0375', 10004);
INSERT INTO `t_student` VALUES (10022, '段嘉伦', '男', 13, '145-3076-9459', 10008);
INSERT INTO `t_student` VALUES (10023, '傅岚', '女', 19, '28-8336-0546', 10009);
INSERT INTO `t_student` VALUES (10024, '陈睿', '男', 14, '196-6023-1698', 10009);
INSERT INTO `t_student` VALUES (10025, '苏秀英', '女', 14, '28-390-5998', 10001);
INSERT INTO `t_student` VALUES (10026, '萧睿', '男', 18, '755-1760-5398', 10007);
INSERT INTO `t_student` VALUES (10027, '程安琪', '女', 17, '10-4383-5598', 10002);
INSERT INTO `t_student` VALUES (10028, '赵震南', '男', 13, '138-8274-2389', 10005);
INSERT INTO `t_student` VALUES (10029, '毛宇宁', '男', 13, '769-816-1618', 10003);
INSERT INTO `t_student` VALUES (10030, '邵晓明', '男', 20, '760-475-2476', 10001);
INSERT INTO `t_student` VALUES (10031, '郑晓明', '男', 20, '130-3168-8051', 10007);
INSERT INTO `t_student` VALUES (10032, '杜秀英', '女', 18, '175-3388-0464', 10007);
INSERT INTO `t_student` VALUES (10033, '尹安琪', '女', 16, '10-9148-9502', 10010);
INSERT INTO `t_student` VALUES (10034, '罗安琪', '女', 16, '769-078-5957', 10005);
INSERT INTO `t_student` VALUES (10035, '陈杰宏', '男', 18, '157-9612-4864', 10009);
INSERT INTO `t_student` VALUES (10036, '梁睿', '男', 18, '169-1188-6225', 10010);
INSERT INTO `t_student` VALUES (10037, '杨子韬', '男', 13, '143-2959-3789', 10003);
INSERT INTO `t_student` VALUES (10038, '叶震南', '男', 19, '173-8465-6772', 10001);
INSERT INTO `t_student` VALUES (10039, '方杰宏', '男', 21, '760-2259-4448', 10007);
INSERT INTO `t_student` VALUES (10040, '叶子韬', '男', 18, '168-5655-3892', 10001);
INSERT INTO `t_student` VALUES (10041, '江杰宏', '男', 21, '134-4548-9932', 10004);
INSERT INTO `t_student` VALUES (10042, '姚秀英', '女', 17, '21-253-4481', 10009);
INSERT INTO `t_student` VALUES (10043, '江致远', '男', 14, '136-8904-2737', 10008);
INSERT INTO `t_student` VALUES (10044, '萧詩涵', '女', 17, '169-6038-7203', 10001);
INSERT INTO `t_student` VALUES (10045, '孙子韬', '男', 15, '760-3920-3293', 10006);
INSERT INTO `t_student` VALUES (10046, '叶致远', '男', 13, '769-673-7543', 10008);
INSERT INTO `t_student` VALUES (10047, '郭睿', '男', 21, '28-926-7582', 10003);
INSERT INTO `t_student` VALUES (10048, '侯岚', '女', 21, '769-6339-8485', 10003);
INSERT INTO `t_student` VALUES (10049, '金宇宁', '男', 19, '174-1509-6774', 10001);
INSERT INTO `t_student` VALUES (10050, '郑宇宁', '男', 22, '769-684-4214', 10009);
-- ----------------------------
-- Table structure for t_teacher
-- ----------------------------
DROP TABLE IF EXISTS `t_teacher`;
CREATE TABLE `t_teacher` (
`id` int(10) NOT NULL AUTO_INCREMENT,
`name` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
`sex` varchar(2) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
`age` int(3) NULL DEFAULT NULL,
`tel` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 10011 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
-- ----------------------------
-- Records of t_teacher
-- ----------------------------
INSERT INTO `t_teacher` VALUES (10001, '毛岚', '女', 32, '141-2488-8388');
INSERT INTO `t_teacher` VALUES (10002, '阎璐', '女', 31, '755-797-4098');
INSERT INTO `t_teacher` VALUES (10003, '徐宇宁', '男', 26, '156-9777-4532');
INSERT INTO `t_teacher` VALUES (10004, '罗云熙', '男', 35, '168-2861-0381');
INSERT INTO `t_teacher` VALUES (10005, '郑岚', '女', 26, '755-117-8789');
INSERT INTO `t_teacher` VALUES (10006, '韩杰宏', '男', 34, '755-801-7051');
INSERT INTO `t_teacher` VALUES (10007, '谢子异', '男', 30, '755-286-0780');
INSERT INTO `t_teacher` VALUES (10008, '侯睿', '男', 28, '135-3705-3061');
INSERT INTO `t_teacher` VALUES (10009, '林岚', '女', 31, '147-4778-0303');
INSERT INTO `t_teacher` VALUES (10010, '钱杰宏', '男', 26, '165-0043-6486');
SET FOREIGN_KEY_CHECKS = 1;
第6题/db_treatment.myd
/*
Navicat MySQL Data Transfer
Source Server : 1
Source Server Type : MySQL
Source Server Version : 50743 (5.7.43-log)
Source Host : localhost:3306
Source Schema : db_treatment
Target Server Type : MySQL
Target Server Version : 50743 (5.7.43-log)
File Encoding : 65001
Date: 16/11/2023 10:16:06
*/
SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;
-- ----------------------------
-- Table structure for tb_doctor
-- ----------------------------
DROP TABLE IF EXISTS `tb_doctor`;
CREATE TABLE `tb_doctor` (
`did` char(10) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
`dname` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
`office` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
`title` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
`tel` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
PRIMARY KEY (`did`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
-- ----------------------------
-- Records of tb_doctor
-- ----------------------------
INSERT INTO `tb_doctor` VALUES ('d0001', '李医生', '儿童科', '主任', '1809999999');
INSERT INTO `tb_doctor` VALUES ('d0002', '王医生', '外科', '高级医生', '1897777777');
INSERT INTO `tb_doctor` VALUES ('d0003', '刘医生', '内科', '院长', '1596666666');
INSERT INTO `tb_doctor` VALUES ('d0004', '赵医生', '耳鼻喉科', '实习医生', '1329999999');
INSERT $
编写说明:湖北省技能高考《计算机类考纲百套卷》,依据《湖北省普通高等学校招收中等职业学校毕业生技能高考计算机类技能考试大纲》编写。每门课程均分三层训练:基础层(具象化支架)以拆解考点为微目标,紧扣考纲 掌握理解 要求编写考点训练卷;巩固层(关联性支架)强化知识交叉与场景关联,按考纲专题编专题训练卷;应用层(引导性支架)聚焦真题突破,结合知识模块与教材编写课程综合卷。
本试卷是第78卷,按《MySQL数据库基础》范围和要求编写。具体内容为:掌握触发器的基本概念、种类和使用场景,熟练掌握创建、删除触发器的操作方法,
湖北省《计算机类考纲百套卷》 第78卷
《MySQL数据库基础》
触发器 专题训练卷
考试时间80分钟 满分100分
班级 姓名 学号 成绩
一、数据库操作题(本大题共10小题,每题10分,共100分)
1.社交网络数据库db_social包含了t_user用户表、t_friendship好友关系表、t_post动态表、点赞表
t_user包含字段uid(用户编号),username(用户名),password(密码),nickname(昵称),age(年龄),sex(性别)。
t_friendship包含字段 fsid(好友关系编号),uid(用户id),fid(好友id),createtime(添加时间)。
t_post包含字段pid(动态编号),uid(用户编号),content(内容),createtime(创建时间)
t_likes包含字段lid(点赞编号),pid(动态编号),fid(好友id),createtime(点赞时间)。
1).在t_friendship表上创建一个BEFORE INSERT触发器,名为check_self_friend。实现逻辑:当插入的好友关系中uid(用户id)等于fid(好友id)时,视为添加自己为好友,触发报错并阻止插入。
2).在t_user表上创建一个BEFORE DELETE触发器,名为delete_user_cascade。实现逻辑:当删除某个用户时,自动删除该用户在t_post表中发布的所有动态
答案:
1).DELIMITER $$CREATE TRIGGER check_self_friend
BEFORE INSERT ON t_friendship
FOR EACH ROW
BEGIN
IF NEW.uid = NEW.fid THEN
SIGNAL SQLSTATE '45000'
SET MESSAGE_TEXT = '不能添加自己为好友';
END IF;
END$$DELIMITER ;
2).DELIMITER $$CREATE TRIGGER delete_user_cascade
BEFORE DELETE ON t_user
FOR EACH ROW
BEGIN
DELETE FROM t_post WHERE uid = OLD.uid;
END$$DELIMITER ;
2.线上教育数据库db_education包含了t_student学生表、t_course课程表、t_Learn学习记录表和t_video视频表
t_student包含字段sid(学生编号),sname(学生姓名),username(用户名),password(密码),classes(班级)。
t_course包含字段 cid(课程编号),cname(课程名称),description(描述),
classhour(课时)。
t_video包括字段vid(视频编号),cid(课程编号),title(标题),link(链接地址)
t_Learn学习记录表lid(学习记录编号),sid(学生编号),cid(课程编号),schedule(学习进度),createtime(创建时间)。
1).在t_Learn表上创建一个BEFORE INSERT触发器,名为check_schedule_range。实现逻辑:检查新插入的schedule(学习进度)是否在 0 到 100 之间,若超出范围则报错并阻止插入
2).假设需要在课程表中记录总学习人数,请改为:在t_Learn表上创建一个BEFORE INSERT触发器,名为update_learn_time。实现逻辑:自动将createtime(创建时间)设置为当前系统时间
答案:
1).DELIMITER $$CREATE TRIGGER check_schedule_range
BEFORE INSERT ON t_Learn
FOR EACH ROW
BEGIN
IF NEW.schedule < 0 OR NEW.schedule > 100 THEN
SIGNAL SQLSTATE '45000'
SET MESSAGE_TEXT = '学习进度必须在0到100之间';
END IF;
END$$DELIMITER ;
2).DELIMITER $$CREATE TRIGGER update_learn_time
BEFORE INSERT ON t_Learn
FOR EACH ROW
BEGIN
SET NEW.createtime = NOW();
END$$DELIMITER ;
3.学生成绩系统数据库db_grade包含了t_student学生表t_grade成绩表和t_course科目表
t_student包含字段sid(学生编号),sname(姓名),sex(性别),class(班级)。
t_course包含字段 cid(科目编号),cname(科目名称),total(总分)。
t_grade包含字段gid(成绩编号),sid(学生编号),cid(科目编号),score(分数)。
1).在t_grade表上创建一个BEFORE INSERT触发器,名为check_score_limit。实现逻辑:通过关联t_course表,判断新插入的score(分数)是否大于该科目对应的total(总分),若大于则报错并阻止插入
2).使用SQL命令删除上述触发器check_score_limit
答案:
1).DELIMITER $$CREATE TRIGGER check_score_limit
BEFORE INSERT ON t_grade
FOR EACH ROW
BEGIN
DECLARE max_score INT;
SELECT total INTO max_score FROM t_course WHERE cid = NEW.cid;
IF NEW.score > max_score THEN
SIGNAL SQLSTATE '45000'
SET MESSAGE_TEXT = '分数不能超过该科目的总分';
END IF;
END$$DELIMITER ;
2).DROP TRIGGER IF EXISTS check_score_limit;
4.医疗管理数据库db_treatment包含了t_patient患者表、t_doctor医生表、t_registration挂号表
t_patient包含字段pid(患者编号),pname(患者姓名),sex(性别),age(年龄),tel(联系电话)。
t_doctor包含字段 did(医生编号),dname(医生姓名),office(科室),
title(职称),tel(联系电话)。
t_registration包括字段rid(挂号编号),pid(患者编号),did(医生编号),rtime(挂号日期)。
1).在t_registration表上创建一个BEFORE INSERT触发器,名为check_registration_date。实现逻辑:检查rtime(挂号日期),若日期小于当前日期(即挂过去的号),则报错并阻止插入
2).在t_patient表上创建一个BEFORE DELETE触发器,名为delete_patient_regs。实现逻辑:当删除某个患者时,自动删除该患者在t_registration表中的所有挂号记录
答案:
1).DELIMITER $$CREATE TRIGGER check_registration_date
BEFORE INSERT ON t_registration
FOR EACH ROW
BEGIN
IF NEW.rtime < CURDATE() THEN
SIGNAL SQLSTATE '45000'
SET MESSAGE_TEXT = '挂号日期不能早于今天';
END IF;
END$$DELIMITER ;
2).DELIMITER $$CREATE TRIGGER delete_patient_regs
BEFORE DELETE ON t_patient
FOR EACH ROW
BEGIN
DELETE FROM t_registration WHERE pid = OLD.pid;
END$$DELIMITER ;
5.舞蹈课程管理系统数据库db_dance包含了t_student学员表、t_course课程表
、t_class班级表和t_teacher老师表。
t_student包含字段id(学生编号),name(学生姓名),sex(性别),age(年龄),tel(联系方式),cls_id(班级编号);
t_course包含字段id(课程编号),name(课程名称),period(课时)
t_class包含字段id(班级编号),name(班级名称),tea_id(老师编号),cou_id(课程编号),time(上课时间)
t_teacher包含字段id(老师编号),name(老师姓名),sex(性别),age(年龄),tel(联系方式);
1).在t_student表上创建一个BEFORE INSERT触发器,名为check_class_exists。实现逻辑:验证新插入学生的cls_id(班级编号)是否存在于t_class表的id中,若不存在则报错并阻止插入
2).创建触发器:在t_class表上创建一个BEFORE DELETE触发器,名为prevent_delete_class。实现逻辑:若该班级下仍有学生,则报错并阻止删除该班级
答案:
1).DELIMITER $$CREATE TRIGGER check_class_exists
BEFORE INSERT ON t_student
FOR EACH ROW
BEGIN
DECLARE class_count INT;
SELECT COUNT(*) INTO class_count FROM t_clsss WHERE id = NEW.cls_id;
IF class_count = 0 THEN
SIGNAL SQLSTATE '45000'
SET MESSAGE_TEXT = '班级编号不存在';
END IF;
END$$DELIMITER ;
2).DELIMITER $$CREATE TRIGGER prevent_delete_class
BEFORE DELETE ON t_clsss
FOR EACH ROW
BEGIN
DECLARE student_count INT;
SELECT COUNT(*) INTO student_count FROM t_student WHERE cls_id = OLD.id;
IF student_count > 0 THEN
SIGNAL SQLSTATE '45000'
SET MESSAGE_TEXT = '该班级下仍有学生,不能删除';
END IF;
END$$DELIMITER ;
6.医疗管理数据库db_treatment包含了tb_patient患者表、tb_doctor医生表和tb_registration挂号表
tb_patient包含字段pid(患者编号),pname(患者姓名),sex(性别),age(年龄),tel(联系电话)。
tb_doctor包含字段 did(医生编号),dname(医生姓名),office(科室),
title(职称),tel(联系电话)。
tb_registration包括字段rid(挂号编号),pid(患者编号),did(医生编号),rtime(挂号日期)。
1).在tb_registration表上创建一个BEFORE INSERT触发器,名为check_patient_doctor_exist。实现逻辑:验证插入的pid是否存在于tb_patient表,且did是否存在于tb_doctor表,若任一不存在则报错阻止插入
2).使用 SQL 命令删除上述触发器check_patient_doctor_exist
答案:
1).DELIMITER $$CREATE TRIGGER check_patient_doctor_exist
BEFORE INSERT ON tb_registration
FOR EACH ROW
BEGIN
DECLARE patient_count INT;
DECLARE doctor_count INT;
SELECT COUNT(*) INTO patient_count FROM tb_patient WHERE pid = NEW.pid;
SELECT COUNT(*) INTO doctor_count FROM tb_doctor WHERE did = NEW.did;
IF patient_count = 0 OR doctor_count = 0 THEN
SIGNAL SQLSTATE '45000'
SET MESSAGE_TEXT = '患者或医生编号不存在';
END IF;
END$$DELIMITER ;
2).DROP TRIGGER IF EXISTS check_patient_doctor_exist;
7.舞蹈课程管理系统数据库db_dance包含了t_student学员表、t_course课程表
、t_class班级表和t_teacher老师表。
t_student包含字段id(学生编号),name(学生姓名),sex(性别),age(年龄),tel(联系方式),cls_id(班级编号);
t_course包含字段id(课程编号),name(课程名称),period(课时)
t_class包含字段id(班级编号),name(班级名称),tea_id(老师编号),cou_id(课程编号),time(上课时间)
t_teacher包含字段id(老师编号),name(老师姓名),sex(性别),age(年龄),tel(联系方式),salary(薪资);
1).在t_teacher表上创建一个BEFORE UPDATE触发器,名为check_salary_positive。实现逻辑:当修改salary(薪资)字段时,确保新薪资大于等于 0,否则报错并阻止更新
2).在t_teacher表上创建一个BEFORE DELETE触发器,名为delete_teacher_classes。实现逻辑:当删除某个老师时,自动删除t_class表中该老师(tea_id)负责的所有班级记录
答案:
1).DELIMITER $$CREATE TRIGGER check_salary_positive
BEFORE UPDATE ON t_teacher
FOR EACH ROW
BEGIN
IF NEW.salary < 0 THEN
SIGNAL SQLSTATE '45000'
SET MESSAGE_TEXT = '薪资不能小于0';
END IF;
END$$DELIMITER ;
2).DELIMITER $$CREATE TRIGGER delete_teacher_classes
BEFORE DELETE ON t_teacher
FOR EACH ROW
BEGIN
DELETE FROM t_clsss WHERE tea_id = OLD.id;
END$$DELIMITER ;
8.线上教育数据库db_education包含了t_student学生表、t_course课程表、t_Learn学习记录表和t_video视频表
t_student包含字段id(学生编号),name(学生姓名),username(用户名),password(密码)。
t_course包含字段 id(课程编号),name(课程名称),description(描述),period(课时)。
t_video包括字段id(视频编号),c_id(课程编号),title(标题),link(链接地址)
t_learn学习记录表id(学习记录编号),s_id(学生编号),c_id(课程编号),schedule(学习进度),createtime(创建时间)。
1).在t_learn表上创建一个BEFORE INSERT触发器,名为validate_schedule。实现逻辑:确保插入的schedule(学习进度)在 0 到 100 的闭区间内,否则报错
2).在t_course表上创建一个BEFORE DELETE触发器,名为delete_course_videos。实现逻辑:当删除某门课程时,自动删除t_video表中该课程(c_id)下的所有视频
答案:
1).DELIMITER $$CREATE TRIGGER validate_schedule
BEFORE INSERT ON t_learn
FOR EACH ROW
BEGIN
IF NEW.schedule < 0 OR NEW.schedule > 100 THEN
SIGNAL SQLSTATE '45000'
SET MESSAGE_TEXT = '学习进度必须在0到100之间';
END IF;
END$$DELIMITER ;
2).DELIMITER $$CREATE TRIGGER delete_course_videos
BEFORE DELETE ON t_course
FOR EACH ROW
BEGIN
DELETE FROM t_video WHERE c_id = OLD.id;
END$$DELIMITER ;
9.人力资源管理系统数据库db_hrm包含了t_employee员工表、t_department部门表和t_salary薪资表
t_employee包含字段id(员工编号),name(员工姓名),sex(性别),age(年龄),position(职位),d_id(部门编号)。
t_department包含字段 id(部门编号),name(部门名称),description(部门描述)。
t_salary包含字段id(薪资编号),e_id(员工编号),money(薪资),time(薪资日期)
1).在t_salary表上创建一个BEFORE INSERT触发器,名为check_money_positive。实现逻辑:确保插入的money(薪资)大于 0,否则报错阻止插入
2).在t_department表上创建一个BEFORE DELETE触发器,名为prevent_delete_dept。实现逻辑:若该部门下仍有员工,则报错并阻止删除该部门。
答案:
1).DELIMITER $$ CREATE TRIGGER check_money_positive
BEFORE INSERT ON t_salary
FOR EACH ROW
BEGIN
IF NEW.money <= 0 THEN
SIGNAL SQLSTATE '45000'
SET MESSAGE_TEXT = '薪资必须大于0';
END IF;
END$$DELIMITER ;
2).DELIMITER $$ CREATE TRIGGER prevent_delete_dept
BEFORE DELETE ON t_department
FOR EACH ROW
BEGIN
DECLARE emp_count INT;
SELECT COUNT(*) INTO emp_count FROM t_employee WHERE d_id = OLD.id;
IF emp_count > 0 THEN
SIGNAL SQLSTATE '45000'
SET MESSAGE_TEXT = '该部门下仍有员工,不能删除';
END IF;
END$$DELIMITER ;
10.人力资源管理系统数据库db_hrm包含了t_employee员工表、t_department部门表和t_salary薪资表
t_employee包含字段id(员工编号),name(员工姓名),sex(性别),age(年龄),position(职位),d_id(部门编号)。
t_department包含字段 id(部门编号),name(部门名称),description(部门描述)。
t_salary包含字段id(薪资编号),e_id(员工编号),money(薪资),time(薪资日期)
1).在t_employee表上创建一个BEFORE INSERT触发器,名为check_dept_exists。实现逻辑:验证插入的d_id(部门编号)是否存在于t_department表中,若不存在则报错阻止插入
2).请设计在t_salary表上创建一个AFTER UPDATE触发器,名为record_salary_change。实现逻辑:当money字段发生更新时,将旧薪资和新薪资记录到一张日志表中
答案:
1).DELIMITER $$CREATE TRIGGER check_dept_exists
BEFORE INSERT ON t_employee
FOR EACH ROW
BEGIN
DECLARE dept_count INT;
SELECT COUNT(*) INTO dept_count FROM t_department WHERE id = NEW.d_id;
IF dept_count = 0 THEN
SIGNAL SQLSTATE '45000'
SET MESSAGE_TEXT = '部门编号不存在';
END IF;
END$$DELIMITER ;
2).DELIMITER $$CREATE TRIGGER record_salary_change
AFTER UPDATE ON t_salary
FOR EACH ROW
BEGIN
IF OLD.money != NEW.money THEN
INSERT INTO t_salary_log (e_id, old_money, new_money, change_time)
VALUES (OLD.e_id, OLD.money, NEW.money, NOW());
END IF;
END$$DELIMITER ;
原创精品资源学科网独家享有版权,侵权必究!
学科网(北京)股份有限公司
学科网(北京)股份有限公司
学科网(北京)股份有限公司
$