转载地址:http://fengyie007.iteye.com/blog/232784
1、PowerDesigner 使用MySQL的auto_increment
◇问题描述:
PD怎样能使主键id使用MySQL的auto_increment呢?
◇解决方法:
打开table properties窗口 → columns → 选中id列 → 打开columns properties窗口 → 勾选identity即可
注意:概念模型没有此选项,物理模型才有
2、PowerDesigner 去掉SQL脚本中的双引号
◇问题描述:
PD生成Oracle数据库建表SQL时,默认会给表名和字段名加上双引号,怎样能去掉SQL脚本中的双引号呢?
◇解决方法:
把Database → Edit Current DBMS → General → Script → Sql → Format → CaseSensitivityUsingQuote设置为NO即可
3、PowerDesigner 生成SQL语句时不使用Domain
◇问题描述:
如果在PD中使用了Domain,生成SQLServer的数据库SQL的脚本中会使用与Domain对应的自定义数据类型,而不会使用 SQLServer自己的数据类型,怎样能让PD生成SQL语句时使用SQLServer自己的数据库类型,而不是Domain对应的自定义数据类型呢?
◇解决方法:
把Database → Edit Current DBMS → General → Script → Objects → Domain → Enable设置为NO即可
4、PowerDesigner 中设置Entity的默认字体
◇问题描述:
创建Entity时,如果PD默认字体不适合自己的个人习惯,每次创建了一个实体后都要修改实体的字体,非常麻烦,是否有只修改一次一劳永逸的方法呢?
◇解决方法:
Tools → Display Preferences... → Format → Entity → Modity... → Font → 进行相应修改并保存设置 → Set As Default
5、PowerDesigner 中设置Entity自动调整尺寸大小
◇问题描述:
当给Entity添加了字段或其他修改时,Entiry的显示尺寸大小不会自动调整,怎样解决呢?
◇解决方法:
在Entity上点击右键 → 单击Format...菜单项 → 选择size标签页 → 勾选Auto adjust to text即可
6、在修改name的时候,code的值将跟着变动
◇问题描述:
在修改name的时候,code的值将跟着变动,怎样解决呢?
◇解决方法:
PowerDesign中的选项菜单里修改,在[Tool]-->[General Options]->[Dialog]->[Operating modes]->[Name to Code mirroring],这里默认是让名称和代码同步,将前面的复选框去掉就行了
7、PowerDesigner 生成SQL的Existence of refernce错误问题
◇问题描述:
用PowerDesigner生成SQL语句时,提示Existence of refernce错误。
◇原因:
该表没有与其他表的关联(如外键等),而PowerDesigner需要存在一个refernce才能生成SQL.
◇解决方法:
在工具栏空白处右键打开Palette面板,选中Link/Extended Dependency 按钮,然后在提示出错的表上添加到自己的Dependency。重新生成SQL,你将发现刚才提示的错误没有了,问题解决。
8、利用PowerDesigner批量生成测试数据
◇解决方法:
A:在PowerDesigner 建表
B:然后给每一个表的字段建立相应的摘要文件,步骤如下:
Model->Test Data Profiles配置每一个字段摘要文件General:输入Name、Code、
选择Class(数字、字符、时间)类型
选择Generation Source: Automatic、List、ODBC、File Detail:配置 字段相关信息
所有字段摘要文件配置完成后双击该表->选择字段->Detail->选择Test Data Parameters 摘要文件如果字段值与其它字段有关系在: Computed Expression 中输入计算列--生成测试数据:
DataBase->Generation Test Data->选择:
Genration 类型(Sript、ODBC)
Selection(选择要生成的表)
Test Data Genration(Default number of rows 生成记录行数)
9、E-R图中,同时显示Name和Code
◇问题描述:E-R图中,默认显示的只有Name、Date Type,如果让Name、Code同时显示该怎么办呢?
◇解决方法:双击E-R图,切换到Columns->Customize Columns Fileter,将StereoType勾上,然后将StereoType的值设置成和Name一致;然后Tools->Model Options->Name Convention->Display一栏选Code
10、PowerDesigner,将name列批量转换成comment
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
tab.comment = tab.name
Dim col ' running column
for each col in tab.columns
col.comment= col.name
next
end if
next
Dim view 'running view
for each view in folder.Views
if not view.isShortcut 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
11、PowerDesigner,将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
Private sub ProcessFolder(folder)
On Error Resume Next
Dim Tab 'running table
for each Tab in folder.tables
if not tab.isShortcut then
tab.name = tab.comment
Dim col ' running column
for each col in tab.columns
if col.comment="" then
else
col.name= col.comment
end if
next
end if
next
Dim view 'running view
for each view in folder.Views
if not view.isShortcut then
view.name = view.comment
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
分享到:
相关推荐
调色板(Palette)快捷工具栏不见了;如何把NAME 列在 scrip里显示出来;自增长列的设置;设置CDM生成PDM时的错误检查;禁止根据name自动输入code等
PowerDesigner设计技巧。。。PowerDesigner设计技巧。。。PowerDesigner设计技巧。。。PowerDesigner设计技巧。。。
PowerDesigner一些小技巧 2、由pdm生成建表脚本时,字段超过15字符就发生错误(oracle) 3、生成的建表脚本中如何把对象的双引号去掉? 4、建立一个表后,为何检测出现Existence of index的警告 5、创建一个表在...
PowerDesigner使用技巧,快捷键
是本人在设计数据库时整理出来的powerdesigner资料
PowerDesigner一些使用技巧 网上找到的一些资源,给大家分享下!
powerdesigner的大小写转换脚本,直接在powerdesigner里面找到执行脚本的地方,粘贴进去执行一下就可以了。 powerdesigner的大小写转换脚本 powerdesigner的大小写转换脚本
powerdesigner
Powerdesigner 使用技巧
PowerDesigner PowerDesigner 使用
1.先安装PowerDesigner 12 下载PowerDesigner 12英文官方版: http://dl01.nbdown.net//Program/Sybase.PowerDesiner.v12.0.zip 2.只需将下面下载的这个powerdesigner12的破解文件,只需要把pdflm12.dll 这个...
powerdesigner进行相关物理数据模型的使用技巧的操作说明
powerdesigner 导出报告模板
PowerDesigner最初由Xiao-Yun Wang(王晓昀)在SDP Technologies公司开发完成。PowerDesigner是Sybase的企业建模和设计解决方案,采用模型驱动方法,将业务与IT结合起来,可帮助部署有效的企业体系架构,并为研发...
PowerDesigner技巧集1_7
PowerDesigner12.5入门及技巧
PowerDesigner 16.7安装包 - 64位
PowerDesigner 15.2.0.3042 官方下载: 目前 PowerDesigner 最新官方正式版本为 15.2.0.3042 ,官方下载地址: 主程序:PowerDesigner152_Evaluation.exe ...