From b38390da7872b23de8333d07c4376a3c6fc4d45c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=9F=A9=E9=9C=87=E6=B4=8B?= <11785166+hzyai77@user.noreply.gitee.com> Date: Wed, 13 Sep 2023 13:30:09 +0000 Subject: [PATCH] =?UTF-8?q?=E9=9F=A9=E9=9C=87=E6=B4=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 韩震洋 <11785166+hzyai77@user.noreply.gitee.com> --- ...46\351\246\206\345\256\214\346\225\264.md" | 433 ++++++++++++++++++ 1 file changed, 433 insertions(+) create mode 100644 "40 \351\237\251\351\234\207\346\264\213/20230913\345\233\276\344\271\246\351\246\206\345\256\214\346\225\264.md" diff --git "a/40 \351\237\251\351\234\207\346\264\213/20230913\345\233\276\344\271\246\351\246\206\345\256\214\346\225\264.md" "b/40 \351\237\251\351\234\207\346\264\213/20230913\345\233\276\344\271\246\351\246\206\345\256\214\346\225\264.md" new file mode 100644 index 0000000..6411366 --- /dev/null +++ "b/40 \351\237\251\351\234\207\346\264\213/20230913\345\233\276\344\271\246\351\246\206\345\256\214\346\225\264.md" @@ -0,0 +1,433 @@ +![](https://img1.imgtp.com/2023/09/13/g2UtAWUz.png) + + + +# 笔记 + +``` +用工具理清楚各主体的关系和属性 +一对多还是多对一 +利用软件powerdesigner +先生成概念数据模型 +后生成逻辑数据模型 +最后生成物理模型 +最后辅助生成代码 +``` + +# 作业 + +``` mysql +/* + Navicat Premium Data Transfer + + Source Server : kjin + Source Server Type : MySQL + Source Server Version : 50742 + Source Host : localhost:3306 + Source Schema : wy + + Target Server Type : MySQL + Target Server Version : 50742 + File Encoding : 65001 + + Date: 13/09/2023 21:20:35 +*/ + +SET NAMES utf8mb4; +SET FOREIGN_KEY_CHECKS = 0; + +-- ---------------------------- +-- Table structure for actor +-- ---------------------------- +DROP TABLE IF EXISTS `actor`; +CREATE TABLE `actor` ( + `m_id` varchar(14) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, + `a_id` int(11) NOT NULL, + PRIMARY KEY (`m_id`, `a_id`) USING BTREE, + INDEX `FK_actor2`(`a_id`) USING BTREE, + CONSTRAINT `FK_actor` FOREIGN KEY (`m_id`) REFERENCES `movie` (`m_id`) ON DELETE RESTRICT ON UPDATE RESTRICT, + CONSTRAINT `FK_actor2` FOREIGN KEY (`a_id`) REFERENCES `filmmaker` (`a_id`) ON DELETE RESTRICT ON UPDATE RESTRICT +) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic; + +-- ---------------------------- +-- Records of actor +-- ---------------------------- +INSERT INTO `actor` VALUES ('1', 1); + +-- ---------------------------- +-- Table structure for awards +-- ---------------------------- +DROP TABLE IF EXISTS `awards`; +CREATE TABLE `awards` ( + `a_id` int(11) NOT NULL AUTO_INCREMENT, + `a_name` varchar(10) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, + PRIMARY KEY (`a_id`) USING BTREE +) ENGINE = InnoDB AUTO_INCREMENT = 2 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic; + +-- ---------------------------- +-- Records of awards +-- ---------------------------- +INSERT INTO `awards` VALUES (1, '最佳影片奖(提名)'); + +-- ---------------------------- +-- Table structure for carry +-- ---------------------------- +DROP TABLE IF EXISTS `carry`; +CREATE TABLE `carry` ( + `m_id` varchar(14) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, + `a_id` int(11) NOT NULL, + `f_id` int(11) NULL DEFAULT NULL, + PRIMARY KEY (`m_id`, `a_id`) USING BTREE, + INDEX `FK_Relationship_27`(`f_id`) USING BTREE, + INDEX `FK_carry2`(`a_id`) USING BTREE, + CONSTRAINT `FK_Relationship_27` FOREIGN KEY (`f_id`) REFERENCES `festival` (`f_id`) ON DELETE RESTRICT ON UPDATE RESTRICT, + CONSTRAINT `FK_carry` FOREIGN KEY (`m_id`) REFERENCES `movie` (`m_id`) ON DELETE RESTRICT ON UPDATE RESTRICT, + CONSTRAINT `FK_carry2` FOREIGN KEY (`a_id`) REFERENCES `awards` (`a_id`) ON DELETE RESTRICT ON UPDATE RESTRICT +) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic; + +-- ---------------------------- +-- Records of carry +-- ---------------------------- +INSERT INTO `carry` VALUES ('1', 1, 1); + +-- ---------------------------- +-- Table structure for country +-- ---------------------------- +DROP TABLE IF EXISTS `country`; +CREATE TABLE `country` ( + `country_id` int(10) NOT NULL AUTO_INCREMENT, + `country_name` varchar(10) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, + PRIMARY KEY (`country_id`) USING BTREE +) ENGINE = InnoDB AUTO_INCREMENT = 4 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic; + +-- ---------------------------- +-- Records of country +-- ---------------------------- +INSERT INTO `country` VALUES (1, '中国'); +INSERT INTO `country` VALUES (2, '美国'); +INSERT INTO `country` VALUES (3, '韩国'); + +-- ---------------------------- +-- Table structure for direct +-- ---------------------------- +DROP TABLE IF EXISTS `direct`; +CREATE TABLE `direct` ( + `m_id` varchar(14) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, + `a_id` int(11) NOT NULL, + PRIMARY KEY (`m_id`, `a_id`) USING BTREE, + INDEX `FK_direct2`(`a_id`) USING BTREE, + CONSTRAINT `FK_direct` FOREIGN KEY (`m_id`) REFERENCES `movie` (`m_id`) ON DELETE RESTRICT ON UPDATE RESTRICT, + CONSTRAINT `FK_direct2` FOREIGN KEY (`a_id`) REFERENCES `filmmaker` (`a_id`) ON DELETE RESTRICT ON UPDATE RESTRICT +) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic; + +-- ---------------------------- +-- Records of direct +-- ---------------------------- +INSERT INTO `direct` VALUES ('1', 1); + +-- ---------------------------- +-- Table structure for discuss +-- ---------------------------- +DROP TABLE IF EXISTS `discuss`; +CREATE TABLE `discuss` ( + `u_id` int(11) NOT NULL, + `m_id` varchar(14) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, + `t_theme` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, + `content` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, + PRIMARY KEY (`u_id`, `m_id`) USING BTREE, + INDEX `FK_discuss2`(`m_id`) USING BTREE, + CONSTRAINT `FK_discuss` FOREIGN KEY (`u_id`) REFERENCES `user` (`u_id`) ON DELETE RESTRICT ON UPDATE RESTRICT, + CONSTRAINT `FK_discuss2` FOREIGN KEY (`m_id`) REFERENCES `movie` (`m_id`) ON DELETE RESTRICT ON UPDATE RESTRICT +) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic; + +-- ---------------------------- +-- Records of discuss +-- ---------------------------- +INSERT INTO `discuss` VALUES (1, '1', '为什么cj要废了这些娃 ', '为什么cj要废了这些娃 '); + +-- ---------------------------- +-- Table structure for festival +-- ---------------------------- +DROP TABLE IF EXISTS `festival`; +CREATE TABLE `festival` ( + `f_id` int(11) NOT NULL AUTO_INCREMENT, + `f_name` varchar(10) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, + `f_held` varchar(10) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, + `f_start` date NOT NULL, + `f_finish` date NOT NULL, + `f_picture` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, + PRIMARY KEY (`f_id`) USING BTREE +) ENGINE = InnoDB AUTO_INCREMENT = 2 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic; + +-- ---------------------------- +-- Records of festival +-- ---------------------------- +INSERT INTO `festival` VALUES (1, '中国长春电影节', '中国长春', '2023-09-11', '2023-09-16', 'https://img1.doubanio.com/view/photo/photo/public/p2897645249.webp'); + +-- ---------------------------- +-- Table structure for filmmaker +-- ---------------------------- +DROP TABLE IF EXISTS `filmmaker`; +CREATE TABLE `filmmaker` ( + `a_id` int(11) NOT NULL AUTO_INCREMENT, + `a_name` varchar(10) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, + `a_ename` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, + `a_sex` varchar(15) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, + `a_intro` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL, + `a_photo` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, + PRIMARY KEY (`a_id`) USING BTREE +) ENGINE = InnoDB AUTO_INCREMENT = 2 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic; + +-- ---------------------------- +-- Records of filmmaker +-- ---------------------------- +INSERT INTO `filmmaker` VALUES (1, '王宝强', 'Baoqiang Wang', '男', '王宝强,中国男演员。王宝强6岁时开始练习武术,8岁-14岁在河南嵩山少林寺做俗家弟子,之后来到北京闯天下,在各个剧组当武行做群众演员。命运似乎很眷顾这个看上去普普通通的孩子,16岁时,王宝强被导演李扬挑中,主演独立电影《盲井》,这部电影让他一夜之间从武行变成金马奖最佳新人。此外,王宝强还凭《盲井》获得了法国第五届杜威尔电影节“最佳男主演奖”以及第二届曼谷国际电影节“最佳男演员奖”。', 'https://img9.doubanio.com/view/celebrity/raw/public/p1356403251.95.jpg'); + +-- ---------------------------- +-- Table structure for filmreview +-- ---------------------------- +DROP TABLE IF EXISTS `filmreview`; +CREATE TABLE `filmreview` ( + `u_id` int(11) NOT NULL, + `m_id` varchar(14) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, + `y_star` varchar(2) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, + `y_title` text CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, + `y_content` text CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, + PRIMARY KEY (`u_id`, `m_id`) USING BTREE, + INDEX `FK_filmreview2`(`m_id`) USING BTREE, + CONSTRAINT `FK_filmreview` FOREIGN KEY (`u_id`) REFERENCES `user` (`u_id`) ON DELETE RESTRICT ON UPDATE RESTRICT, + CONSTRAINT `FK_filmreview2` FOREIGN KEY (`m_id`) REFERENCES `movie` (`m_id`) ON DELETE RESTRICT ON UPDATE RESTRICT +) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic; + +-- ---------------------------- +-- Records of filmreview +-- ---------------------------- +INSERT INTO `filmreview` VALUES (1, '1', '5', '用双手去打出属于自己的未来吧', '用双手去打出属于自己的未来吧'); + +-- ---------------------------- +-- Table structure for flanguage +-- ---------------------------- +DROP TABLE IF EXISTS `flanguage`; +CREATE TABLE `flanguage` ( + `l_id` varchar(15) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, + `m_id` varchar(14) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, + PRIMARY KEY (`l_id`, `m_id`) USING BTREE, + INDEX `FK_flanguage2`(`m_id`) USING BTREE, + CONSTRAINT `FK_flanguage` FOREIGN KEY (`l_id`) REFERENCES `language` (`l_id`) ON DELETE RESTRICT ON UPDATE RESTRICT, + CONSTRAINT `FK_flanguage2` FOREIGN KEY (`m_id`) REFERENCES `movie` (`m_id`) ON DELETE RESTRICT ON UPDATE RESTRICT +) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic; + +-- ---------------------------- +-- Records of flanguage +-- ---------------------------- +INSERT INTO `flanguage` VALUES ('1', '1'); + +-- ---------------------------- +-- Table structure for language +-- ---------------------------- +DROP TABLE IF EXISTS `language`; +CREATE TABLE `language` ( + `l_id` varchar(15) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, + `l_name` varchar(15) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, + PRIMARY KEY (`l_id`) USING BTREE +) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic; + +-- ---------------------------- +-- Records of language +-- ---------------------------- +INSERT INTO `language` VALUES ('1', '中文'); +INSERT INTO `language` VALUES ('2', '英语'); +INSERT INTO `language` VALUES ('3', '韩语'); + +-- ---------------------------- +-- Table structure for movie +-- ---------------------------- +DROP TABLE IF EXISTS `movie`; +CREATE TABLE `movie` ( + `m_id` varchar(14) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, + `l_id` varchar(15) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, + `m_name` varchar(15) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, + `m_ename` varchar(25) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, + `m_date` date NULL DEFAULT NULL, + `m_alias` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, + `imdb` varchar(15) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, + `m_intro` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL, + PRIMARY KEY (`m_id`) USING BTREE, + INDEX `FK_Relationship_15`(`l_id`) USING BTREE, + CONSTRAINT `FK_Relationship_15` FOREIGN KEY (`l_id`) REFERENCES `language` (`l_id`) ON DELETE RESTRICT ON UPDATE RESTRICT +) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic; + +-- ---------------------------- +-- Records of movie +-- ---------------------------- +INSERT INTO `movie` VALUES ('1', '1', '八角笼中', 'Never Say Never', '2023-07-06', 'Octagonal', 'tt20865116', '电影讲述了向腾辉(王宝强 饰)倾注心血想把当地无人照料的孩子培养成才,这让生活本没有出路的孩子们看到了一丝通向未来的曙光。然而,随着往日的表演视频被爆出,这些“残忍、血腥”的画面刺激了不明真相的人们的神经。一夜之间,舆论开始发酵。向腾辉的生活、孩子们的前途都陷入到人们以善良为名编织的大网中,让他们难以挣脱,重回泥沼,关于未来,他们的“出路”又将在哪……'); + +-- ---------------------------- +-- Table structure for movietype +-- ---------------------------- +DROP TABLE IF EXISTS `movietype`; +CREATE TABLE `movietype` ( + `type_id` int(10) NOT NULL AUTO_INCREMENT, + `type_name` varchar(10) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, + PRIMARY KEY (`type_id`) USING BTREE +) ENGINE = InnoDB AUTO_INCREMENT = 2 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic; + +-- ---------------------------- +-- Records of movietype +-- ---------------------------- +INSERT INTO `movietype` VALUES (1, '剧情'); + +-- ---------------------------- +-- Table structure for picture +-- ---------------------------- +DROP TABLE IF EXISTS `picture`; +CREATE TABLE `picture` ( + `p_id` varchar(15) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, + `m_id` varchar(14) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, + `mov_m_id` varchar(14) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, + `p_url` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, + PRIMARY KEY (`p_id`) USING BTREE, + INDEX `FK_poster`(`m_id`) USING BTREE, + INDEX `FK_still`(`mov_m_id`) USING BTREE, + CONSTRAINT `FK_poster` FOREIGN KEY (`m_id`) REFERENCES `movie` (`m_id`) ON DELETE RESTRICT ON UPDATE RESTRICT, + CONSTRAINT `FK_still` FOREIGN KEY (`mov_m_id`) REFERENCES `movie` (`m_id`) ON DELETE RESTRICT ON UPDATE RESTRICT +) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic; + +-- ---------------------------- +-- Records of picture +-- ---------------------------- +INSERT INTO `picture` VALUES ('1', '1', '1', 'https://movie.douban.com/subject/35765480/photos?type=R'); + +-- ---------------------------- +-- Table structure for redact +-- ---------------------------- +DROP TABLE IF EXISTS `redact`; +CREATE TABLE `redact` ( + `m_id` varchar(14) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, + `a_id` int(11) NOT NULL, + PRIMARY KEY (`m_id`, `a_id`) USING BTREE, + INDEX `FK_redact2`(`a_id`) USING BTREE, + CONSTRAINT `FK_redact` FOREIGN KEY (`m_id`) REFERENCES `movie` (`m_id`) ON DELETE RESTRICT ON UPDATE RESTRICT, + CONSTRAINT `FK_redact2` FOREIGN KEY (`a_id`) REFERENCES `filmmaker` (`a_id`) ON DELETE RESTRICT ON UPDATE RESTRICT +) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic; + +-- ---------------------------- +-- Records of redact +-- ---------------------------- +INSERT INTO `redact` VALUES ('1', 1); + +-- ---------------------------- +-- Table structure for relationship_3 +-- ---------------------------- +DROP TABLE IF EXISTS `relationship_3`; +CREATE TABLE `relationship_3` ( + `m_id` varchar(14) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, + `type_id` int(11) NOT NULL, + PRIMARY KEY (`m_id`, `type_id`) USING BTREE, + INDEX `FK_Relationship_4`(`type_id`) USING BTREE, + CONSTRAINT `FK_Relationship_3` FOREIGN KEY (`m_id`) REFERENCES `movie` (`m_id`) ON DELETE RESTRICT ON UPDATE RESTRICT, + CONSTRAINT `FK_Relationship_4` FOREIGN KEY (`type_id`) REFERENCES `movietype` (`type_id`) ON DELETE RESTRICT ON UPDATE RESTRICT +) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic; + +-- ---------------------------- +-- Records of relationship_3 +-- ---------------------------- +INSERT INTO `relationship_3` VALUES ('1', 1); + +-- ---------------------------- +-- Table structure for relationship_6 +-- ---------------------------- +DROP TABLE IF EXISTS `relationship_6`; +CREATE TABLE `relationship_6` ( + `country_id` int(11) NOT NULL, + `m_id` varchar(14) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, + PRIMARY KEY (`country_id`, `m_id`) USING BTREE, + INDEX `FK_Relationship_7`(`m_id`) USING BTREE, + CONSTRAINT `FK_Relationship_6` FOREIGN KEY (`country_id`) REFERENCES `country` (`country_id`) ON DELETE RESTRICT ON UPDATE RESTRICT, + CONSTRAINT `FK_Relationship_7` FOREIGN KEY (`m_id`) REFERENCES `movie` (`m_id`) ON DELETE RESTRICT ON UPDATE RESTRICT +) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic; + +-- ---------------------------- +-- Records of relationship_6 +-- ---------------------------- +INSERT INTO `relationship_6` VALUES (1, '1'); + +-- ---------------------------- +-- Table structure for sheet +-- ---------------------------- +DROP TABLE IF EXISTS `sheet`; +CREATE TABLE `sheet` ( + `u_id` int(11) NOT NULL, + `m_id` varchar(14) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, + `recommend` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL, + PRIMARY KEY (`u_id`, `m_id`) USING BTREE, + INDEX `FK_sheet2`(`m_id`) USING BTREE, + CONSTRAINT `FK_sheet` FOREIGN KEY (`u_id`) REFERENCES `user` (`u_id`) ON DELETE RESTRICT ON UPDATE RESTRICT, + CONSTRAINT `FK_sheet2` FOREIGN KEY (`m_id`) REFERENCES `movie` (`m_id`) ON DELETE RESTRICT ON UPDATE RESTRICT +) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic; + +-- ---------------------------- +-- Records of sheet +-- ---------------------------- +INSERT INTO `sheet` VALUES (1, '1', '好看,爱看'); + +-- ---------------------------- +-- Table structure for short +-- ---------------------------- +DROP TABLE IF EXISTS `short`; +CREATE TABLE `short` ( + `u_id` int(11) NOT NULL, + `m_id` varchar(14) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, + `d_star` varchar(2) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, + `d_content` text CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, + PRIMARY KEY (`u_id`, `m_id`) USING BTREE, + INDEX `FK_short2`(`m_id`) USING BTREE, + CONSTRAINT `FK_short` FOREIGN KEY (`u_id`) REFERENCES `user` (`u_id`) ON DELETE RESTRICT ON UPDATE RESTRICT, + CONSTRAINT `FK_short2` FOREIGN KEY (`m_id`) REFERENCES `movie` (`m_id`) ON DELETE RESTRICT ON UPDATE RESTRICT +) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic; + +-- ---------------------------- +-- Records of short +-- ---------------------------- +INSERT INTO `short` VALUES (1, '1', '5', '王宝强回归现实题材算是找到根儿了,起家就是靠的这个,用了当年《盲井》里的校服照,请来李杨导演客串也是对自己处女作的致敬,足见这部作品对宝强的影响和在心目中的地位。这次第二部导演作品进步太多,从选材到镜头语言和主题表达都愈发成熟,还有不足和进步空间,但至少方向对了,很可贵,期待宝强下部导演作品。'); + +-- ---------------------------- +-- Table structure for user +-- ---------------------------- +DROP TABLE IF EXISTS `user`; +CREATE TABLE `user` ( + `u_id` int(11) NOT NULL AUTO_INCREMENT, + `u_psw` varchar(10) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, + `u_IP` varchar(15) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, + `u_photo` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL, + `u_name` varchar(15) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, + PRIMARY KEY (`u_id`) USING BTREE +) ENGINE = InnoDB AUTO_INCREMENT = 2 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic; + +-- ---------------------------- +-- Records of user +-- ---------------------------- +INSERT INTO `user` VALUES (1, '123', '中国', 'https://www.douban.com/people/88125304/', '玄长清'); + +-- ---------------------------- +-- Table structure for video +-- ---------------------------- +DROP TABLE IF EXISTS `video`; +CREATE TABLE `video` ( + `v_id` varchar(15) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, + `m_id` varchar(14) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, + `v_url` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, + `v_cover` varchar(60) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, + PRIMARY KEY (`v_id`) USING BTREE, + INDEX `FK_Relationship_14`(`m_id`) USING BTREE, + CONSTRAINT `FK_Relationship_14` FOREIGN KEY (`m_id`) REFERENCES `movie` (`m_id`) ON DELETE RESTRICT ON UPDATE RESTRICT +) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic; + +-- ---------------------------- +-- Records of video +-- ---------------------------- +INSERT INTO `video` VALUES ('1', '1', 'https://movie.douban.com/trailer/306358/#content', 'https://movie.douban.com/subject/35765480/photos?type=R'); + +SET FOREIGN_KEY_CHECKS = 1; + +``` \ No newline at end of file -- Gitee