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 0000000000000000000000000000000000000000..f58f1bb802a3732ce80fcb65d885b048be8b78b7 --- /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 +``` +```` + 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 0000000000000000000000000000000000000000..c85fbbb646a2ed72e3df73055c89f47e9a6aa063 --- /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