1.安装所以驱动

https://download.csdn.net/download/qq_28616811/11643773

2.控制面板-管理工具-数据源-添加-选择对应的驱动,就可以了

3.powerDesigner 反向生成

文件-反向工程-dataBase

4.表结构字段字段与注释替换 Open PDM -- Tools -- Execute Commands -- Run Script

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 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

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

5.PowerDesigner中逆向工程将数据库中comment脚本赋值到pdm的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 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 
if len(tab.comment) <> 0 then 
tab.name = tab.comment 
end if 
On Error Resume Next 
Dim col 'running column 
for each col in tab.columns 
if len(col.comment) <>0 then 
col.name =col.comment 
end if 
On Error Resume Next 
next 
end if 
next 
end sub

6.批量将powerdesigner 中字段改成大写

dim model 'current modelset model = ActiveModel
If (model Is Nothing) ThenMsgBox "There is no current Model"ElseIf Not model.IsKindOf(PdPDM.cls_Model) ThenMsgBox "The current model is not an Physical Data model."ElseProcessTables modelProcessSequences modelEnd If
'*****************************************************************************'函数:ProcessSequences'功能:递归遍历所有的序列'*****************************************************************************sub ProcessSequences(folder)'处理模型中的序列:小写改大写dim sequencefor each sequence in folder.sequencessequence.name = UCase(sequence.name)sequence.code = UCase(sequence.code)nextend sub
'*****************************************************************************'函数:ProcessTables'功能:递归遍历所有的表'*****************************************************************************sub ProcessTables(folder)'处理模型中的表dim tablefor each table in folder.tablesif not table.IsShortCut then
ProcessTable tableend ifnext'对子目录进行递归dim subFolderfor each subFolder in folder.PackagesProcessTables subFoldernext
end sub
'*****************************************************************************'函数:ProcessTable'功能:遍历指定table的所有字段,将字段名由小写改成大写,' 字段代码由小写改成大写' 表名由小写改成大写
'*****************************************************************************sub ProcessTable(table)dim colfor each col in table.Columns'将字段名由小写改成大写col.code = UCase(col.code)col.name = UCase(col.name)next
table.name = UCase(table.name)table.code = UCase(table.code)end sub

参考地址:https://blog.csdn.net/hunhun1122/article/details/87796100

https://www.cnblogs.com/sandunban/p/5317845.html

powerDesigner 反向生成mysql数据库库相关推荐

  1. PowerDesigner反向生成物理数据模型

    原文:PowerDesigner反向生成物理数据模型 什么是PowerDesigner Power Designer 是Sybase公司的CASE工具集,使用它可以方便地对管理信息系统进行分析设计,它 ...

  2. 教你使用powerDesigner反向生成oracle数据库模型

    ​ 在设计完表之后,可能需要生成文件进行保存,如果使用sql语句就不是特别友好,通常会使用PowerDesigner文件进行管理.本文将带你使用PowerDesigner反向生成ORACLE数据模型. ...

  3. 利用PowerDesigner反向生成DB设计文档

    从开发流程上来说,通常是先做设计书,在进行开发. 但是还是有很多项目由于各种各样的原因,需要后期补设计书. 本文的所述的方式是,通过PowerDesigner直连Mysql数据库(以此为例).将DB结 ...

  4. PowerDesigner15.5 逆向生成mysql数据PDM文件

    版本:PowerDesigner15.5 数据库:mysql 目标:生成物理模型 操作原理:使用PowerDesigner的逆向功能生成物理模型 操作步骤 1. 点击 菜单 "文件" ...

  5. visio反向生成mysql数据库模型图_Visio对MySQL数据库反向工程生成ER数据库模型图...

    1.首先需要从Mysql下载用于数据库链接的驱动ODBC 根据相应的版本下载即可,下载完后直接在本地安装 2.启动Visio2010(其他版本自学) 新建文档的时候在模板类别里面选"软件和数 ...

  6. datafactory生成mysql数据_测试数据生成工具DataFactory的使用

    DATA FACTORY的使用 Data Factor y是一个数据库测试数据生成工具. Data Factory主要可以利用在以下两个方面:1.按照数据表中要求数据的格式,快速产生标准或不标准的测试 ...

  7. 中国5级行政区域mysql数据库库_GitHub - liangyuquan/china_area_mysql: 中国5级行政区域mysql库...

    china_area_mysql 中国5级行政区域mysql库 爬取国家统计局官网的行政区域数据,包括省市县镇村5个层级; 港澳地区的数据只有3级;台湾地区4级; 包含大陆地区的邮政编码和经纬度信息. ...

  8. 怎么生产mysql.scok_如何更改生产MySQL数据库库表的字符集

    以前学习mysql的时候,实验的笔记,今天整理的时候看到了,所以记录下,备忘 1.导出表结构 mysqldump -uroot -predhat12345 -S /data/3306/mysql.so ...

  9. 使用PowerDesigner反向生成数据模型

    查看全文 http://www.taodudu.cc/news/show-4261579.html 相关文章: PowerDesigner16.5 逆向生成物理模型 rabbitmq的exclusiv ...

  10. mysql下载64位 西西,MYSQL下载v8.0.12.0 Windows版本-MySQL数据库库西西软件下载

    PHP的最佳组合之一,MYSQL数据库,MSI Installer 5.6.11 170.6M MSI Installer 版. 只能在 windows 的系统下面安装. Windows (x86, ...

最新文章

  1. BGP小实验——选路不困难,只要有方法
  2. 牛客网 【每日一题】7月24日题目精讲—小A的柱状图
  3. MATLAB正太分布函数
  4. tcp校验和计算校验和例子_OSI参考模型和TCP/IP参考模型
  5. sql server复制表_具有超过246列的表SQL Server复制
  6. @value 静态变量_C语言基本知识:变量
  7. matlab人口增长线性回归拟合_matlab中的线性拟合-98529851
  8. IOS 开展 分别制定了iphone 和 ipad 好? 或开发一个 Universal好?
  9. 《编程之美》---求二叉树中节点的最大距离
  10. bochs运行xp_bochs xp 镜像下载|bochs xp精简版下载_ - 极光下载站
  11. 超全深度学习细粒度图像分析:项目、综述、教程一网打尽
  12. 开源ERP安装之Opentaps和Openbravo安装指南
  13. oracle数据库开发认证,数据库考试简介之Oracle认证
  14. 架构师更多的是和人打交道,说说我见到和听说到的架构师升级步骤和平时的工作内容
  15. EHR_ERAL_KAYANG店铺提点方案相关函数
  16. 微格教学c语言指针教案,小学微课程教案
  17. zeppelin高可用部署
  18. 《C#零基础入门之百识百例》(三十五)方法返回 -- 自守数
  19. py: pip3老,导致安装 flask avatar 依赖的 pillow 安装不上
  20. python切换前端的iframe页面_如何切换到iframe窗口?

热门文章

  1. ubuntu16.04耳机没有声音解决办法
  2. 《故障排除》——VMware Horizon agent:failed to install vmwusm driveer| winerror code 3758096967
  3. android获取系统签名,Android apk签名详解——AS签名、获取签名信息、系统签名、命令行签名...
  4. 监控mysql锁定状态_mysql InnoDB锁等待的查看及分析
  5. SQL学习笔记(01)_LIKE、IN、通配符
  6. docker 容器健康检查
  7. 开源掌机芯片方案对比
  8. FFT:快速傅里叶变换与高精度乘法
  9. 基于虚拟机的VxWorks实验平台设计与实现(读研时的一篇论文)
  10. 光缆定位仪光衰点定位光纤识别方法