PowerDesigner15连接Oracle数据库并导出Oracle的表结构.doc
文本预览下载声明
我们介绍了,根据建立的数据源进行E-R图生成。详细步骤如下:
启动、菜单:File-Reverse Engineer -Database 出来New Physical Data Model对话框
点击“确定”按钮,弹出Database Reverse Engineering Options对话框:
在此我们选择Using a data source,点击数据源按钮弹出Connection to a Data Source对话框,在下拉框中选择我们之前建立的数据源,
并输入User ID和password
点击Connection即可连接至数据库,并得取所有的数据库对象,在此我们选择所有的Table。
最后点击OK,大功告成!!,以下为部分截图:
3-2、利用vbs脚本完成。
在Sybase安装路径VB Scripts下新建Comments2Name.vbs,内容如下:
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(ment) 0 then = ment end if On Error Resume Next Dim col running column for each col in tab.columns if len(ment) 0 then =ment end if On Error Resume Next next end if next end sub
在生成的PDM中, Powerdesigner界面--Execute Cmmands-Edit/Run Scripts
在打开的界面中,左上角,选择打开,Ctrl+O,选取刚才的Comments2Name.vbs,并Run,效果同上。
显示全部