diff --git "a/34\351\230\216\345\206\240\345\256\207/20230904 \345\274\200\345\255\246\347\254\254\344\270\200\350\257\276.md" "b/34\351\230\216\345\206\240\345\256\207/20230904 \345\274\200\345\255\246\347\254\254\344\270\200\350\257\276.md" new file mode 100644 index 0000000000000000000000000000000000000000..d7a7d279a01ac532d76ca9bf3ba29723c12f2ec6 --- /dev/null +++ "b/34\351\230\216\345\206\240\345\256\207/20230904 \345\274\200\345\255\246\347\254\254\344\270\200\350\257\276.md" @@ -0,0 +1,7 @@ +课堂笔记: + +一开始直接讲大二的学习任务,学习方向。在通关招聘平台介绍学习的内容。分学习小组,每个人讲一讲自己的暑假生活。 + +vip解析 + +盘盘搜 \ No newline at end of file diff --git "a/34\351\230\216\345\206\240\345\256\207/20230911 \347\224\265\345\275\261.md" "b/34\351\230\216\345\206\240\345\256\207/20230911 \347\224\265\345\275\261.md" new file mode 100644 index 0000000000000000000000000000000000000000..3f6c3afc5ea899a55af94a648d159e31c3aedd5e --- /dev/null +++ "b/34\351\230\216\345\206\240\345\256\207/20230911 \347\224\265\345\275\261.md" @@ -0,0 +1,160 @@ +### 笔记 + + 1.实体与实体之间可以有多个关系 + +2.ER图的使用 + + + +```mysql +/*==============================================================*/ +/* DBMS name: MySQL 5.0 */ +/* Created on: 2023/9/12 10:27:43 */ +/*==============================================================*/ +CREATE DATABASE movie charset utf8; +use movie; + +drop table if exists country; + +drop table if exists job; + +drop table if exists language; + +drop table if exists movieman; + +drop table if exists movie; + +drop table if exists movietype; + +drop table if exists review; + +/*==============================================================*/ +/* Table: country */ +/*==============================================================*/ +create table country +( + c_id char(10) not null, + m_id int, + c_name char(10) not null, + primary key (c_id) +); + +-- 插入数据 +INSERT INTO country +VALUES + ( 1, '1', '美国' ), + ( 2, '1', '韩国' ); + +/*==============================================================*/ +/* Table: job */ +/*==============================================================*/ +create table job +( + j_id int not null auto_increment, + m_id int, + j_name varchar(5) not null, + primary key (j_id) +); +INSERT INTO job +VALUES + ( 1, 1, '编剧' ), + ( 3, 1, '主演' ), + ( 2, 1, '导演' ); +/*==============================================================*/ +/* Table: language */ +/*==============================================================*/ +create table language +( + l_id int not null auto_increment, + m_id int, + l_name varchar(5) not null, + primary key (l_id) +); +INSERT INTO LANGUAGE +VALUES + ( 1, 1, '英语' ), + ( 2, 1, '韩语' ); +/*==============================================================*/ +/* Table: moiveman */ +/*==============================================================*/ +create table movieman +( + mp_id int not null auto_increment, + j_id int, + mp_name varchar(10) not null, + primary key (mp_id) +); +INSERT INTO movieman +VALUES + ( NULL, 1, '席琳.宋' ), + ( NULL, 2, '席琳.宋' ), + ( NULL, 3, '格蕾塔.李' ), + ( NULL, 3, '刘台午' ), + ( NULL, 3, '约翰.马加罗' ), + ( NULL, 3, '文胜雅' ), + ( NULL, 3, '尹智慧' ); +/*==============================================================*/ +/* Table: movie */ +/*==============================================================*/ +create table movie +( + m_id int not null auto_increment, + m_name varchar(10) not null, + m_time varchar(5) not null, + m_otname varchar(20) not null, + m_opentime date not null, + IMDB varchar(10) not null, + primary key (m_id) +); +INSERT INTO `movie`.`movie` ( `m_id`, `m_name`, `m_time`, `m_otname`, `m_opentime`, `IMDB` ) +VALUES + ( 1, '过往人生', '106分钟', '前世因缘', '2023-06-02', 'tt13238346' ); +/*==============================================================*/ +/* Table: movietype */ +/*==============================================================*/ +create table movietype +( + mt_id int not null auto_increment, + m_id int, + mt_name varchar(10) not null, + primary key (mt_id) +); +INSERT INTO movietype +VALUES + ( 1, 1, '剧情/爱情' ); +/*==============================================================*/ +/* Table: review */ +/*==============================================================*/ +create table review +( + r_id int not null auto_increment, + r_name varchar(10) not null, + m_id int, + r_a varchar(200) not null, + primary key (r_id) +); +INSERT INTO review +VALUES + ( 1, '烤芬', 1, '符合预期的A24小布尔乔亚电影,前三分之二都挺无聊,但最终确实成功抵达了某些具体的隐痛。我看 Hae Sung 并不是个具体的人,而是象征故土的引诱:在移民的历程里,故土犹如童年的爱人在寂寞时给予陪伴、反复召唤你的回归、描绘与他可以随时重建某种更亲密关系的可能、暗示你们的联系才是更本真更深刻的;因此,移民在一生中要周期性与故土诀别,并每次都为诀别所伤。观看途中我一直在想四年级时全家移民加拿大的小学' ), + ( 2, 'Seb’s', 1, '感觉男主更多是女主东亚identity的symbol,女主移民两次,不可能抛下一切回到故土,都为了绿卡提早结婚了诶,但本源文化又一直在那里,真遇到也会舒适。男主真的好东亚啊,咱东亚人地铁上手可以精确到0.001毫米不碰到一起,临行可以深情对望108分钟,初恋可以记着20多年,苦笑着说加班不给钱,指了指自己的脑袋说我精神很强大,东亚人有点苦' ), + ( 3, '十二辰子', 1, '想想自己都没有这样一个可以永远怀念的人,也真是有点遗憾啊' ); + +alter table country add constraint FK_Relationship_5 foreign key (m_id) + references movie (m_id) on delete restrict on update restrict; + +alter table job add constraint FK_Relationship_3 foreign key (m_id) + references movie (m_id) on delete restrict on update restrict; + +alter table language add constraint FK_Relationship_4 foreign key (m_id) + references movie (m_id) on delete restrict on update restrict; + +alter table moiveman add constraint FK_Relationship_1 foreign key (j_id) + references job (j_id) on delete restrict on update restrict; + +alter table movietype add constraint FK_Relationship_2 foreign key (m_id) + references movie (m_id) on delete restrict on update restrict; + +alter table review add constraint FK_Relationship_6 foreign key (m_id) + references movie (m_id) on delete restrict on update restrict; +``` +