From d65b6f9e755f4f6f36aa7937c6c0a750ac76433a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E5=AE=87=E8=BE=89?= <2696103916@qq.com> Date: Tue, 12 Sep 2023 05:15:06 +0000 Subject: [PATCH] =?UTF-8?q?=E9=99=88=E5=AE=87=E8=BE=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 陈宇辉 <2696103916@qq.com> --- .../20230911\350\261\206\347\223\243.md" | 209 ++++++++++++++++++ 1 file changed, 209 insertions(+) create mode 100644 "59 \351\231\210\345\256\207\350\276\211/20230911\350\261\206\347\223\243.md" diff --git "a/59 \351\231\210\345\256\207\350\276\211/20230911\350\261\206\347\223\243.md" "b/59 \351\231\210\345\256\207\350\276\211/20230911\350\261\206\347\223\243.md" new file mode 100644 index 0000000..585847c --- /dev/null +++ "b/59 \351\231\210\345\256\207\350\276\211/20230911\350\261\206\347\223\243.md" @@ -0,0 +1,209 @@ +**笔记** + +今天老师讲了他的大学所经历的一些趣事,但从中也让我们明白我们应该把握当下,珍惜美好的大学时光,趁年轻,应该敢拼敢闯 + +```mysql +/*==============================================================*/ +/* DBMS name: MySQL 5.0 */ +/* Created on: 2023/9/12 12:38:18 */ +/*==============================================================*/ + CREATE DATABASE DOUBAN charset utf8; + use DOUBAN; + +drop table if exists Relationship_2; + +drop table if exists Relationship_4; + +drop table if exists actor; + +drop table if exists audience; + +drop table if exists director; + +drop table if exists film; + +drop table if exists sort; + +drop table if exists state; + +/*==============================================================*/ +/* Table: Relationship_2 */ +/*==============================================================*/ +create table Relationship_2 +( + ac_id char(10) not null, + dir_id int not null, + au_id int not null, + f_id int not null, + sort_id int not null, + show_date char(11) not null, + f_date int not null, + f_alias char(11), + score decimal(2,1) not null, + f_intro char(100) not null, + primary key (ac_id, dir_id) +); + +/*==============================================================*/ +/* Table: Relationship_4 */ +/*==============================================================*/ +create table Relationship_4 +( + au_id int not null, + f_id int not null, + primary key (au_id, f_id) +); + +/*==============================================================*/ +/* Table: actor */ +/*==============================================================*/ +create table actor +( + ac_id char(10) not null, + ac_name char(10) not null, + primary key (ac_id) +); + +/*==============================================================*/ +/* Table: audience */ +/*==============================================================*/ +create table audience +( + au_id int not null auto_increment, + au_name char(4) not null, + au_evaluate char(100) not null, + primary key (au_id) +); + +/*==============================================================*/ +/* Table: director */ +/*==============================================================*/ +create table director +( + dir_id int not null auto_increment, + state_id int, + dir_name char(8) not null, + primary key (dir_id) +); + +/*==============================================================*/ +/* Table: film */ +/*==============================================================*/ +create table film +( + f_id int not null auto_increment, + f_name char(20), + primary key (f_id) +); + +/*==============================================================*/ +/* Table: sort */ +/*==============================================================*/ +create table sort +( + sort_id int not null auto_increment, + sort_name char(8) not null, + primary key (sort_id) +); + +/*==============================================================*/ +/* Table: state */ +/*==============================================================*/ +create table state +( + state_id int not null auto_increment, + state_name char(8) not null, + language char(8) not null, + primary key (state_id) +); + +alter table Relationship_2 add constraint FK_Relationship_2 foreign key (ac_id) + references actor (ac_id) on delete restrict on update restrict; + +alter table Relationship_2 add constraint FK_Relationship_3 foreign key (dir_id) + references director (dir_id) on delete restrict on update restrict; + +alter table Relationship_2 add constraint FK_Relationship_6 foreign key (au_id, f_id) + references Relationship_4 (au_id, f_id) on delete restrict on update restrict; + +alter table Relationship_2 add constraint FK_Relationship_7 foreign key (sort_id) + references sort (sort_id) on delete restrict on update restrict; + +alter table Relationship_4 add constraint FK_Relationship_4 foreign key (au_id) + references audience (au_id) on delete restrict on update restrict; + +alter table Relationship_4 add constraint FK_Relationship_5 foreign key (f_id) + references film (f_id) on delete restrict on update restrict; + +alter table director add constraint FK_Relationship_1 foreign key (state_id) + references state (state_id) on delete restrict on update restrict; + +-- 添加类别信息 +INSERT INTO sort VALUES +(1,"喜剧"), +(2,"剧情"), +(3,"惊悚"), +(4,"历史"), +(5,"传记"), +(6,"动漫"); + + +-- 添加制片国家信息 +insert into state VALUES +(1,"中国","中文"), +(2,"俄罗斯","俄语"), +(3,"美国","英语"), +(4,"韩国","韩语"), +(5,"小日本","日语"); + + +-- 添加导演信息 +insert into director VALUES +(1,2,"安东尼奥·卢基奇"), +(2,3,"伊丽莎白·班克斯"), +(3,3,"克里斯托弗·诺兰 "), +(4,1,"文牧野"), +(5,4,"黄东赫"); + +-- 添加演员信息 +insert into actor VALUES +(1,"凯丽·拉塞尔"), +(2,"基里安·墨菲"), +(3,"徐峥"), +(4,"Amil"), +(5,"孔刘"); + + +insert into film VALUES +(1,"交错卢森堡"), +(2,"熊嗨了"), +(3,"奥本海默"), +(4,"我不是药神"), +(5,"熔炉 "); + + +insert into audience VALUES +(1,"张三","语言思维不习惯,观念与我有冲突,没有很大共鸣。"), +(2,"李四","小妞电影式的人物写作与b级虐杀片的故事逻辑产生了奇妙的化学反应,删了格格不入的母女线多加两个来送的路人进来会更好看。"), +(3,"王五","随着战争阴云笼罩世界上空,各国紧锣密鼓抓紧军事竞赛。为了抢占先机,美国陆军中将莱斯利·格罗夫斯找到罗伯特·奥本海默,力荐其担任曼哈顿计划的首席科学家。"), +(4,"赵六","拿现实题材拍商业类型片,社会意义摆在那,群戏也处理得相当不错。对我们国家而言,这样的电影多一部是一部,走一步是一步。"), +(5,"狗蛋","我们愤怒的不仅是禽兽的行径,更是禽兽逍遥法外,正义无处伸张,无能为力才是最痛苦和绝望的。一个非常容易感动观众的题材,尤其还是真实事件改编"); + +insert into Relationship_4 VALUES +(1,1), +(2,2), +(3,3), +(4,4), +(5,5); + + +insert into Relationship_2 VALUES +(4,1,1,1,1,"2022-09-06 ",105,"卢森堡 ",7.4,"一对双胞胎兄弟听闻他们久未谋面的父亲在卢森堡抱恙,于是踏上了去见父亲最后一面的旅程。他们找到的男人会是他们记忆中的那个坏蛋父亲吗"), +(2,3,3,3,3," 2023-08-30",180,"Oppenheimer",8.8,"美国陆军中将莱斯利·格罗夫斯找到量子力学与核物理学领域的扛鼎人物罗伯特·奥本海默,力荐其担任曼哈顿计划的首席科学家。"), +(1,2,2,2,2,"2023-02-24 ",95," 可卡熊 ",5.6,"讲述一群警察、罪犯、游客和青少年全都聚集在美国乔治亚州的一座树林,树林中有一只将近230公斤重的顶级掠食者黑熊,吞食了一大堆可卡因,导致它野性大发、大开杀戒,血流成河。"), +(3,4,4,4,4,"2018-07-05 ",117,"中国药神 ",9.0,"普通中年男子程勇经营着一家保健品店,失意又失婚。不速之客吕受益的到来,让他开辟了一条去印度买药做“代购”的新事业,虽然困难重重,但他在这条“买药之路”上发现了商机"), +(5,5,5,5,5,"2011-09-22",105," 无声呐喊 ",9.4,"来自首尔的哑语美术老师仁浩(孔宥 饰)来到雾津,应聘慈爱聋哑人学校。天降大雾,他意外撞车,维修时邂逅了人权组织成员柔珍"); + + +``` + -- Gitee