From 1644d362e5247c2863dc3fe4dce68751fd568aa7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E6=98=8E=E5=81=A5?= <2161737470@qq.com> Date: Thu, 7 Sep 2023 11:02:52 +0800 Subject: [PATCH] =?UTF-8?q?=E7=AC=AC=E4=BA=8C=E6=AC=A1=E7=AC=94=E8=AE=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...46\344\271\240\350\267\257\347\272\277.md" | 33 ++++ ...56\345\272\223\345\205\263\347\263\273.md" | 150 ++++++++++++++++++ 2 files changed, 183 insertions(+) create mode 100644 "04 \346\235\216\346\230\216\345\201\245/20230905 \345\244\247\344\272\214java\345\255\246\344\271\240\350\267\257\347\272\277.md" create mode 100644 "04 \346\235\216\346\230\216\345\201\245/20230907 \346\225\260\346\215\256\345\272\223\345\205\263\347\263\273.md" diff --git "a/04 \346\235\216\346\230\216\345\201\245/20230905 \345\244\247\344\272\214java\345\255\246\344\271\240\350\267\257\347\272\277.md" "b/04 \346\235\216\346\230\216\345\201\245/20230905 \345\244\247\344\272\214java\345\255\246\344\271\240\350\267\257\347\272\277.md" new file mode 100644 index 0000000..b3f9a24 --- /dev/null +++ "b/04 \346\235\216\346\230\216\345\201\245/20230905 \345\244\247\344\272\214java\345\255\246\344\271\240\350\267\257\347\272\277.md" @@ -0,0 +1,33 @@ +## 大二学习路线 + +### 大二上学期 + +#### 1. MySQL进阶(存储引擎、索引、SQL优化、存储过程、锁) + +#### 2. JavaScript (Ajax) + +#### 3. MVC框架(Maven,Spring,SpringMVC,MyBatis) + +### 大二下学期 + +#### 4. Node.js + +#### 5. Vue.js + +#### 6. SpringBoot (Redis,WebAPI) + +### 实训 + +#### 1.Linux 服务器 + +#### 2.中间件(项目中可能实现的技术) + +#### 3.小程序 ,uniapp移动端开发 + +### 技术栈: + +​ **一个项目需要用什么技术实现,可以称为技术栈。** + +### 技能数: + +​ **一个人具备的技能,称为技能树。** \ No newline at end of file diff --git "a/04 \346\235\216\346\230\216\345\201\245/20230907 \346\225\260\346\215\256\345\272\223\345\205\263\347\263\273.md" "b/04 \346\235\216\346\230\216\345\201\245/20230907 \346\225\260\346\215\256\345\272\223\345\205\263\347\263\273.md" new file mode 100644 index 0000000..7bb78fd --- /dev/null +++ "b/04 \346\235\216\346\230\216\345\201\245/20230907 \346\225\260\346\215\256\345\272\223\345\205\263\347\263\273.md" @@ -0,0 +1,150 @@ +### 数据库关系 + +#### 1.关系是相互的 + +​ 比如,一个学生,可以选多个课程;一个课程可以被多个学生选,必须引用第三张表 + +#### 2.表之间的关系 + +1. 一对一:将其中任一表中的主键,放到另一张表当外键 +2. 一对多:将一所在的表的主键,放在多的表当外键 +3. 多对多:必须有第三张表,将前面两个表的主键放进来当外键 + +#### 3.ER图 + +​ ER图:实体关系图,简称E-R,用于显示实体集之间的关系。它提供了一种表示实体类型、属性、联系的方法。 + +​ ER图三要素:实体、属性、联系 + +#### 作业 + +~~~ mysql +# 创建学生数据库 +create database student charset utf8; +use student; + +# 创建院系表 +create table college( + co_id int primary key, + co_name varchar(50) not null +); +# 插入数据 +insert into college values +(1,"软件工程学院"), +(2,"财经商贸学院"), +(3,"信息工程学院"), +(4,"智能制造学院"); + +# 创建专业表 +create table major( + m_id int primary key, + m_name varchar(20) not null, + co_id int, + foreign key(co_id) references college(co_id) +); +# 插入数据 +insert into major values +(1,"前端开发",1), +(2,"后端开发",1), +(3,"人力财务管理",2), +(4,"大数据技术",3), +(5,"电气自动化技术",4); + +# 创建班级表 +create table class( + c_id int primary key, + c_name varchar(20) not null, + m_id int, + foreign key(m_id) references major(m_id) +); +# 插入数据 +insert into class values +(1,"软件技术2班",2), +(2,"软件技术7班",1), +(3,"人力财务管理1班",3), +(4,"大数据技术4班",4), +(5,"电气自动化技术3班",5); + +# 创建学生表 +create table student( + s_id int primary key, + s_name varchar(10) not null, + sex varchar(2) not null, + c_id int, + foreign key(c_id) references class(c_id) +); +# 插入数据 +insert into student values +(1,"卢亨耀","男",1), +(2,"李堔义","男",2), +(3,"王小丽","女",3), +(4,"孙泽傲","男",4), +(5,"方蔼雅","男",5); + +# 创建课程信息表 +create table course_inf( + c_id int primary key, + c_name varchar(10) not null +); +# 插入数据 +insert into course_inf values +(1,"MySQL高级"), +(2,"javaScript"), +(3,"财务管理"), +(4,"大数据"), +(5,"电气自动化"); + +# 创建教室表 +create table classroom( + cr_id int primary key, + address varchar(20) not null +); +# 插入数据 +insert into classroom values +(1,"望云楼实训室8"), +(2,"望云楼实训室6"), +(3,"岩声楼305"), +(4,"辛耕楼204"), +(5,"辛耕楼105"); + + +# 创建教师表 +create table teacher( + t_id int primary key, + t_name varchar(5) not null, + sex varchar(2) not null, + co_id int, + foreign key(co_id) references college(co_id) +); +# 插入数据 +insert into teacher values +(001,"丘老师","男",1), +(002,"王老师","男",1), +(003,"黄老师","女",2), +(004,"徐老师","男",3), +(005,"李老师","女",4); + +# 创建课程表(中间表) +create table course( + c_id int, + cr_id int, + t_id int, + s_id int, + foreign key(c_id) references course_inf(c_id), + foreign key(cr_id) references classroom(cr_id), + foreign key(t_id) references teacher(t_id), + foreign key(s_id) references student(s_id) +); +# 插入数据 +insert into course values +(1,1,1,1), +(2,2,2,2), +(3,3,3,3), +(4,4,4,4), +(5,5,5,5); + +# 查询 +select * from college co,major m,class cl,student s ,course c,course_inf ci,classroom cr,teacher t where co.co_id=m.co_id and m.m_id=cl.m_id and cl.c_id=s.c_id and s.s_id=c.s_id and ci.c_id=c.c_id and cr.cr_id=c.cr_id and t.t_id=c.t_id; + +~~~ + -- Gitee