1、 File -> Reverse Engineer -> Database

2、选择sql数据库类型 mysql / sqlserver  /oracle

3、using script file -> 选择sql文件

  using a data source -> 配置数据库连接

4、确定  生成表

5、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 
if len(tab.comment) <> 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) <> then 
col.name =col.comment 
end if 
On Error Resume Next 
next 
end if 
next 
end sub

6、点击run 执行vb语句将comment同步到name

sql文件或连接数据库反向生成pdm文件的更多相关文章

  1. PowerDesigner中SQL文件、数据库表反向生成PDM

    1      反向生成PDM 1)        创建一个空的PDM模型(选择相应的DBMS): 2)        选择[Database]--[Update Model from Database ...

  2. PD 之 连接数据库并导出数据及生成PDM文件

    使用PowerDesigner工具,连接数据库并导出数据及生成PDM文件. 1.建立连接 “以管理员身份运行”打开PowerDesigner,右键“Workspace”→“New”→“Physical ...

  3. PowerDesigner通过SQL语句生成PDM文件并将name和comment进行互相转换

    本篇文章主要介绍了PowerDesigner通过SQL语句生成PDM文件并将name和comment进行互相转换 超详细过程(图文),具有一定的参考价值,感兴趣的小伙伴们可以参考一下 1.软件准备 软 ...

  4. 使用pd从数据库逆向生成pdm文件

    使用pd从数据库逆向生成pdm文件 好久没更新博客了,最近忙着各种事,捞了点老本行java的一些东西,浑浑噩噩,花了几天时间用java搭建了一个小项目的restful接口,深深觉得这东西论效率被nod ...

  5. (Unity)Unity自定义Debug日志文件,利用VS生成Dll文件并使用Dotfuscated进展混淆,避免被反编译

    Unity自定义Debug日志文件,利用VS生成Dll文件并使用Dotfuscated进行混淆,避免被反编译. 1.打开VS,博主所用版本是Visual Studio 2013. 2.新建一个VC项目 ...

  6. 【U1结业机试题】新闻内容管理系统:解析XML文件读取Html模版生成网页文件

    一.作业要求: 1.在xml文件中创建新闻节点news,包含标题.作者.日期.正文等信息 2.创建HTML模板文件 3.读取xml中所有新闻信息,并使用新闻信息替换模板文件中占位符,从而为每一条新闻生 ...

  7. PowerDesigner通过SQL语句生成PDM文件

    前提: 我用的是PowerDesigner15 数据库为Mysql5.5 步骤如下: 第一步:File->New Model 点击OK创建模板就行了 备注:在创建物理模型时DBMS下拉框是空的, ...

  8. 小程序---根据数据库反向生成java文件

    工作中写entry太繁琐,写了一个小程序反向生成.从而大大减少了工作量 import java.io.File; import java.io.FileWriter; import java.io.I ...

  9. 如何将数据库中已有表导入到powerDesigner生成pdm文件

    1.create new PDM: 2.select database menu; 3.click Reverse  Engineer database :4.then choose your scr ...

随机推荐

  1. [20171031]rman xxx Failure.txt

    [20171031]rman xxx Failure.txt --//简单测试 List Failure, Advise Failure and Repair Failure命令在11g下,也许以后工 ...

  2. What To Do When MySQL Runs Out of Memory: Troubleshooting Guide

    In this article, I will show you how to use the new version of MySQL (5.7+) and how to troubleshoot ...

  3. Spring RestTemplate 中文乱码问题

    1.原因 由于RestTemplate的默认构造方法初始化的StringHttpMessageConverter的默认字符集是ISO-8859-1,所以导致RestTemplate请求的响应内容会出现 ...

  4. k-vim安装及The ycmd server SHUT DOWN (restart with ':YcmRestartServer')这种错误的解决方法

    vim配置 下载地址:https://github.com/wklken/k-vim 安装步骤: 1. clone 到本地 git clone https://github.com/wklken/k- ...

  5. 数据可视化:CSV格式,JSON格式

    下载CSV格式数据,进行可视化 csv.reader()创建一个与文件有关联的阅读器(reader)对象,reader处理文件中的第一行数据,并将每一项数据都存储在列表中 head_row = nex ...

  6. January 02nd, 2018 Week 01st Tuesday

    I dream my painting, and then I paint my dream. 我梦见我的画,然后我画我的梦. It was a long time after I had a goo ...

  7. IDEA设置注释的颜色

    IDEA默认的灰色注释确实让人看不清,但如果把灰色调成黑色又和代码的颜色相同了,所以,不如给注释添加上绿色的背景,又护眼又容易分辨 新版本的IDEA打开Settings——Editot——Color ...

  8. 用JQuery操作元素的style属性

    可以直接利用css()方法获取元素的样式属性,JQuery代码如下: 1 $("p").css("color");  //获取p元素的样式颜色 无论color属 ...

  9. 控件_RadioGroup&&RadioButton(单选按钮)和Toast

    <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools=&q ...

  10. Django之Template

    模板层(template) 概念:  模板与html的区别:  模板=html+模板语法 模板语法: 1 变量:       {{}}    深度查询: 通过句点符.    列表,字典    clas ...