使用PowerDesigner对数据库建模


下载地址:https://oqczvte-www-saugau-com-cnhtzdzpztwsok.fgongbi01.cn/83e3828bb76f086d70fc4a8efd83b3c5.powerdesigner1029.zip

1、安装

双击PowerDesigner165.exe进入安装界面:


2、使用PowerDesigner建模

首先创建一个模型:

将右侧的table拖到物理视图的空白处:

点击右侧鼠标箭头后双击我们的table对表进行修改:

然后双击这张表:

点击 preview 会自动生成sql语句:

drop table if exists user;

/*==============================================================*/
/* Table: user                                                  */
/*==============================================================*/
create table user
(
   id                   int not null,
   name                 varchar(255) not null,
   password             varchar(255) not null,
   vocation             varchar(255),
   primary key (id)
);

然后我们点击保存导出sql文件: