From ee60c012ab2226accef636eadfc2d664d1c49c2b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BE=90=E6=B0=B8=E6=B7=B3?= <2678158018@qq.com> Date: Mon, 11 Sep 2023 22:22:09 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E7=AC=AC=E5=9B=9B=E6=AC=A1=E7=AC=94?= =?UTF-8?q?=E8=AE=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../20230911\347\254\224\350\256\260.md" | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 "18 \345\276\220\346\260\270\346\267\263/20230911\347\254\224\350\256\260.md" diff --git "a/18 \345\276\220\346\260\270\346\267\263/20230911\347\254\224\350\256\260.md" "b/18 \345\276\220\346\260\270\346\267\263/20230911\347\254\224\350\256\260.md" new file mode 100644 index 0000000..c85fbbb --- /dev/null +++ "b/18 \345\276\220\346\260\270\346\267\263/20230911\347\254\224\350\256\260.md" @@ -0,0 +1,11 @@ +软件:powerDesigner + +powerDesigner的使用过程,以及将概念模型转成数据库 + +首先 ,先创建概念模型(类似于E-R图)CMD客户的角度 + +其次,转为逻辑模型,LDM(以计算机的角度) + +再次,转成物理模型,PDM(以数据库的角度) + +最后,转为DDL \ No newline at end of file -- Gitee From be24b1c43dd2873c39e42d90d20b7c0a951e9e6a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BE=90=E6=B0=B8=E6=B7=B3?= <2678158018@qq.com> Date: Mon, 11 Sep 2023 22:22:57 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E7=AC=AC=E4=BA=8C=E6=AC=A1=E4=BD=9C?= =?UTF-8?q?=E4=B8=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../20230911\344\275\234\344\270\232.md" | 66 +++++++++++++++++++ 1 file changed, 66 insertions(+) create mode 100644 "18 \345\276\220\346\260\270\346\267\263/20230911\344\275\234\344\270\232.md" diff --git "a/18 \345\276\220\346\260\270\346\267\263/20230911\344\275\234\344\270\232.md" "b/18 \345\276\220\346\260\270\346\267\263/20230911\344\275\234\344\270\232.md" new file mode 100644 index 0000000..f58f1bb --- /dev/null +++ "b/18 \345\276\220\346\260\270\346\267\263/20230911\344\275\234\344\270\232.md" @@ -0,0 +1,66 @@ +````mysql +*==============================================================*/ +/* DBMS name: MySQL 5.0 */ +/* Created on: 2023/9/11 22:13:24 */ +/*==============================================================*/ +CREATE DATABASE books charset utf8; +use books; + +drop table if exists book; + +drop table if exists guanli; + +drop table if exists jie; + +drop table if exists librarian; + +drop table if exists library; + +drop table if exists reader; + +drop table if exists system; + +/*==============================================================*/ +/* Table: book */ +/*==============================================================*/ +create table book +( + bo_id char(10) not null, + sys_id int not null, + bo_name char(10) not null, + bo_author char(10) not null, + primary key (bo_id) +); + +/*==============================================================*/ +/* Table: guanli */ +/*==============================================================*/ +create table guanli +( + sys_id int not null, + rar_id int not null, + primary key (sys_id, rar_id) +); + +/*==============================================================*/ +/* Table: jie */ +/*==============================================================*/ +create table jie +( + bo_id char(10) not null, + re_id int not null, + rar_id int, + primary key (bo_id, re_id) +); + +/*==============================================================*/ +/* Table: librarian */ +/*==============================================================*/ +create table librarian +( + rar_id int not null auto_increment, + lib_id int not null, + rar_name varch +``` +```` + -- Gitee