diff --git "a/18 \351\273\204\350\257\227\351\276\231/.keep" "b/18 \351\273\204\350\257\227\351\276\231/.keep" new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git "a/18 \351\273\204\350\257\227\351\276\231/20230904\347\254\224\350\256\260.md" "b/18 \351\273\204\350\257\227\351\276\231/20230904\347\254\224\350\256\260.md" new file mode 100644 index 0000000000000000000000000000000000000000..7b27b1bdb9d562eaa47c6e132398f1aab270a0db --- /dev/null +++ "b/18 \351\273\204\350\257\227\351\276\231/20230904\347\254\224\350\256\260.md" @@ -0,0 +1,7 @@ +9月4号笔记 +1公共课减少专业课增加,更好的提升专业知识,上招聘网站查看招聘需求,学习招聘相关技能提升录取概率。 +2可以更多的和他人交流沟通以此来提升自己的口才还人际关系 +3不能一味地依赖电脑来截图,上课要多做笔记多动手 +4网盘资料太多找不到可以用盘搜搜或者其他搜盘网站快速搜索 +5我们是学软件的程序员不要一味的充钱解决问题可以转变思维寻找其他免费的路径 +6CSDN里面有很多其他程序员的笔记不懂的可以到这里学习 diff --git "a/18 \351\273\204\350\257\227\351\276\231/20230905\347\254\224\350\256\260\345\222\214\344\275\234\344\270\232.md" "b/18 \351\273\204\350\257\227\351\276\231/20230905\347\254\224\350\256\260\345\222\214\344\275\234\344\270\232.md" new file mode 100644 index 0000000000000000000000000000000000000000..8216d6b8b9136b2d2c701031e1bcaf298d1a2126 --- /dev/null +++ "b/18 \351\273\204\350\257\227\351\276\231/20230905\347\254\224\350\256\260\345\222\214\344\275\234\344\270\232.md" @@ -0,0 +1,127 @@ +笔记 +表之间关系: +1一对一的关系:将其中任意一个表的主键放在另一个表中当外键 +2一对多的关系:将一的主键放在多的表中当外键 +3多对多的关系:必须第三张表,将前面两张表的主键放在第三张表当外键 +E-R图:实体关系图 三要素:实体,属性,关系 + +作业 + +sql +create DATABASE lw charset utf8; + +use lw; + +院系表 +create table college( +col_id int PRIMARY key, +col_name varchar(10) +); + +insert into college values +(1,'软件工程学院'); + + +专业表 +create table profe( +profe_id int PRIMARY key, +profe_name varchar(10), +col_id int, +FOREIGN key(col_id) REFERENCES college(col_id) +); + +insert into profe values +(1,'软件技术',1); + +班级表 +create table class( +class_id int PRIMARY key, +class_name varchar(10), +profe_id int, +FOREIGN key(profe_id) REFERENCES profe(profe_id) +); + +insert into class values +(1,'后端班',1), +(2,'前端班',1), +(3,'新媒体班',1); + + +学生表 +create table student( +student_id int PRIMARY key, +student_name varchar(10), +class_id int, +FOREIGN key(class_id) REFERENCES class(class_id) +); + +insert into student values +(1,'张三',1), +(2,'李四',2), +(3,'王五',3); + +课程 +create table couse( +couse_id int PRIMARY key, +couse_name varchar(10) +); + +insert into couse values +(1,'JAVA'), +(2,'MYSQL'), +(3,'C++'); + +选修表 +create table elec( +couse_id int, +couse int, +student_id int, +FOREIGN key(student_id) REFERENCES student(student_id), +FOREIGN key(couse_id) REFERENCES couse(couse_id) +); + + +insert into elec values +(1,90,1), +(2,100,2), +(3,95,3); + + +课程表 +create table kecheng( +kecheng_time varchar(10), +class_id int, +address varchar(20) PRIMARY key, +FOREIGN key(class_id) REFERENCES class(class_id) +); + + +insert into kecheng values +('星期一',2,'望云楼'), +('星期三',1,'良才楼'), +('星期五',3,'协成楼'); + +教师表 +create table teacher( +teacher_id int, +teacher_name varchar(10), +couse_id int, +FOREIGN key(couse_id) REFERENCES couse(couse_id) +); + +insert into teacher values +(1,'丘丘',1), +(2,'老吴',2), +(3,'六六',3); + +教室表 +create table address( +address_id int, +address varchar(20), +FOREIGN key(address) REFERENCES kecheng(address) +); + +insert into address values +(1,'望云楼'), +(2,'良才楼'), +(3,'协成楼');