From c6cc645bb8a65a83e771f91a828176dd5a06bc70 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?16=20=E9=98=99=E8=8B=8F=E6=96=87?= <2361635242@qq.com> Date: Tue, 12 Sep 2023 19:06:48 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BD=9C=E4=B8=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...\347\263\273\347\273\237er\345\233\276.md" | 146 ++++++++++++++++++ ...41\347\220\206\347\263\273\347\273\237.md" | 0 2 files changed, 146 insertions(+) create mode 100644 "16 \351\230\231\350\213\217\346\226\207/20230912\347\224\265\345\275\261\347\263\273\347\273\237er\345\233\276.md" rename "16 \351\230\231\350\213\217\346\226\207/\345\233\276\344\271\246\347\256\241\347\220\206\347\263\273\347\273\237.md" => "16 \351\230\231\350\213\217\346\226\207/\347\254\254\344\270\211\346\254\241\344\275\234\344\270\232\345\233\276\344\271\246\347\256\241\347\220\206\347\263\273\347\273\237.md" (100%) diff --git "a/16 \351\230\231\350\213\217\346\226\207/20230912\347\224\265\345\275\261\347\263\273\347\273\237er\345\233\276.md" "b/16 \351\230\231\350\213\217\346\226\207/20230912\347\224\265\345\275\261\347\263\273\347\273\237er\345\233\276.md" new file mode 100644 index 0000000..a63137b --- /dev/null +++ "b/16 \351\230\231\350\213\217\346\226\207/20230912\347\224\265\345\275\261\347\263\273\347\273\237er\345\233\276.md" @@ -0,0 +1,146 @@ +![屏幕截图 2023-09-12 190051](https://s2.loli.net/2023/09/12/YDnb3xZvwmM258z.png) + +![屏幕截图 2023-09-12 190221](https://s2.loli.net/2023/09/12/yiR5D4sTdkVwMAN.png) + +![屏幕截图 2023-09-12 190244](https://s2.loli.net/2023/09/12/BKOGZ5gfSk7qU2D.png) + +```mysql +/*==============================================================*/ +/* DBMS name: MySQL 5.0 */ +/* Created on: 2023/9/12 18:53:12 */ +/*==============================================================*/ + +CREATE DATABASE film charset utf8; +use film; + +drop table if exists evaluate; + +drop table if exists film; + +drop table if exists make; + +drop table if exists member; + +drop table if exists ranking; + +drop table if exists silce; + +drop table if exists speech; + +drop table if exists type; + +/*==============================================================*/ +/* Table: evaluate */ +/*==============================================================*/ +create table evaluate +( + eva_id int not null auto_increment, + eva_title varchar(10) not null, + eva_content varchar(100) not null, + primary key (eva_id) +); + +/*==============================================================*/ +/* Table: film */ +/*==============================================================*/ +create table film +( + film_id int not null auto_increment, + sp_id int not null, + type_id int not null, + eva_id int not null, + film_name varchar(10) not null, + film_date date not null, + film_length int not null, + film_score int not null, + film_brief varchar(50) not null, + primary key (film_id) +); + +/*==============================================================*/ +/* Table: make */ +/*==============================================================*/ +create table make +( + film_id int not null, + member_id int not null, + primary key (film_id, member_id) +); + +/*==============================================================*/ +/* Table: member */ +/*==============================================================*/ +create table member +( + member_id int not null auto_increment, + member_name varchar(10) not null, + member_sex char(1) not null, + member_age int not null, + primary key (member_id) +); + +/*==============================================================*/ +/* Table: ranking */ +/*==============================================================*/ +create table ranking +( + film_id int not null, + silce_id int not null, + primary key (film_id, silce_id) +); + +/*==============================================================*/ +/* Table: silce */ +/*==============================================================*/ +create table silce +( + silce_id int not null auto_increment, + silce_name varchar(10) not null, + silce_ranking int not null, + primary key (silce_id) +); + +/*==============================================================*/ +/* Table: speech */ +/*==============================================================*/ +create table speech +( + sp_id int not null, + sp_name varchar(10) not null, + primary key (sp_id) +); + +/*==============================================================*/ +/* Table: type */ +/*==============================================================*/ +create table type +( + type_id int not null auto_increment, + type_name varchar(10) not null, + primary key (type_id) +); + +alter table film add constraint FK_evaluate foreign key (eva_id) + references evaluate (eva_id) on delete restrict on update restrict; + +alter table film add constraint FK_language foreign key (sp_id) + references speech (sp_id) on delete restrict on update restrict; + +alter table film add constraint FK_serial foreign key (type_id) + references type (type_id) on delete restrict on update restrict; + +alter table make add constraint FK_make foreign key (film_id) + references film (film_id) on delete restrict on update restrict; + +alter table make add constraint FK_make2 foreign key (member_id) + references member (member_id) on delete restrict on update restrict; + +alter table ranking add constraint FK_ranking foreign key (film_id) + references film (film_id) on delete restrict on update restrict; + +alter table ranking add constraint FK_ranking2 foreign key (silce_id) + references silce (silce_id) on delete restrict on update restrict; + + +``` + diff --git "a/16 \351\230\231\350\213\217\346\226\207/\345\233\276\344\271\246\347\256\241\347\220\206\347\263\273\347\273\237.md" "b/16 \351\230\231\350\213\217\346\226\207/\347\254\254\344\270\211\346\254\241\344\275\234\344\270\232\345\233\276\344\271\246\347\256\241\347\220\206\347\263\273\347\273\237.md" similarity index 100% rename from "16 \351\230\231\350\213\217\346\226\207/\345\233\276\344\271\246\347\256\241\347\220\206\347\263\273\347\273\237.md" rename to "16 \351\230\231\350\213\217\346\226\207/\347\254\254\344\270\211\346\254\241\344\275\234\344\270\232\345\233\276\344\271\246\347\256\241\347\220\206\347\263\273\347\273\237.md" -- Gitee