参考
https://blog.csdn.net/sinat_34104446/article/details/79885141
com.mysql.jdbc.Driver
jdbc:mysql://192.168.0.151:3306/nbspider
常见问题:
出现无法初始化JavaVM!
这是因为powerdesiger需要用32位jdk,如果不想修改环境变量,可以在powerdesiger安装目录配置脚本startup-classpath.bat
Set JAVA_HOME=C:\Java\jdk1.8.0_181-32 Set CLASSPATH =C:\Java\repo\mysql\mysql-connector-java\5.1.45\mysql-connector-java-5.1.45.jar pdshell16.exe
另外,若导出的数据量结构中需要导出外键等关系,则酌情选择如下选择项。
选择要导出的数据库,可以先选择“ALL users”,全部反选,然后选择要建立逆向工程的数据库,再点击全选即可
进入首选项
在PowerDesigner中,表结构的代码,名字字段均为英文,不易阅读,若需要将备注中的字段替换到名字段显示,则执行方法:工具 - 执行命令 - 编辑/运行脚本,则弹出如下图中的对话框:
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
执行后可以将VBScript中保存到本地,下次执行时执行本地脚本即可