Power Designer逆向工程导入Oracle表,转为模型加注释
1.打开PowerDesigner ——文件——Reverse Engineer——DataBase
2.选择所要连接数据库版本,此处使用的是oracle version 11g。
3.点击红色区域,选择数据源
4.选择modify
5.在此填写你的数据库名称、连接地址、用户名。确定
6.选择你新建立的连接数据库
7.填写需要转换为模型的数据库的用户名和密码
8.确定即可导出为模型
9.如果数据库中对表或字段有注释,那么通过下面的操作,可以让这些注释反映在物理模型上,在查看pdm图时更容易理解。
选择工具——Execute Commands——Edit /Run Script
10.将11步骤中的代码粘贴到此处,然后执行。即成功加入注释
11. 需要执行的脚本语言(不需要做任何修改)
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
Power Designer逆向工程导入Oracle表,转为模型加注释的更多相关文章
- Oracle、Mysql、SqlServer创建表和给表和字段加注释
一.Oracle --创建表 create table test ( id varchar2(200) primary key not null, sort number, ...
- mysql 给表和字段加注释
给表加注释: ALTER TABLE table_name COMMENT='这是表的注释'; 给列加注释: ALTER table table_name MODIFY `column_name` d ...
- 解决sqoop 导入oracle表时 --split-by参数为日期类型时的报错:ORA-01861: literal does not match format string
报错栈: -- ::, INFO [main] org.apache.sqoop.mapreduce.db.DBRecordReader: Executing query: select " ...
- Power Designer逆向工程连接数据库创建pdm-oracle
1.进入菜单文件-Reverse Engineer-Database... 2.打开窗口,选择数据库版本,点击[确定] 3.打开窗口,选择Usering a data source: 4.如果已经有d ...
- Navicat将表转为模型
右键数据库 -> 逆向数据库到模型
- oracle怎么给表和列加注释
oracle添加注释的语法为: comment on column 字段名 is '注释名' 举例: 创建表: CREATE TABLE t1{ id varchar2(32) primary ke ...
- PowerDesigner跟表的字段加注释
选择那个表 右键- >Properties- >Columns- >Customize Columns and Filter(或直接用快捷键Ctrl+U)- >Comment( ...
- mySql创建带解释的表及给表和字段加注释的实现代码
1.创建带解释的表 CREATE TABLE test_table( t_id INT(11) PRIMARY KEY AUTO_INCREMENT COMMENT '设置主键自增', t_name ...
- 使用Excel表格导入数据到Oracle表
在工作中我们会遇到将通过数据手动录入到系统中的需求,如果数据量比较小,那么手动输入是可行的,倘若数据量很大,那么这些数据手动录入将会是一个很大的工作量,为了简化这个手动录入的操作流程,我们可以使用Ex ...
随机推荐
- selenium断言的分类
操作(action).辅助(accessors)和断言(assertion): 操作action: 模拟用户与 Web 应用程序的交互. 辅助accessors: 这是辅助工具.用于检查应用程序的状态 ...
- hibernate二级缓存实例
hibernate.cfg.xml <?xml version='1.0' encoding='UTF-8'?><!DOCTYPE hibernate-configuration P ...
- PAT——1058. 选择题
批改多选题是比较麻烦的事情,本题就请你写个程序帮助老师批改多选题,并且指出哪道题错的人最多. 输入格式: 输入在第一行给出两个正整数N(<=1000)和M(<=100),分别是学生人数和多 ...
- 错误:maximum number of expressions in a list is 1000
某一日发现这么如下这么一个错误 --> maximum number of expressions in a list is 1000 原因:因为SQL语句中用到了IN字句,而IN中的元素个数 ...
- 阅读AuTO利用深度强化学习自动优化数据中心流量工程(一)
目录 问题 解决方法 模型选择 框架构建 Sigcomm'18 AuTO: Scaling Deep Reinforcement Learning for Datacenter-Scale Autom ...
- typeof 和 instanceof 区别
typeof操作符返回一个字符串,表示未经计算的操作数的类型. 可能返回值有:"undefined"."object"."boolean". ...
- PHP 变量分页标签页面源代码技术分享
最近在研究PHP的常规变量的分页源代码. 现在发布一个给大家看一下. defined('IN_DUOAO') or exit('No permission resources.');$smarty ...
- Delphi XE5的Android开发平台搭建
Delphi XE5支持Android ARM的开发,可以在Android虚拟机里运行,因此建议将XE5安装在64bit的Windows,内存可以大于3GB Delphi XE5安装光盘中包含了最基本 ...
- 微信小游戏websocket支持https/wss
公司新项目需要支持wss,解决方法如下: https://blog.csdn.net/peter_teng/article/details/82866613 proxy_pass http://web ...
- postgresql 安装插件
最近由于工作需要,学习了citusdata 插件,在按照官方文档装好postgresql 之后,不能在psql 中正常启用其它插件 如 : "create extension pg_trg ...