Power Designer 12.5 下载破解 和 使用手册
-------------------一般操作新建:new - physical data model -- DBMS:mysql5
查看建表语句:双击你在pd里面所建的表--》选择“perview”,可以查看这张表的建表语句。
m表示不能为空
p是主键
自增问题:解决方法如下:
在你所要设为自增型的键上(比如你的id)双击,弹出一个ColumnProperties对话框,右下角有一个Identify的选择框,选中它OK,就可以了。
再去查看Preview,就能看到用大写标识出来的AUTO_INCREMENT。
右键表属性在physical options中可设置表类型MYISAM
设置编码:PowerDesigner生成sql问题生成sql的方法是 Database -->GenerateDatabase (Ctrl + G ),选择DataBase——Generate DataBase——Format——Text Formatting,选择UTF8;
设置字段默认值:双击表,出现column列表,双击要设置的列的左边的灰色框,应该会弹出新的窗口,然后在新窗口上选择standard checks ,里面有default的默认值
primary key (id):一定要把主键脚本生成在create table里面,可以在生成数据库脚本的时候进行设置:菜单Database-->Database Generation-->Options-->选择左边的"Key"-->把右边的"Outside"改为"Inside"
/*==============================================================*/
/* Table: product */
/*==============================================================*/
create table product
(
id int(10) notnull auto_increment,
name varchar(255),
num decimal(10,2),
ctime datetime,
content text,
class_id int(10),
class_name varchar(255),
primary key (id)
);
---------------------导出MYSQL报错:generation aborted due to errors detected during the verification of the model
生成sql的方法是 Database -->Generate Database (Ctrl + G ) 但是提示 Generation aborted due to errors detected during the verification of the model.
检查了好久 发现将Options中的check model 去掉就可以了!
还有 one file on 如果去掉的话是按照表生成许多个sql
如果需要直接生成到数据库中可以选择odbc generation
------------------表关联
页:
[1]