PowerDesigner 数据库设计手记
2011-04-21 17:28
211 查看
一、PowerDesigner生成Access2003数据库
1、创建一个空白的Access2003数据库
2、用ODBC 数据源管理器链接到创建的数据库
3、Generation DataBase -> Generation type 选择 Direct generation 选择创建的ODBC
4、点击确定,应该就OK了
二、批量处理 Comment 等于 Name 或 Name 等于 Comment
逆向工程有时候,字段的名字跟说明,要生成数据库报告的时候需要
一下中文,可以按下面的方法批量处理。
1、先做好备份!
2、Tool - > Execute Commands -> Edit/Run Script
批量Comment等于Name.txt
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 code 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
批量Name等于Comment.txt
'* 执行方法:PD11 -- Open PDM -- Tools -- Execute Commands -- Run Script 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 code 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.name = tab.comment Dim col ' running column for each col in tab.columns col.name = col.comment 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
3、点击Run,OK
相关文章推荐
- 使用POWERDESIGNER设计数据库的21条技巧
- PowerDesigner设计数据库
- (初级)善用PowerDesigner提高数据库设计效率
- 使用 PowerDesigner 设计数据库
- 数据库设计---PowerDesigner(物理模型和概念模型)
- 基于PowerDesigner数据库设计实践
- 数据库设计过程遇到的零散点记录powerdesigner 数据库设计 表设计
- 使用POWERDESIGNER设计数据库的20条技巧
- 使用POWERDESIGNER设计数据库的20条技巧
- PowerDesigner设计数据库
- 使用POWERDESIGNER设计数据库的21条技巧
- PowerDesigner设计数据库
- PowerDesigner设计数据库(转)
- 按Sybase的PowerDesigner工具设计的数据库模型 ---> 解析生成能兼容多种数据库的相应的C#底层代码
- 对象的继承关系在数据库中的实现方式和PowerDesigner设计
- 对象的继承关系在数据库中的实现方式和PowerDesigner设计
- PowerDesigner设计数据库
- 使用POWERDESIGNER设计数据库的21条技巧
- powerdesigner 数据库设计的几个基础概念
- ASP.NET网站权限设计实现(一)——使用PowerDesigner进行数据库设计