diff --git "a/56 \346\242\205\345\277\240\351\222\246/2023.09.13.png" "b/56 \346\242\205\345\277\240\351\222\246/2023.09.13.png" new file mode 100644 index 0000000000000000000000000000000000000000..8b381ac56142333fc91172e78621870f88370478 Binary files /dev/null and "b/56 \346\242\205\345\277\240\351\222\246/2023.09.13.png" differ diff --git "a/56 \346\242\205\345\277\240\351\222\246/2023.09.13\344\275\234\344\270\232.md" "b/56 \346\242\205\345\277\240\351\222\246/2023.09.13\344\275\234\344\270\232.md" new file mode 100644 index 0000000000000000000000000000000000000000..c2de7c172d68b98d7e1f7f721fdbeb721cfefe87 --- /dev/null +++ "b/56 \346\242\205\345\277\240\351\222\246/2023.09.13\344\275\234\344\270\232.md" @@ -0,0 +1,522 @@ +```sql +create database douban2 charset utf8mb4; +use douban2; + +SET NAMES utf8mb4; +SET FOREIGN_KEY_CHECKS = 0; + +-- ---------------------------- + +-- Table structure for act_in + +-- ---------------------------- + +DROP TABLE IF EXISTS `act_in`; +CREATE TABLE `act_in` ( + `m_id` int(11) NOT NULL, + `actor_id` int(11) NOT NULL, + PRIMARY KEY (`m_id`, `actor_id`) USING BTREE, + INDEX `FK_act_in2`(`actor_id`) USING BTREE, + CONSTRAINT `FK_act_in` FOREIGN KEY (`m_id`) REFERENCES `movie` (`m_id`) ON DELETE RESTRICT ON UPDATE RESTRICT, + CONSTRAINT `FK_act_in2` FOREIGN KEY (`actor_id`) REFERENCES `actor` (`actor_id`) ON DELETE RESTRICT ON UPDATE RESTRICT +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic; + +-- ---------------------------- + +-- Records of act_in + +-- ---------------------------- + +INSERT INTO `act_in` VALUES (1, 1); + +-- ---------------------------- + +-- Table structure for actor + +-- ---------------------------- + +DROP TABLE IF EXISTS `actor`; +CREATE TABLE `actor` ( + `actor_id` int(11) NOT NULL AUTO_INCREMENT, + `actor_cname` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL, + `actor_ename` varchar(25) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, + `actor_sex` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL, + `actor_profile` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL, + `actor_avatar` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL, + PRIMARY KEY (`actor_id`) USING BTREE +) ENGINE = InnoDB AUTO_INCREMENT = 7 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic; + +-- ---------------------------- + +-- Records of actor + +-- ---------------------------- + +INSERT INTO `actor` VALUES (1, ' 席琳·宋', 'Celine Song', '女', '席琳·宋 (Celine Song) 是一位居住在美国的韩裔加拿大导演、剧作家和编剧。她的戏剧包括《模拟人生 4》中的《Endlings》和《海鸥》。她的导演处女作《前世》在 2023 年圣丹斯电影节上上映。', 'https://img2.doubanio.com/view/personage/raw/public/2942d7aecf9b0c8139f835a7949c093e.jpg'); +INSERT INTO `actor` VALUES (2, '格蕾塔·李', 'Greta Lee', '女', 'Greta Lee is an actress, known for Sisters (2015), St. Vincent (2014) and Money Monster (2016).', 'https://img9.doubanio.com/view/celebrity/raw/public/p1593543756.34.jpg'); +INSERT INTO `actor` VALUES (3, '刘台午', 'eo Yoo', '男', '刘太旿,韩国男演员,1981年4月11在德国出生,身高181,所属公司C-JeS Entertainment,2009年以电影《女演员们》出道,曾出演电影《一对一》《假装热情》等。', 'https://img1.doubanio.com/view/personage/raw/public/671c08862182fb7442e97a570a17fe88.jpg'); +INSERT INTO `actor` VALUES (4, '约翰·马加罗', 'John Magaro', '男', 'ohn Robert Magaro, born February 16, 1983, is an American film, television and stage actor.', 'https://img9.doubanio.com/view/celebrity/raw/public/p1352375961.94.jpg'); +INSERT INTO `actor` VALUES (5, '文胜雅', 'Seung-ah Moon', '女', 'Seung-ah Moon', 'https://img2.doubanio.com/view/celebrity/raw/public/p1604544443.63.jpg'); +INSERT INTO `actor` VALUES (6, '尹智慧 ', 'i-hye Yun', '女', '频繁而又自如地变换着电影演员和戏剧演员身份的尹智慧凭借强烈的演技给人们留下了深刻的印象,1998年她在《女高怪谈》中得到了自己的第一个银幕角色,此后又连续出现在了影片《春香传》、《错爱双鱼座》以及《恋恋春熊》当中,并且在2004年加盟了东京国际电影节上获得“最佳亚洲电影奖”的影片《可能出现的变化》的拍摄。2005年尹智慧的名字出现在了Patrick Marber戏剧《偷心》韩国版的阵容当中,挑战过这个在好莱坞电影版中由娜塔丽·波特曼演绎过的角色出后尹智慧又出演了《强力三班》和《没教养的家伙》两部影片,内功深厚的她给观众带来了颇具深度的魅力喜剧演技,也向导演们展示了自己更多的可塑性。2007年尹智慧的最新作品是MBC周末电视剧《顺其自然》,这也是出道9年之久的她首次通过电视剧场和观众见面。', 'https://img1.doubanio.com/view/celebrity/raw/public/p1503735652.18.jpg'); + +-- ---------------------------- + +-- Table structure for awards + +-- ---------------------------- + +DROP TABLE IF EXISTS `awards`; +CREATE TABLE `awards` ( + `a_id` int(11) NOT NULL AUTO_INCREMENT, + `a_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL, + PRIMARY KEY (`a_id`) USING BTREE +) ENGINE = InnoDB AUTO_INCREMENT = 2 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic; + +-- ---------------------------- + +-- Records of awards + +-- ---------------------------- + +INSERT INTO `awards` VALUES (1, '第73届柏林国际电影节 主竞赛单元 金熊奖'); + +-- ---------------------------- + +-- Table structure for carry_of_a_prize + +-- ---------------------------- + +DROP TABLE IF EXISTS `carry_of_a_prize`; +CREATE TABLE `carry_of_a_prize` ( + `a_id` int(11) NOT NULL, + `m_id` int(11) NOT NULL, + `f_id` int(11) NOT NULL, + PRIMARY KEY (`a_id`, `m_id`, `f_id`) USING BTREE, + INDEX `FK_Relationship_26`(`f_id`) USING BTREE, + INDEX `FK_carry_of_a_prize2`(`m_id`) USING BTREE, + CONSTRAINT `FK_Relationship_26` FOREIGN KEY (`f_id`) REFERENCES `filmfest` (`f_id`) ON DELETE RESTRICT ON UPDATE RESTRICT, + CONSTRAINT `FK_carry_of_a_prize` FOREIGN KEY (`a_id`) REFERENCES `awards` (`a_id`) ON DELETE RESTRICT ON UPDATE RESTRICT, + CONSTRAINT `FK_carry_of_a_prize2` FOREIGN KEY (`m_id`) REFERENCES `movie` (`m_id`) ON DELETE RESTRICT ON UPDATE RESTRICT +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic; + +-- ---------------------------- + +-- Records of carry_of_a_prize + +-- ---------------------------- + +INSERT INTO `carry_of_a_prize` VALUES (1, 1, 1); + +-- ---------------------------- + +-- Table structure for director + +-- ---------------------------- + +DROP TABLE IF EXISTS `director`; +CREATE TABLE `director` ( + `m_id` int(11) NOT NULL, + `actor_id` int(11) NOT NULL, + PRIMARY KEY (`m_id`, `actor_id`) USING BTREE, + INDEX `FK_director2`(`actor_id`) USING BTREE, + CONSTRAINT `FK_director` FOREIGN KEY (`m_id`) REFERENCES `movie` (`m_id`) ON DELETE RESTRICT ON UPDATE RESTRICT, + CONSTRAINT `FK_director2` FOREIGN KEY (`actor_id`) REFERENCES `actor` (`actor_id`) ON DELETE RESTRICT ON UPDATE RESTRICT +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic; + +-- ---------------------------- + +-- Records of director + +-- ---------------------------- + +INSERT INTO `director` VALUES (1, 1); + +-- ---------------------------- + +-- Table structure for discuss + +-- ---------------------------- + +DROP TABLE IF EXISTS `discuss`; +CREATE TABLE `discuss` ( + `m_id` int(11) NOT NULL, + `u_id` int(11) NOT NULL, + PRIMARY KEY (`m_id`, `u_id`) USING BTREE, + INDEX `FK_discuss2`(`u_id`) USING BTREE, + CONSTRAINT `FK_discuss` FOREIGN KEY (`m_id`) REFERENCES `movie` (`m_id`) ON DELETE RESTRICT ON UPDATE RESTRICT, + CONSTRAINT `FK_discuss2` FOREIGN KEY (`u_id`) REFERENCES `user` (`u_id`) ON DELETE RESTRICT ON UPDATE RESTRICT +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic; + +-- ---------------------------- + +-- Records of discuss + +-- ---------------------------- + +INSERT INTO `discuss` VALUES (1, 1); + +-- ---------------------------- + +-- Table structure for film_review + +-- ---------------------------- + +DROP TABLE IF EXISTS `film_review`; +CREATE TABLE `film_review` ( + `m_id` int(11) NOT NULL, + `u_id` int(11) NOT NULL, + PRIMARY KEY (`m_id`, `u_id`) USING BTREE, + INDEX `FK_film_review2`(`u_id`) USING BTREE, + CONSTRAINT `FK_film_review` FOREIGN KEY (`m_id`) REFERENCES `movie` (`m_id`) ON DELETE RESTRICT ON UPDATE RESTRICT, + CONSTRAINT `FK_film_review2` FOREIGN KEY (`u_id`) REFERENCES `user` (`u_id`) ON DELETE RESTRICT ON UPDATE RESTRICT +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic; + +-- ---------------------------- + +-- Records of film_review + +-- ---------------------------- + +INSERT INTO `film_review` VALUES (1, 1); + +-- ---------------------------- + +-- Table structure for filmfest + +-- ---------------------------- + +DROP TABLE IF EXISTS `filmfest`; +CREATE TABLE `filmfest` ( + `f_id` int(11) NOT NULL AUTO_INCREMENT, + `f_name` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL, + `host_placce` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL, + `start_date` date NOT NULL, + `deadline` date NOT NULL, + `cover_picture` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL, + PRIMARY KEY (`f_id`) USING BTREE +) ENGINE = InnoDB AUTO_INCREMENT = 2 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic; + +-- ---------------------------- + +-- Records of filmfest + +-- ---------------------------- + +INSERT INTO `filmfest` VALUES (1, '梦泪杯', '团结里414', '2023-09-13', '2023-09-28', 'https://movie.douban.com/subject/35597426/?from=subject-page'); + +-- ---------------------------- + +-- Table structure for language + +-- ---------------------------- + +DROP TABLE IF EXISTS `language`; +CREATE TABLE `language` ( + `l_id` int(11) NOT NULL AUTO_INCREMENT, + `l_name` varchar(5) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL, + PRIMARY KEY (`l_id`) USING BTREE +) ENGINE = InnoDB AUTO_INCREMENT = 3 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic; + +-- ---------------------------- + +-- Records of language + +-- ---------------------------- + +INSERT INTO `language` VALUES (1, '国语'); +INSERT INTO `language` VALUES (2, '英语'); + +-- ---------------------------- + +-- Table structure for movie + +-- ---------------------------- + +DROP TABLE IF EXISTS `movie`; +CREATE TABLE `movie` ( + `m_id` int(11) NOT NULL AUTO_INCREMENT, + `m_name` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL, + `m_english_name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, + `m_release_date` date NULL DEFAULT NULL, + `alias` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, + `IMDB` varchar(15) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, + `m_review` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL, + PRIMARY KEY (`m_id`) USING BTREE +) ENGINE = InnoDB AUTO_INCREMENT = 2 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic; + +-- ---------------------------- + +-- Records of movie + +-- ---------------------------- + +INSERT INTO `movie` VALUES (1, '过往人生', 'Past Lives', '2023-01-21', '前世因缘 ', ' tt13238346', 'Nora(Greta Lee 饰)自小便因家庭因素搬离首尔移居加拿大。她与青梅竹马 Hae Sung(刘台午 饰)的关系最终停留在稚幼的凝视不语。而在二十年后,命运令两人于纽约重逢。可此时 Nora已拥有新的身份,甚至已和Arthur(John Magaro 饰)建立家庭。和Hae Sung 分开二十年后的重逢,也令她重新思索生活中的真正渴望。'); + +-- ---------------------------- + +-- Table structure for picture + +-- ---------------------------- + +DROP TABLE IF EXISTS `picture`; +CREATE TABLE `picture` ( + `p_id` int(11) NOT NULL AUTO_INCREMENT, + `m_id` int(11) NULL DEFAULT NULL, + `mov_m_id` int(11) NULL DEFAULT NULL, + `p_url` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL, + PRIMARY KEY (`p_id`) USING BTREE, + INDEX `FK_poster`(`mov_m_id`) USING BTREE, + INDEX `FK_still`(`m_id`) USING BTREE, + CONSTRAINT `FK_poster` FOREIGN KEY (`mov_m_id`) REFERENCES `movie` (`m_id`) ON DELETE RESTRICT ON UPDATE RESTRICT, + CONSTRAINT `FK_still` FOREIGN KEY (`m_id`) REFERENCES `movie` (`m_id`) ON DELETE RESTRICT ON UPDATE RESTRICT +) ENGINE = InnoDB AUTO_INCREMENT = 2 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic; + +-- ---------------------------- + +-- Records of picture + +-- ---------------------------- + +INSERT INTO `picture` VALUES (1, 1, 1, 'https://movie.douban.com/subject/35295277/?from=subject-page'); + +-- ---------------------------- + +-- Table structure for publishing_language + +-- ---------------------------- + +DROP TABLE IF EXISTS `publishing_language`; +CREATE TABLE `publishing_language` ( + `l_id` int(11) NOT NULL, + `m_id` int(11) NOT NULL, + PRIMARY KEY (`l_id`, `m_id`) USING BTREE, + INDEX `FK_Publishing_language2`(`m_id`) USING BTREE, + CONSTRAINT `FK_Publishing_language` FOREIGN KEY (`l_id`) REFERENCES `language` (`l_id`) ON DELETE RESTRICT ON UPDATE RESTRICT, + CONSTRAINT `FK_Publishing_language2` FOREIGN KEY (`m_id`) REFERENCES `movie` (`m_id`) ON DELETE RESTRICT ON UPDATE RESTRICT +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic; + +-- ---------------------------- + +-- Records of publishing_language + +-- ---------------------------- + +INSERT INTO `publishing_language` VALUES (1, 1); + +-- ---------------------------- + +-- Table structure for region_of_issue + +-- ---------------------------- + +DROP TABLE IF EXISTS `region_of_issue`; +CREATE TABLE `region_of_issue` ( + `state_id` int(11) NOT NULL, + `m_id` int(11) NOT NULL, + PRIMARY KEY (`state_id`, `m_id`) USING BTREE, + INDEX `FK_Region_of_issue2`(`m_id`) USING BTREE, + CONSTRAINT `FK_Region_of_issue` FOREIGN KEY (`state_id`) REFERENCES `state` (`state_id`) ON DELETE RESTRICT ON UPDATE RESTRICT, + CONSTRAINT `FK_Region_of_issue2` FOREIGN KEY (`m_id`) REFERENCES `movie` (`m_id`) ON DELETE RESTRICT ON UPDATE RESTRICT +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic; + +-- ---------------------------- + +-- Records of region_of_issue + +-- ---------------------------- + +INSERT INTO `region_of_issue` VALUES (1, 1); + +-- ---------------------------- + +-- Table structure for scriptwriter + +-- ---------------------------- + +DROP TABLE IF EXISTS `scriptwriter`; +CREATE TABLE `scriptwriter` ( + `m_id` int(11) NOT NULL, + `actor_id` int(11) NOT NULL, + PRIMARY KEY (`m_id`, `actor_id`) USING BTREE, + INDEX `FK_scriptwriter2`(`actor_id`) USING BTREE, + CONSTRAINT `FK_scriptwriter` FOREIGN KEY (`m_id`) REFERENCES `movie` (`m_id`) ON DELETE RESTRICT ON UPDATE RESTRICT, + CONSTRAINT `FK_scriptwriter2` FOREIGN KEY (`actor_id`) REFERENCES `actor` (`actor_id`) ON DELETE RESTRICT ON UPDATE RESTRICT +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic; + +-- ---------------------------- + +-- Records of scriptwriter + +-- ---------------------------- + +INSERT INTO `scriptwriter` VALUES (1, 1); + +-- ---------------------------- + +-- Table structure for sheet + +-- ---------------------------- + +DROP TABLE IF EXISTS `sheet`; +CREATE TABLE `sheet` ( + `m_id` int(11) NOT NULL, + `u_id` int(11) NOT NULL, + PRIMARY KEY (`m_id`, `u_id`) USING BTREE, + INDEX `FK_sheet2`(`u_id`) USING BTREE, + CONSTRAINT `FK_sheet` FOREIGN KEY (`m_id`) REFERENCES `movie` (`m_id`) ON DELETE RESTRICT ON UPDATE RESTRICT, + CONSTRAINT `FK_sheet2` FOREIGN KEY (`u_id`) REFERENCES `user` (`u_id`) ON DELETE RESTRICT ON UPDATE RESTRICT +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic; + +-- ---------------------------- + +-- Records of sheet + +-- ---------------------------- + +INSERT INTO `sheet` VALUES (1, 1); + +-- ---------------------------- + +-- Table structure for short_commentary + +-- ---------------------------- + +DROP TABLE IF EXISTS `short_commentary`; +CREATE TABLE `short_commentary` ( + `m_id` int(11) NOT NULL, + `u_id` int(11) NOT NULL, + PRIMARY KEY (`m_id`, `u_id`) USING BTREE, + INDEX `FK_short_commentary2`(`u_id`) USING BTREE, + CONSTRAINT `FK_short_commentary` FOREIGN KEY (`m_id`) REFERENCES `movie` (`m_id`) ON DELETE RESTRICT ON UPDATE RESTRICT, + CONSTRAINT `FK_short_commentary2` FOREIGN KEY (`u_id`) REFERENCES `user` (`u_id`) ON DELETE RESTRICT ON UPDATE RESTRICT +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic; + +-- ---------------------------- + +-- Records of short_commentary + +-- ---------------------------- + +INSERT INTO `short_commentary` VALUES (1, 1); + +-- ---------------------------- + +-- Table structure for state + +-- ---------------------------- + +DROP TABLE IF EXISTS `state`; +CREATE TABLE `state` ( + `state_id` int(11) NOT NULL AUTO_INCREMENT, + `state_name` varchar(4) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL, + PRIMARY KEY (`state_id`) USING BTREE +) ENGINE = InnoDB AUTO_INCREMENT = 3 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic; + +-- ---------------------------- + +-- Records of state + +-- ---------------------------- + +INSERT INTO `state` VALUES (1, '美国'); +INSERT INTO `state` VALUES (2, '韩国'); + +-- ---------------------------- + +-- Table structure for type + +-- ---------------------------- + +DROP TABLE IF EXISTS `type`; +CREATE TABLE `type` ( + `type_id` int(11) NOT NULL AUTO_INCREMENT, + `type_name` varchar(2) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL, + PRIMARY KEY (`type_id`) USING BTREE +) ENGINE = InnoDB AUTO_INCREMENT = 3 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic; + +-- ---------------------------- + +-- Records of type + +-- ---------------------------- + +INSERT INTO `type` VALUES (1, '爱情'); +INSERT INTO `type` VALUES (2, '剧情'); + +-- ---------------------------- + +-- Table structure for type_of_ownership + +-- ---------------------------- + +DROP TABLE IF EXISTS `type_of_ownership`; +CREATE TABLE `type_of_ownership` ( + `type_id` int(11) NOT NULL, + `m_id` int(11) NOT NULL, + PRIMARY KEY (`type_id`, `m_id`) USING BTREE, + INDEX `FK_Type_of_ownership2`(`m_id`) USING BTREE, + CONSTRAINT `FK_Type_of_ownership` FOREIGN KEY (`type_id`) REFERENCES `type` (`type_id`) ON DELETE RESTRICT ON UPDATE RESTRICT, + CONSTRAINT `FK_Type_of_ownership2` FOREIGN KEY (`m_id`) REFERENCES `movie` (`m_id`) ON DELETE RESTRICT ON UPDATE RESTRICT +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic; + +-- ---------------------------- + +-- Records of type_of_ownership + +-- ---------------------------- + +INSERT INTO `type_of_ownership` VALUES (1, 1); + +-- ---------------------------- + +-- Table structure for user + +-- ---------------------------- + +DROP TABLE IF EXISTS `user`; +CREATE TABLE `user` ( + `u_id` int(11) NOT NULL AUTO_INCREMENT, + `u_password` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL, + `u_sex` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, + `u_avatar` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, + `u_name` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL, + PRIMARY KEY (`u_id`) USING BTREE +) ENGINE = InnoDB AUTO_INCREMENT = 2 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic; + +-- ---------------------------- + +-- Records of user + +-- ---------------------------- + +INSERT INTO `user` VALUES (1, '123456', '男', 'https://movie.douban.com/subject/35295277/?from=subject-page', '陈杰哥'); + +-- ---------------------------- + +-- Table structure for video + +-- ---------------------------- + +DROP TABLE IF EXISTS `video`; +CREATE TABLE `video` ( + `v_id` int(11) NOT NULL AUTO_INCREMENT, + `m_id` int(11) NULL DEFAULT NULL, + `v_url` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL, + `v_cover` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL, + PRIMARY KEY (`v_id`) USING BTREE, + INDEX `FK_preview`(`m_id`) USING BTREE, + CONSTRAINT `FK_preview` FOREIGN KEY (`m_id`) REFERENCES `movie` (`m_id`) ON DELETE RESTRICT ON UPDATE RESTRICT +) ENGINE = InnoDB AUTO_INCREMENT = 2 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic; + +-- ---------------------------- + +-- Records of video + +-- ---------------------------- + +INSERT INTO `video` VALUES (1, 1, 'https://movie.douban.com/subject/35295277/?from=subject-page', 'https://movie.douban.com/subject/35295277/?from=subject-page'); + +SET FOREIGN_KEY_CHECKS = 1; +``` + + diff --git "a/56 \346\242\205\345\277\240\351\222\246/2023.09.13\347\254\224\350\256\260.md" "b/56 \346\242\205\345\277\240\351\222\246/2023.09.13\347\254\224\350\256\260.md" new file mode 100644 index 0000000000000000000000000000000000000000..927149d1b818e89873c708c92b5cba67f44396b2 --- /dev/null +++ "b/56 \346\242\205\345\277\240\351\222\246/2023.09.13\347\254\224\350\256\260.md" @@ -0,0 +1,5 @@ +`学习了豆瓣电影网页的数据库设计​ + +复习了两个表如何连接多个关系 ​ + +复习了在概念模型三个表多对多的话先连两个表然后在逻辑模型里连接第三个表` diff --git "a/56 \346\242\205\345\277\240\351\222\246/2023.0913.png" "b/56 \346\242\205\345\277\240\351\222\246/2023.0913.png" new file mode 100644 index 0000000000000000000000000000000000000000..8877b0a8e4a77a38368770f2fbb01360af4f1c55 Binary files /dev/null and "b/56 \346\242\205\345\277\240\351\222\246/2023.0913.png" differ