前言
- 做过建模和设计的人都知道,powerdesigner是个强大实用的工具;采用模型驱动方法,将业务与IT结合起来,可帮助部署有效的企业体系架构,并为研发生命周期管理提供强大的分析与设计技术。本文档简单的介绍一下创建目录、画类图、把类图转成ER图、修整转化后的ER图信息、根据ER图生成sql。
如何运用powerdesigner创建目录
新建工作空间并新建一个Object-Oriented Model
![](https://images2017.cnblogs.com/blog/868068/201801/868068-20180106154647237-1810814315.png)
![](https://images2017.cnblogs.com/blog/868068/201801/868068-20180106154700659-680419131.png)
修改ClassDiagram名字。
根据具体的业务来起名字
![](https://images2017.cnblogs.com/blog/868068/201801/868068-20180106154742174-1747874004.png)
![](https://images2017.cnblogs.com/blog/868068/201801/868068-20180106154752846-1687823508.png)
如何运用powerdesigner画类图
画出类图关系
![](https://images2017.cnblogs.com/blog/868068/201801/868068-20180106154859503-895908087.png)
具体化类信息
![](https://images2017.cnblogs.com/blog/868068/201801/868068-20180106154921987-1973733807.png)
具体化属性信息
![](https://images2017.cnblogs.com/blog/868068/201801/868068-20180106154938487-789204799.png)
![](https://images2017.cnblogs.com/blog/868068/201801/868068-20180106154945143-194743360.png)
具体化方法信息
![](https://images2017.cnblogs.com/blog/868068/201801/868068-20180106155007456-1001047413.png)
![](https://images2017.cnblogs.com/blog/868068/201801/868068-20180106155013909-2077655767.png)
![](https://images2017.cnblogs.com/blog/868068/201801/868068-20180106155020112-558080098.png)
![](https://images2017.cnblogs.com/blog/868068/201801/868068-20180106155026362-359534174.png)
效果图
![](https://images2017.cnblogs.com/blog/868068/201801/868068-20180106155051174-1946818148.png)
把类图转成ER图
新增physical Data Model
![](https://images2017.cnblogs.com/blog/868068/201801/868068-20180106155130174-877685628.png)
选择数据库类型
![](https://images2017.cnblogs.com/blog/868068/201801/868068-20180106155148378-1313585107.png)
选择要转化的对象
![](https://images2017.cnblogs.com/blog/868068/201801/868068-20180106155206284-1505385283.png)
效果图
![](https://images2017.cnblogs.com/blog/868068/201801/868068-20180106155225378-288028930.png)
修整转化后的ER图信息
修整表的信息
![](https://images2017.cnblogs.com/blog/868068/201801/868068-20180106155300565-828132632.png)
修整表的字段信息
![](https://images2017.cnblogs.com/blog/868068/201801/868068-20180106155319674-754182107.png)
预览
![](https://images2017.cnblogs.com/blog/868068/201801/868068-20180106155336721-695728762.png)
根据ER图生成sql
生成Database
![](https://images2017.cnblogs.com/blog/868068/201801/868068-20180106155406299-937154268.png)
选择存放文件的路径和文件名
![](https://images2017.cnblogs.com/blog/868068/201801/868068-20180106155428987-974607811.png)
选择要输出的表
![](https://images2017.cnblogs.com/blog/868068/201801/868068-20180106155446971-2062088292.png)
效果
![](https://images2017.cnblogs.com/blog/868068/201801/868068-20180106155503409-1956529108.png)
注意事项
去除pdOid注释,这样类图中的preview注释中就不会有一堆乱码。
具体操作:Java::Generation/Options/GenerateOID,Value值设置为No
导出 sql 步骤,需要注意的地方
想要生成的sql能把注释自动增加上
在Database-->edit Current DBMS...设置dbms的属性,找到mysql5.0-->script-->objects-->column-->add
posted on
2018-01-06 16:01
nikeodong
阅读(
936)
评论()
编辑
收藏
举报