From 5e0b28073a61581ddd53c6b9c1b71ec8b695bfeb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BE=90=E5=85=88=E9=91=AB?= Date: Tue, 12 Sep 2023 03:39:58 +0000 Subject: [PATCH 1/3] zy MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 徐先鑫 --- .../2023.09.11 \345\244\215\344\271\240 .md" | 87 +++++++++++++++++++ 1 file changed, 87 insertions(+) create mode 100644 "53 \345\276\220\345\205\210\351\221\253/2023.09.11 \345\244\215\344\271\240 .md" diff --git "a/53 \345\276\220\345\205\210\351\221\253/2023.09.11 \345\244\215\344\271\240 .md" "b/53 \345\276\220\345\205\210\351\221\253/2023.09.11 \345\244\215\344\271\240 .md" new file mode 100644 index 0000000..eb8e0aa --- /dev/null +++ "b/53 \345\276\220\345\205\210\351\221\253/2023.09.11 \345\244\215\344\271\240 .md" @@ -0,0 +1,87 @@ +2023年9月11日 + +星期一 + +今日学习 + +学会需求分析 学作ER图 + +```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 a84eb7ea735d609270253384e074488fa52dee0a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BE=90=E5=85=88=E9=91=AB?= Date: Tue, 12 Sep 2023 04:17:56 +0000 Subject: [PATCH 2/3] =?UTF-8?q?=E5=88=A0=E9=99=A4=E6=96=87=E4=BB=B6=2053?= =?UTF-8?q?=20=E5=BE=90=E5=85=88=E9=91=AB/2023.09.11=20=20=E5=A4=8D?= =?UTF-8?q?=E4=B9=A0=20.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../2023.09.11 \345\244\215\344\271\240 .md" | 87 ------------------- 1 file changed, 87 deletions(-) delete mode 100644 "53 \345\276\220\345\205\210\351\221\253/2023.09.11 \345\244\215\344\271\240 .md" diff --git "a/53 \345\276\220\345\205\210\351\221\253/2023.09.11 \345\244\215\344\271\240 .md" "b/53 \345\276\220\345\205\210\351\221\253/2023.09.11 \345\244\215\344\271\240 .md" deleted file mode 100644 index eb8e0aa..0000000 --- "a/53 \345\276\220\345\205\210\351\221\253/2023.09.11 \345\244\215\344\271\240 .md" +++ /dev/null @@ -1,87 +0,0 @@ -2023年9月11日 - -星期一 - -今日学习 - -学会需求分析 学作ER图 - -```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 9538375da74b1d2fcb4495533fcbcddb21876a65 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BE=90=E5=85=88=E9=91=AB?= Date: Tue, 12 Sep 2023 05:15:48 +0000 Subject: [PATCH 3/3] =?UTF-8?q?=E4=BD=9C=E4=B8=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 徐先鑫 --- .../2023.09.11 \345\244\215\344\271\240 .md" | 87 +++++++++++++++++++ 1 file changed, 87 insertions(+) create mode 100644 "53 \345\276\220\345\205\210\351\221\253/2023.09.11 \345\244\215\344\271\240 .md" diff --git "a/53 \345\276\220\345\205\210\351\221\253/2023.09.11 \345\244\215\344\271\240 .md" "b/53 \345\276\220\345\205\210\351\221\253/2023.09.11 \345\244\215\344\271\240 .md" new file mode 100644 index 0000000..eb8e0aa --- /dev/null +++ "b/53 \345\276\220\345\205\210\351\221\253/2023.09.11 \345\244\215\344\271\240 .md" @@ -0,0 +1,87 @@ +2023年9月11日 + +星期一 + +今日学习 + +学会需求分析 学作ER图 + +```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