From 6509ca83551cf20ec65608dd7f7b4bd714dea82a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E5=8F=91=E6=A7=90?= <11785178+wmm1004lsp@user.noreply.gitee.com> Date: Tue, 12 Sep 2023 04:09:44 +0000 Subject: [PATCH 1/2] =?UTF-8?q?52=20=E7=8E=8B=E5=8F=91=E6=A7=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 王发槐 <11785178+wmm1004lsp@user.noreply.gitee.com> --- .../2023-9.11.md" | 82 +++++++++++++++++++ 1 file changed, 82 insertions(+) create mode 100644 "52 \347\216\213\345\217\221\346\247\220/2023-9.11.md" diff --git "a/52 \347\216\213\345\217\221\346\247\220/2023-9.11.md" "b/52 \347\216\213\345\217\221\346\247\220/2023-9.11.md" new file mode 100644 index 0000000..933b8ac --- /dev/null +++ "b/52 \347\216\213\345\217\221\346\247\220/2023-9.11.md" @@ -0,0 +1,82 @@ +~~~SQL + +CREATE DATABASE dianying CHARSET utf8; +use dianying; +/*==============================================================*/ +/* DBMS name: MySQL 5.0 */ +/* Created on: 2023/9/12 10:41:02 */ +/*==============================================================*/ + + +drop table if exists Filmcritics; + +drop table if exists film; + +drop table if exists movietype; + +/*==============================================================*/ +/* Table: Filmcritics */ +/*==============================================================*/ +create table Filmcritics +( + ID int, + Username varchar(20) not null, + filmname varchar(20) not null, + Usercomments varchar(20) not null, + moviename varchar(20) not null, + primary key (Username) +); + +INSERT into Filmcritics (ID,Username,filmname,Usercomments,moviename) VALUES +(1,'小李','奥本海默','看之前以为奥本海默,看完才意识到他其','奥本海默'), +(2,'小王','小李飞刀','“有一天,当他们对你的惩罚足够多时','小李飞刀'), +(3,'小猪','奥本海默','又白又男又有点好看,。','奥本海默'), +(4,'朱碧池','过往人生','全片最喜欢的三段 ','过往人生'), +(5,'王总','牛栏山的故事','从没看过一部电影','牛栏山的故事'), +(6,'刘总','星际穿越','三小时听力考试','星际穿越'); + +/*==============================================================*/ +/* Table: film */ +/*==============================================================*/ +create table film +( + filmname varchar(20) not null, + type varchar(6) not null, + Showtime time not null, + Duratioofplayback time not null, + language varchar(2) not null, + directorname varchar(20) not null, + screenwriter varchar(20) not null, + actorname varchar(20) not null, + filmtype varchar(6) not null, + primary key (filmname) +); +INSERT into film (filmname,type,Showtime,Duratioofplayback,language,directorname,screenwriter,actorname,filmtype) VALUES +('奥本海默' ,'英语' ,'02:20:23' ,'02:01:29' ,'英语' ,'奥本海默' ,'奥本海默' ,'奥本海默', '戏剧'), +('牛栏山的故事' ,'汉语', '19:29:15' ,'01:29:30' ,'汉语' ,'大鹏' ,'大鹏' ,'大鹏' ,'喜剧'); + +/*==============================================================*/ +/* Table: movietype */ +/*==============================================================*/ +create table movietype +( + type varchar(6) not null, + primary key (type) +); +INSERT into movietype (type) VALUES +('汉语'), +('英语'), +('韩语'); + + +alter table Filmcritics add constraint FK_comments foreign key (filmname) + references film (filmname) on delete restrict on update restrict; + +alter table film add constraint FK_relationship foreign key (type) + references movietype (type) on delete restrict on update restrict; + + + +``` +~~~ + -- Gitee From 0f24f6dac4a7660c0c3486bc133e5177b41740c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E5=8F=91=E6=A7=90?= <11785178+wmm1004lsp@user.noreply.gitee.com> Date: Tue, 12 Sep 2023 04:20:18 +0000 Subject: [PATCH 2/2] =?UTF-8?q?=E5=88=A0=E9=99=A4=E6=96=87=E4=BB=B6=2052?= =?UTF-8?q?=20=E7=8E=8B=E5=8F=91=E6=A7=90/2023-9.11.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../2023-9.11.md" | 82 ------------------- 1 file changed, 82 deletions(-) delete mode 100644 "52 \347\216\213\345\217\221\346\247\220/2023-9.11.md" diff --git "a/52 \347\216\213\345\217\221\346\247\220/2023-9.11.md" "b/52 \347\216\213\345\217\221\346\247\220/2023-9.11.md" deleted file mode 100644 index 933b8ac..0000000 --- "a/52 \347\216\213\345\217\221\346\247\220/2023-9.11.md" +++ /dev/null @@ -1,82 +0,0 @@ -~~~SQL - -CREATE DATABASE dianying CHARSET utf8; -use dianying; -/*==============================================================*/ -/* DBMS name: MySQL 5.0 */ -/* Created on: 2023/9/12 10:41:02 */ -/*==============================================================*/ - - -drop table if exists Filmcritics; - -drop table if exists film; - -drop table if exists movietype; - -/*==============================================================*/ -/* Table: Filmcritics */ -/*==============================================================*/ -create table Filmcritics -( - ID int, - Username varchar(20) not null, - filmname varchar(20) not null, - Usercomments varchar(20) not null, - moviename varchar(20) not null, - primary key (Username) -); - -INSERT into Filmcritics (ID,Username,filmname,Usercomments,moviename) VALUES -(1,'小李','奥本海默','看之前以为奥本海默,看完才意识到他其','奥本海默'), -(2,'小王','小李飞刀','“有一天,当他们对你的惩罚足够多时','小李飞刀'), -(3,'小猪','奥本海默','又白又男又有点好看,。','奥本海默'), -(4,'朱碧池','过往人生','全片最喜欢的三段 ','过往人生'), -(5,'王总','牛栏山的故事','从没看过一部电影','牛栏山的故事'), -(6,'刘总','星际穿越','三小时听力考试','星际穿越'); - -/*==============================================================*/ -/* Table: film */ -/*==============================================================*/ -create table film -( - filmname varchar(20) not null, - type varchar(6) not null, - Showtime time not null, - Duratioofplayback time not null, - language varchar(2) not null, - directorname varchar(20) not null, - screenwriter varchar(20) not null, - actorname varchar(20) not null, - filmtype varchar(6) not null, - primary key (filmname) -); -INSERT into film (filmname,type,Showtime,Duratioofplayback,language,directorname,screenwriter,actorname,filmtype) VALUES -('奥本海默' ,'英语' ,'02:20:23' ,'02:01:29' ,'英语' ,'奥本海默' ,'奥本海默' ,'奥本海默', '戏剧'), -('牛栏山的故事' ,'汉语', '19:29:15' ,'01:29:30' ,'汉语' ,'大鹏' ,'大鹏' ,'大鹏' ,'喜剧'); - -/*==============================================================*/ -/* Table: movietype */ -/*==============================================================*/ -create table movietype -( - type varchar(6) not null, - primary key (type) -); -INSERT into movietype (type) VALUES -('汉语'), -('英语'), -('韩语'); - - -alter table Filmcritics add constraint FK_comments foreign key (filmname) - references film (filmname) on delete restrict on update restrict; - -alter table film add constraint FK_relationship foreign key (type) - references movietype (type) on delete restrict on update restrict; - - - -``` -~~~ - -- Gitee