powerdesigner 遇到的各种问题总结
1. 设置自增

打开表 -- 在具体列的前面双击即可添加各种属性
2. 生成sql 时设置编码
database --> generate database --> format --> encoding
3. 生成sql 时name作为注释
3.1 1 database --> edit current dbms --> Script--> Object--> Column--> ColumnComment
3.12 将ColumnComment的value改为comment on column [%QUALIFIER%]%TABLE%.%COLUMN% is %.q:COLNNAME%
注: 第二步中有的版本value是有值的,有的版本是空的,我的版本就是空的
3.13 数据库---> Deneration Database --> Format--> 勾选Generate name in empty comment
参考: https://blog.csdn.net/shixun67/article/details/77521076
---- 上面的方法可惜没有解决我的问题, 下面是我采用的方法
3.2 Tools->Execute Commands->Edit/Run Scripts,执行下面的脚本
'把pd中那么name想自动添加到comment里面
'如果comment为空,则填入name;如果不为空,则保留不变,这样可以避免已有的注释丢失. Option Explicit ValidationMode = True InteractiveMode = im_Batch Dim mdl ' the current model ' get the current active model Set mdl = ActiveModel If (mdl Is Nothing) Then MsgBox "There is no current Model " ElseIf Not mdl.IsKindOf(PdPDM.cls_Model) Then MsgBox "The current model is not an Physical Data model. " Else ProcessFolder mdl End If ' This routine copy name into comment for each table, each column and each view ' of the current folder Private sub ProcessFolder(folder) Dim Tab 'running table for each Tab in folder.tables if not tab.isShortcut then if trim(tab.comment)="" then '如果有表的注释,则不改变它.如果没有表注释.则把name添加到注释里面. tab.comment = tab.name end if Dim col ' running column for each col in tab.columns if trim(col.comment)="" then '如果col的comment为空,则填入name,如果已有注释,则不添加;这样可以避免已有注释丢失. col.comment= col.name end if next end if next Dim view 'running view for each view in folder.Views if not view.isShortcut and trim(view.comment)="" then view.comment = view.name end if next ' go into the sub-packages Dim f ' running folder For Each f In folder.Packages if not f.IsShortcut then ProcessFolder f end if Next end sub
然后可以将脚本保存为 name2comment.vbs(我保存了)
参考1:https://www.cnblogs.com/xujingyang/p/9071820.html
参考2: https://www.cnblogs.com/telwanggs/p/7698260.html
4. 有些很复杂的外键删除
1. 首先可以只删除symbol(Delete Symbols only))
2. 左边的工作空间里有References, 所有的外键可以在这儿编辑和删除
5. 设置字符集和存储引擎
第一种方法:
1.1. Database => Edit Current DBMS => Mysql5.0 => Script => Objects => Table => Options
1.2. 在右边的Value框内最后部分追加:
DEFAULT CHARACTER SET = %s : list = utf8 | gbk, default = utf8
powerdesigner 遇到的各种问题总结的更多相关文章
- 真正的汉化-PowerDesigner 16.5 汉化
一.背景 经常使用PowerDesigner,之前使用15版本,后来16出来后,就一直在使用16,不过一直是英文.一些同事对使用英文版总显示有些吃力. 遍寻百度.必应,都没有找到真正的针对版本16的汉 ...
- 用VB脚本批到导入字段到PowerDesigner
在PowerDesigner使用脚本批量导入excel中记录的表结构信息,由于需要通过powerdesigner逆向工程创建一些sybase IQ的表,由于是接口数据,只有excel表,手动导入太耗时 ...
- PowerDesigner(数据建模)使用大全
什么是PowerDesigner 引入百度百科的说法是: power designer是能进行数据库设计的强大的软件,是一款开发人员常用的数据库建模工具.使用它可以分别从概念数据模型(Conceptu ...
- PowerDesigner从Sqlserver中反转为带注释的字典及快捷键操作
PowerDesigner的操作经常忘记,所以把常用的功能记录下来备忘. 1.修改反转过来的字段 PowerDesigner从数据库反转的时候,默认不带注释,需要先进行修改. 输入如下脚本: {OWN ...
- PowerDesigner 常用设置
1.使用 JDBC 方式连接 Oracle 逆向生成数据库 PDM 使用 ODBC 方式连接 Oracle 数据库可以借鉴这位兄弟的博客:http://www.cnblogs.com/clivehua ...
- powerdesigner显示列描述信息
将Comment中的字符COPY至Name中 -------------------------------------------------- Option Explicit Validati ...
- PowerDesigner从SqlServer数据库中导入实体模型
PowerDesigner从SqlServer数据库中导入实体模型 时间 2013-06-28 10:26:34 CSDN博客 原文 http://blog.csdn.net/sxycxwb/art ...
- PowerDesigner连接Oracle并导出表结构
环境:Oracle 11G(远程) + win32_11gR2_client + PowerDesigner 15 一.下载.安装.配置 1.下载地址 win32_11gR2_client客户端下载地 ...
- PowerDesigner通过SQL语句生成PDM文件
前提: 我用的是PowerDesigner15 数据库为Mysql5.5 步骤如下: 第一步:File->New Model 点击OK创建模板就行了 备注:在创建物理模型时DBMS下拉框是空的, ...
- PowerDesigner修改生成mysql视图
今天遇到了个问题,就是有PowerDesigner的设计图,能生成oracle的视图,不能生成mysql,在网上找到了解决方案, 非常感谢各位网友的分享,这个不是抄袭,主要是为了让更多的人知道这种解决 ...
随机推荐
- Mysql--基本配置
登录的常用参数 mysql -uroot -p 之后再加上密码 mysql -uroot -p+密码 这个方法不安全 mysql -hlocalhost -uroot -p 之后再加上密码 ...
- CodeForces 785D Anton and School - 2 (组合数学)
题意:有一个只有’(‘和’)’的串,可以随意的删除随意多个位置的符号,现在问能构成((((((…((()))))….))))))这种对称的情况有多少种,保证中间对称,左边为’(‘右边为’)’. 析:通 ...
- 自己写的Log记录组件
常规的Debug组件的封装,然后加了一个文件log,分异步和同步(可跨平台使用). /// <summary> /// 常用IO操作类 /// </summary> publi ...
- SqlServer学习笔记【暂】
Sql学习笔记,暂时先保存在着,等不忙了再整理成章节,如果其中有问题的,还请各位大神不吝赐教! --------------------------------------所有的数据基于Northwi ...
- UINavigationController + UIScrollView组合,视图尺寸的设置探秘(一)
UINavigationController和UIScrollView是iOS下几种主要的交互元素,但当我搭配二者在一起时,UIScrollView的滚动区域出现了很诡异的现象.我希望UIScroll ...
- CF796A Buying A House 模拟
Zane the wizard had never loved anyone before, until he fell in love with a girl, whose name remains ...
- 【模板】文艺平衡树(Splay) 区间翻转 BZOJ 3223
您需要写一种数据结构(可参考题目标题),来维护一个有序数列,其中需要提供以下操作:翻转一个区间,例如原有序序列是5 4 3 2 1,翻转区间是[2,4]的话,结果是5 2 3 4 1 N,M<= ...
- springboot整合springtask
在使用 springmvc 中,一般的定时任务是使用 job 或者 quartz 或者timer来实现,但是使用它们的时候比较麻烦,会在 xml 文件中配置很多, springboot 的定时任务比较 ...
- Luogu5324 BJOI2019删数(线段树)
考虑无修改怎么做.对于1~n的每个数,若其存在,将最后一个放在其值的位置,剩余在其前面依次排列,答案即为值域1~n上没有数的位置个数.带修改显然记一下偏移量线段树改一改就好了. #include< ...
- Subversion Server Edge的安装使用
1.Subversion Server Edge的搭建 当在操作系统为64位的配置服务器上部署时只能够选择Collabnet Subversion Edge,它集合了Subversion所需要一切资源 ...