diff --git "a/\345\207\241\345\205\211\344\271\220/02\345\233\276\345\272\212picgo\346\217\222\344\273\266\347\232\204\344\275\277\347\224\250\343\200\201Typora\347\232\204\344\275\277\347\224\250.md" "b/\345\207\241\345\205\211\344\271\220/02\345\233\276\345\272\212picgo\346\217\222\344\273\266\347\232\204\344\275\277\347\224\250\343\200\201Typora\347\232\204\344\275\277\347\224\250.md" index 976ce176f098008cf0279554c977060e9492c9f9..d0e43d2d11295aaf8c0be6413141041993fead25 100644 --- "a/\345\207\241\345\205\211\344\271\220/02\345\233\276\345\272\212picgo\346\217\222\344\273\266\347\232\204\344\275\277\347\224\250\343\200\201Typora\347\232\204\344\275\277\347\224\250.md" +++ "b/\345\207\241\345\205\211\344\271\220/02\345\233\276\345\272\212picgo\346\217\222\344\273\266\347\232\204\344\275\277\347\224\250\343\200\201Typora\347\232\204\344\275\277\347\224\250.md" @@ -26,3 +26,31 @@ b.设置这个插件,仓库的地址,私人令牌 **4、**配合截图软件snipaste +五、gitee如何交作业及笔记的内容要求 + +**1、**每次课,必须要有一个笔记 + +**2、**笔记和作业是一体的,也就是每次只交一个文件 + +**3、**文件包括以下部分: + +a.生活日记 + +b.课上吸收到的知识点 + +**c.作业 :** + +1、题目 + +2、答案:图片、代码、文字 + +3、示例: + +​ a.用文字表述业务需求 + +​ b.三个模型:图形、截图 + + + + + diff --git "a/\345\207\241\345\205\211\344\271\220/03RBAC\357\274\210Role-Based Access Control\357\274\211\347\232\204\346\246\202\345\277\265\343\200\201\344\275\277\347\224\250\345\234\272\346\231\257.md" "b/\345\207\241\345\205\211\344\271\220/03RBAC\357\274\210Role-Based Access Control\357\274\211\347\232\204\346\246\202\345\277\265\343\200\201\344\275\277\347\224\250\345\234\272\346\231\257.md" new file mode 100644 index 0000000000000000000000000000000000000000..b23e2908eeb468e572a344faf1d90f50ac67ebee --- /dev/null +++ "b/\345\207\241\345\205\211\344\271\220/03RBAC\357\274\210Role-Based Access Control\357\274\211\347\232\204\346\246\202\345\277\265\343\200\201\344\275\277\347\224\250\345\234\272\346\231\257.md" @@ -0,0 +1,207 @@ +# 一、笔记 + +## 1.RBAC(Role-Based Access Control) + +基于角色的访问控制 + +权限——》角色——》用户 + +1. 角色(Role):角色是指在系统中具有一组相关权限的抽象概念,代表了用户在特定上下文中的身份或职能,例如管理员、普通用户等。 + +2. ## 权限(Permission):权限是指对系统资源进行操作的可,如读取、写入、修改等。权限可以被分配给角色。 + +3. 用户(User):用户是指系统的实际使用者,每个用户可以被分配一个或多个角色。 + +4. 分配(Assignment):分配是指将角色与用户关联起来,以赋予用户相应的权限 + +简单来说就是将权限分配给角色,在将角色分配给用户,使不同的用户拥有不同的权限 + +5、实现思路 + +![Snipaste_2024-09-08_21-37-44](https://gitee.com/fan-guangle/fgls-image-bed/raw/master/imges/202409082138153.png) + +# 二、学校管理系统初级 + +1、需求分析 + +1、不同的角色拥有不同的权限 + +学生:查询成绩 + +老师:添加修改删除成绩 + +2、模型图 + +a.CDM + +![校园管理系统概念模型](https://gitee.com/fan-guangle/fgls-image-bed/raw/master/imges/202409092249556.png) + +b.LDM + +![校园管理系统本地模型](https://gitee.com/fan-guangle/fgls-image-bed/raw/master/imges/202409092250526.png) + +c.PDM + +![校园管理系统物理模型](https://gitee.com/fan-guangle/fgls-image-bed/raw/master/imges/202409092250745.png) + +3、sql语句 + +CREATE DATABASE t_class + +drop table if exists ban; + +drop table if exists class; + +drop table if exists course; + +drop table if exists score; + +drop table if exists student; + +drop table if exists t_permision; + +drop table if exists t_role; + +drop table if exists teacher; + + +create table ban +( + ban_id int not null, + role_id int, + stu_id int, + ban_name char(255) not null, + primary key (ban_id) +); + +create table class +( + class_id int not null, + tec_id int, + class_name char(255) not null, + primary key (class_id) +); + +create table course +( + cour_id int not null, + tec_id int, + class_id int, + cour_name char(255) not null, + primary key (cour_id) +); + +create table score +( + sco_id int not null, + stu_id int, + sco_name char(255) not null, + primary key (sco_id) +); + +create table student +( + stu_id int not null, + role_id int, + class_id int, + stu_name char(255) not null, + primary key (stu_id) +); + +create table t_permision +( + per_id int not null, + per_name char(255) not null, + primary key (per_id) +); + +create table t_role +( + role_id int not null, + per_id int, + role_name char(255) not null, + primary key (role_id) +); + +create table teacher +( + tec_id int not null, + role_id int, + cour_id int, + tec_name char(255) not null, + primary key (tec_id) +); + + +INSERT INTO class( class_id,class_name)VALUES +(1,"软件技术1班"), +(2,"实施运维1班"), +(3,"新媒体1班"); + +INSERT INTO course( cour_id, cour_name)VALUES +(1,"java"), +(2,"数据库"), +(3,"c语言"); + +INSERT INTO score( sco_id,sco_name)VALUES +(1,99), +(2,98), +(3,97); + +INSERT INTO student(stu_id, stu_name )VALUES +(1,"张三"), +(2,"李四"), +(3,"王五"); + + +INSERT INTO t_permision( per_id, per_name)VALUES +(1,"成绩查询"), +(2,"添加成绩"), +(3,"修改成绩"), +(4,"查看成绩"); + + +INSERT INTO t_role( role_id , role_name)VALUES +(1,"学生"), +(2,"老师"), +(3,"班主任"); + +INSERT INTO teacher( tec_id, tec_name )VALUES +(1,"小红"), +(2,"小明"), +(3,"小何"); + + +alter table ban add constraint FK_message foreign key (role_id) + references t_role (role_id) on delete restrict on update restrict; + +alter table ban add constraint FK_xueshengfenpribanzhur foreign key (stu_id) + references student (stu_id) on delete restrict on update restrict; + +alter table class add constraint FK_jiaoshifenpei foreign key (tec_id) + references teacher (tec_id) on delete restrict on update restrict; + +alter table course add constraint FK_banjifenpeikec foreign key (class_id) + references class (class_id) on delete restrict on update restrict; + +alter table course add constraint FK_jiaosfenpeikec2 foreign key (tec_id) + references teacher (tec_id) on delete restrict on update restrict; + +alter table score add constraint FK_xueshengcha foreign key (stu_id) + references student (stu_id) on delete restrict on update restrict; + +alter table student add constraint FK_cha foreign key (role_id) + references t_role (role_id) on delete restrict on update restrict; + +alter table student add constraint FK_xueshengfenpeibanji foreign key (class_id) + references class (class_id) on delete restrict on update restrict; + +alter table t_role add constraint FK_per_fenpei foreign key (per_id) + references t_permision (per_id) on delete restrict on update restrict; + +alter table teacher add constraint FK_jiaosfenpeikec foreign key (cour_id) + references course (cour_id) on delete restrict on update restrict; + +alter table teacher add constraint FK_tianxiugai foreign key (role_id) + references t_role (role_id) on delete restrict on update restrict; + \ No newline at end of file diff --git "a/\345\207\241\345\205\211\344\271\220/03gitee\345\246\202\344\275\225\344\272\244\344\275\234\344\270\232\345\217\212\347\254\224\350\256\260\347\232\204\345\206\205\345\256\271\350\246\201\346\261\202.md" "b/\345\207\241\345\205\211\344\271\220/03gitee\345\246\202\344\275\225\344\272\244\344\275\234\344\270\232\345\217\212\347\254\224\350\256\260\347\232\204\345\206\205\345\256\271\350\246\201\346\261\202.md" deleted file mode 100644 index 95f576a803d8aa1686420fdd6e847472687f5a35..0000000000000000000000000000000000000000 --- "a/\345\207\241\345\205\211\344\271\220/03gitee\345\246\202\344\275\225\344\272\244\344\275\234\344\270\232\345\217\212\347\254\224\350\256\260\347\232\204\345\206\205\345\256\271\350\246\201\346\261\202.md" +++ /dev/null @@ -1,28 +0,0 @@ -五、gitee如何交作业及笔记的内容要求 - -**1、**每次课,必须要有一个笔记 - -**2、**笔记和作业是一体的,也就是每次只交一个文件 - -**3、**文件包括以下部分: - -a.生活日记 - -b.课上吸收到的知识点 - -**c.作业 :** - -1、题目 - -2、答案:图片、代码、文字 - -3、示例: - -​ a.用文字表述业务需求 - -​ b.三个模型:图形、截图 - - - - - diff --git "a/\345\207\241\345\205\211\344\271\220/04RBAC\357\274\210Role-Based Access Control\357\274\211\347\232\204\346\246\202\345\277\265\343\200\201\344\275\277\347\224\250\345\234\272\346\231\257.md" "b/\345\207\241\345\205\211\344\271\220/04RBAC\357\274\210Role-Based Access Control\357\274\211\347\232\204\346\246\202\345\277\265\343\200\201\344\275\277\347\224\250\345\234\272\346\231\257.md" deleted file mode 100644 index 1ac21b0dd0d1f171b17bfbfb9cf395448c9fce75..0000000000000000000000000000000000000000 --- "a/\345\207\241\345\205\211\344\271\220/04RBAC\357\274\210Role-Based Access Control\357\274\211\347\232\204\346\246\202\345\277\265\343\200\201\344\275\277\347\224\250\345\234\272\346\231\257.md" +++ /dev/null @@ -1,15 +0,0 @@ -一、RBAC(Role-Based Access Control)的概念、使用场景 - -1、概念:基于角色的权限访问控制作为传统访问控制(自主访问,强制访问,在RBAC中,权限与角色相关联,用户通过成为角色的成员而得到这些角色的权限,这就极大的管理rbac:一种数据库设计思想,根据设计数据库方案,完成项目的权限控制的数据库的表设计。 - -权限:具备操作某个事务的能力,包括数据、模块、菜单、页面、字段、操作功能(增删改查)等等。; - -角色:一系列权限的集合。 - -2、流程图 - -![Snipaste_2024-09-08_21-35-24](https://gitee.com/fan-guangle/fgls-image-bed/raw/master/imges/202409082136905.png) - -3、实现思路 - -![Snipaste_2024-09-08_21-37-44](https://gitee.com/fan-guangle/fgls-image-bed/raw/master/imges/202409082138153.png) \ No newline at end of file diff --git "a/\345\207\241\345\205\211\344\271\220/04\346\240\241\345\233\255\347\256\241\347\220\206\347\263\273\347\273\237\350\277\233\351\230\266.md" "b/\345\207\241\345\205\211\344\271\220/04\346\240\241\345\233\255\347\256\241\347\220\206\347\263\273\347\273\237\350\277\233\351\230\266.md" new file mode 100644 index 0000000000000000000000000000000000000000..60cf079be3219fa2aa202971fb6e152400955dc0 --- /dev/null +++ "b/\345\207\241\345\205\211\344\271\220/04\346\240\241\345\233\255\347\256\241\347\220\206\347\263\273\347\273\237\350\277\233\351\230\266.md" @@ -0,0 +1,161 @@ +一、需求分析 + +1、不同的角色拥有不同的权限 + +学生:查询成绩 + +老师:添加修改删除成绩 + +班主任:使用门禁 + +总裁:管理公司 + +2、模型图 + +a.CDM + + + +![Snipaste_2024-09-09_22-36-55](https://gitee.com/fan-guangle/fgls-image-bed/raw/master/imges/202409092237080.png) + +b.LDM + +![Snipaste_2024-09-09_22-37-09](https://gitee.com/fan-guangle/fgls-image-bed/raw/master/imges/202409092238186.png) + +c.PDM + +![Snipaste_2024-09-09_22-37-22](https://gitee.com/fan-guangle/fgls-image-bed/raw/master/imges/202409092238829.png) + +3、sql语句 + +CREATE DATABASE if not EXISTS school; + +use school; + +/*==============================================================*/ +/* DBMS name: MySQL 5.0 */ +/* Created on: 2024/9/9 20:33:50 */ +/*==============================================================*/ + + +drop table if exists perrmission; + +drop table if exists resources; + +drop table if exists roel_perrmission; + +drop table if exists t_role; + +drop table if exists t_user; + +/*==============================================================*/ +/* Table: perrmission */ +/*==============================================================*/ +create table perrmission +( + per_id int not null , + per_name char(255) not null, + primary key (per_id) +); + +/*==============================================================*/ +/* Table: resources */ +/*==============================================================*/ +create table resources +( + re_id int not null , + re_name char(255) not null, + primary key (re_id) +); + +/*==============================================================*/ +/* Table: roel_perrmission */ +/*==============================================================*/ +create table roel_perrmission +( + per_id int not null , + role_id int not null, + re_id int not NULL, + primary key (per_id, role_id,re_id ) +); + +/*==============================================================*/ +/* Table: t_role */ +/*==============================================================*/ +create table t_role +( + role_id int not null , + role_name char(255) not null, + primary key (role_id) +); + +/*==============================================================*/ +/* Table: t_user */ +/*==============================================================*/ +create table t_user +( + user_id int not null , + role_id int, + user_name char(255) not null, + primary key (user_id) +); + +alter table roel_perrmission add constraint FK_Relationship_4 foreign key (re_id) + references resources (re_id) on delete restrict on update restrict; + +alter table roel_perrmission add constraint FK_roel_perrmission foreign key (per_id) + references perrmission (per_id) on delete restrict on update restrict; + +alter table roel_perrmission add constraint FK_roel_perrmission2 foreign key (role_id) + references t_role (role_id) on delete restrict on update restrict; + +alter table t_user add constraint FK_user_role foreign key (role_id) + references t_role (role_id) on delete restrict on update restrict; + + +INSERT INTO perrmission (per_id,per_name) VALUES +(1,"查询"), +(2,"添加"), +(3,"修改"), +(4,"删除"), +(5,"使用"), +(6,"管理"); + +INSERT INTO resources (re_id, re_name) VALUES +(1,"成绩"), +(2,"图书"), +(3,"公司"), +(4,"门禁"); + + +INSERT INTO t_role (role_id,role_name) VALUES +(1,"学生"), +(2,"老师"), +(3,"班主任"), +(4,"总裁"); + + +INSERT INTO t_user (user_id, role_id,user_name) VALUES +(1,1,"小明"), +(2,1,"小何"), +(3,2,"球球"), +(4,3,"彬彬"), +(5,4,"马化腾"); + +INSERT INTO roel_perrmission (per_id,role_id,re_id) VALUES +(1,1,1), +(2,1,2), +(3,2,4), +(2,3,4), +(5,4,2), +(6,3,3); + +4、测试数据 + +![Snipaste_2024-09-09_22-32-23](https://gitee.com/fan-guangle/fgls-image-bed/raw/master/imges/202409092240845.png) + +![Snipaste_2024-09-09_22-32-34](https://gitee.com/fan-guangle/fgls-image-bed/raw/master/imges/202409092240836.png) + + + +![Snipaste_2024-09-09_22-32-56](https://gitee.com/fan-guangle/fgls-image-bed/raw/master/imges/202409092240458.png) \ No newline at end of file diff --git "a/\345\207\241\345\205\211\344\271\220/zuoye.md" "b/\345\207\241\345\205\211\344\271\220/zuoye.md" deleted file mode 100644 index 0f6cee6985b6bed9864a4e725cdc42c394239993..0000000000000000000000000000000000000000 --- "a/\345\207\241\345\205\211\344\271\220/zuoye.md" +++ /dev/null @@ -1,8 +0,0 @@ -表与表的关系: -1.一对多:任意一个表中的主键,放到另一个表当外键 -2.一对一:将1所在的表的主键,放到多的表当外键 -3.多对多:需要建立第三张表,将前面两个表的主键放在该表当外键 - **第一范式(1NF)**: 确保每个字段只有单一的原子值,不允许重复的组。 - **第二范式(2NF)**: 确保每个非主属性完全依赖于主键,消除部分依赖。 - **第三范式(3NF)**: 确保每个非主属性直接依赖于主键,消除传递依赖。 - \ No newline at end of file diff --git "a/\345\207\241\345\205\211\344\271\220/\346\240\241\345\233\255\347\256\241\347\220\206\347\263\273\347\273\237.sql" "b/\345\207\241\345\205\211\344\271\220/\346\240\241\345\233\255\347\256\241\347\220\206\347\263\273\347\273\237.sql" deleted file mode 100644 index 1a0c10ae79af02aa0cec4c4bba25236dfd176a8a..0000000000000000000000000000000000000000 --- "a/\345\207\241\345\205\211\344\271\220/\346\240\241\345\233\255\347\256\241\347\220\206\347\263\273\347\273\237.sql" +++ /dev/null @@ -1,238 +0,0 @@ --- MySQL dump 10.13 Distrib 8.0.16, for Win64 (x86_64) --- --- Host: localhost Database: fan --- ------------------------------------------------------ --- Server version 8.0.16 - -/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; -/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; -/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; - SET NAMES utf8mb4 ; -/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; -/*!40103 SET TIME_ZONE='+00:00' */; -/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; -/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; -/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; -/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; --- MySQL dump 10.13 Distrib 8.0.16, for Win64 (x86_64) --- --- Host: localhost Database: t_class --- ------------------------------------------------------ --- Server version 8.0.16 - -/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; -/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; -/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; - SET NAMES utf8mb4 ; -/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; -/*!40103 SET TIME_ZONE='+00:00' */; -/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; -/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; -/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; -/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; - --- --- Table structure for table `class` --- - -DROP TABLE IF EXISTS `class`; -/*!40101 SET @saved_cs_client = @@character_set_client */; - SET character_set_client = utf8mb4 ; -CREATE TABLE `class` ( - `class_id` int(11) NOT NULL, - `tec_id` int(11) DEFAULT NULL, - `class_name` char(255) NOT NULL, - PRIMARY KEY (`class_id`), - KEY `FK_jiaoshifenpei` (`tec_id`), - CONSTRAINT `FK_jiaoshifenpei` FOREIGN KEY (`tec_id`) REFERENCES `teacher` (`tec_id`) ON DELETE RESTRICT ON UPDATE RESTRICT -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Dumping data for table `class` --- - -LOCK TABLES `class` WRITE; -/*!40000 ALTER TABLE `class` DISABLE KEYS */; -INSERT INTO `class` VALUES (1,NULL,'软件技术1班'),(2,NULL,'实施运维1班'),(3,NULL,'新媒体1班'); -/*!40000 ALTER TABLE `class` ENABLE KEYS */; -UNLOCK TABLES; - --- --- Table structure for table `course` --- - -DROP TABLE IF EXISTS `course`; -/*!40101 SET @saved_cs_client = @@character_set_client */; - SET character_set_client = utf8mb4 ; -CREATE TABLE `course` ( - `cour_id` int(11) NOT NULL, - `tec_id` int(11) DEFAULT NULL, - `class_id` int(11) DEFAULT NULL, - `cour_name` char(255) NOT NULL, - PRIMARY KEY (`cour_id`), - KEY `FK_banjifenpeikec` (`class_id`), - KEY `FK_jiaosfenpeikec2` (`tec_id`), - CONSTRAINT `FK_banjifenpeikec` FOREIGN KEY (`class_id`) REFERENCES `class` (`class_id`) ON DELETE RESTRICT ON UPDATE RESTRICT, - CONSTRAINT `FK_jiaosfenpeikec2` FOREIGN KEY (`tec_id`) REFERENCES `teacher` (`tec_id`) ON DELETE RESTRICT ON UPDATE RESTRICT -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Dumping data for table `course` --- - -LOCK TABLES `course` WRITE; -/*!40000 ALTER TABLE `course` DISABLE KEYS */; -INSERT INTO `course` VALUES (1,NULL,NULL,'java'),(2,NULL,NULL,'数据库'),(3,NULL,NULL,'c语言'); -/*!40000 ALTER TABLE `course` ENABLE KEYS */; -UNLOCK TABLES; - --- --- Table structure for table `score` --- - -DROP TABLE IF EXISTS `score`; -/*!40101 SET @saved_cs_client = @@character_set_client */; - SET character_set_client = utf8mb4 ; -CREATE TABLE `score` ( - `sco_id` int(11) NOT NULL, - `stu_id` int(11) DEFAULT NULL, - `sco_name` char(255) NOT NULL, - PRIMARY KEY (`sco_id`), - KEY `FK_xueshengcha` (`stu_id`), - CONSTRAINT `FK_xueshengcha` FOREIGN KEY (`stu_id`) REFERENCES `student` (`stu_id`) ON DELETE RESTRICT ON UPDATE RESTRICT -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Dumping data for table `score` --- - -LOCK TABLES `score` WRITE; -/*!40000 ALTER TABLE `score` DISABLE KEYS */; -INSERT INTO `score` VALUES (1,NULL,'99'),(2,NULL,'98'),(3,NULL,'97'); -/*!40000 ALTER TABLE `score` ENABLE KEYS */; -UNLOCK TABLES; - --- --- Table structure for table `student` --- - -DROP TABLE IF EXISTS `student`; -/*!40101 SET @saved_cs_client = @@character_set_client */; - SET character_set_client = utf8mb4 ; -CREATE TABLE `student` ( - `stu_id` int(11) NOT NULL, - `role_id` int(11) DEFAULT NULL, - `class_id` int(11) DEFAULT NULL, - `stu_name` char(255) NOT NULL, - PRIMARY KEY (`stu_id`), - KEY `FK_cha` (`role_id`), - KEY `FK_xueshengfenpeibanji` (`class_id`), - CONSTRAINT `FK_cha` FOREIGN KEY (`role_id`) REFERENCES `t_role` (`role_id`) ON DELETE RESTRICT ON UPDATE RESTRICT, - CONSTRAINT `FK_xueshengfenpeibanji` FOREIGN KEY (`class_id`) REFERENCES `class` (`class_id`) ON DELETE RESTRICT ON UPDATE RESTRICT -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Dumping data for table `student` --- - -LOCK TABLES `student` WRITE; -/*!40000 ALTER TABLE `student` DISABLE KEYS */; -INSERT INTO `student` VALUES (1,NULL,NULL,'张三'),(2,NULL,NULL,'李四'),(3,NULL,NULL,'王五'); -/*!40000 ALTER TABLE `student` ENABLE KEYS */; -UNLOCK TABLES; - --- --- Table structure for table `t_permision` --- - -DROP TABLE IF EXISTS `t_permision`; -/*!40101 SET @saved_cs_client = @@character_set_client */; - SET character_set_client = utf8mb4 ; -CREATE TABLE `t_permision` ( - `per_id` int(11) NOT NULL, - `per_name` char(255) NOT NULL, - PRIMARY KEY (`per_id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Dumping data for table `t_permision` --- - -LOCK TABLES `t_permision` WRITE; -/*!40000 ALTER TABLE `t_permision` DISABLE KEYS */; -INSERT INTO `t_permision` VALUES (1,'成绩查询'),(2,'添加成绩'),(3,'修改成绩'),(4,'查看成绩'); -/*!40000 ALTER TABLE `t_permision` ENABLE KEYS */; -UNLOCK TABLES; - --- --- Table structure for table `t_role` --- - -DROP TABLE IF EXISTS `t_role`; -/*!40101 SET @saved_cs_client = @@character_set_client */; - SET character_set_client = utf8mb4 ; -CREATE TABLE `t_role` ( - `role_id` int(11) NOT NULL, - `per_id` int(11) DEFAULT NULL, - `role_name` char(255) NOT NULL, - PRIMARY KEY (`role_id`), - KEY `FK_per_fenpei` (`per_id`), - CONSTRAINT `FK_per_fenpei` FOREIGN KEY (`per_id`) REFERENCES `t_permision` (`per_id`) ON DELETE RESTRICT ON UPDATE RESTRICT -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Dumping data for table `t_role` --- - -LOCK TABLES `t_role` WRITE; -/*!40000 ALTER TABLE `t_role` DISABLE KEYS */; -INSERT INTO `t_role` VALUES (1,NULL,'java'),(2,NULL,'数据库'),(3,NULL,'c语言'); -/*!40000 ALTER TABLE `t_role` ENABLE KEYS */; -UNLOCK TABLES; - --- --- Table structure for table `teacher` --- - -DROP TABLE IF EXISTS `teacher`; -/*!40101 SET @saved_cs_client = @@character_set_client */; - SET character_set_client = utf8mb4 ; -CREATE TABLE `teacher` ( - `tec_id` int(11) NOT NULL, - `role_id` int(11) DEFAULT NULL, - `cour_id` int(11) DEFAULT NULL, - `tec_name` char(255) NOT NULL, - PRIMARY KEY (`tec_id`), - KEY `FK_jiaosfenpeikec` (`cour_id`), - KEY `FK_tianxiugai` (`role_id`), - CONSTRAINT `FK_jiaosfenpeikec` FOREIGN KEY (`cour_id`) REFERENCES `course` (`cour_id`) ON DELETE RESTRICT ON UPDATE RESTRICT, - CONSTRAINT `FK_tianxiugai` FOREIGN KEY (`role_id`) REFERENCES `t_role` (`role_id`) ON DELETE RESTRICT ON UPDATE RESTRICT -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Dumping data for table `teacher` --- - -LOCK TABLES `teacher` WRITE; -/*!40000 ALTER TABLE `teacher` DISABLE KEYS */; -INSERT INTO `teacher` VALUES (1,NULL,NULL,'小红'),(2,NULL,NULL,'小明'),(3,NULL,NULL,'小何'); -/*!40000 ALTER TABLE `teacher` ENABLE KEYS */; -UNLOCK TABLES; -/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; - -/*!40101 SET SQL_MODE=@OLD_SQL_MODE */; -/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; -/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; -/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; -/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; -/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; -/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; - --- Dump completed on 2024-09-08 21:17:41 diff --git "a/\345\207\241\345\205\211\344\271\220/\346\240\241\345\233\255\347\256\241\347\220\206\347\263\273\347\273\237\346\234\254\345\234\260\346\250\241\345\236\213.png" "b/\345\207\241\345\205\211\344\271\220/\346\240\241\345\233\255\347\256\241\347\220\206\347\263\273\347\273\237\346\234\254\345\234\260\346\250\241\345\236\213.png" deleted file mode 100644 index bb1f17b916c62c6fe71309cacef0b7bf95f427bf..0000000000000000000000000000000000000000 Binary files "a/\345\207\241\345\205\211\344\271\220/\346\240\241\345\233\255\347\256\241\347\220\206\347\263\273\347\273\237\346\234\254\345\234\260\346\250\241\345\236\213.png" and /dev/null differ diff --git "a/\345\207\241\345\205\211\344\271\220/\346\240\241\345\233\255\347\256\241\347\220\206\347\263\273\347\273\237\346\246\202\345\277\265\346\250\241\345\236\213.png" "b/\345\207\241\345\205\211\344\271\220/\346\240\241\345\233\255\347\256\241\347\220\206\347\263\273\347\273\237\346\246\202\345\277\265\346\250\241\345\236\213.png" deleted file mode 100644 index ef70f863a4aeb6b4593c5552edb83261bf3c9ab5..0000000000000000000000000000000000000000 Binary files "a/\345\207\241\345\205\211\344\271\220/\346\240\241\345\233\255\347\256\241\347\220\206\347\263\273\347\273\237\346\246\202\345\277\265\346\250\241\345\236\213.png" and /dev/null differ diff --git "a/\345\207\241\345\205\211\344\271\220/\346\240\241\345\233\255\347\256\241\347\220\206\347\263\273\347\273\237\347\211\251\347\220\206\346\250\241\345\236\213.png" "b/\345\207\241\345\205\211\344\271\220/\346\240\241\345\233\255\347\256\241\347\220\206\347\263\273\347\273\237\347\211\251\347\220\206\346\250\241\345\236\213.png" deleted file mode 100644 index b983cc6d66fbe227003694a7f1308fbed41cdf35..0000000000000000000000000000000000000000 Binary files "a/\345\207\241\345\205\211\344\271\220/\346\240\241\345\233\255\347\256\241\347\220\206\347\263\273\347\273\237\347\211\251\347\220\206\346\250\241\345\236\213.png" and /dev/null differ