PowerDesigner链接Oracle导出数据模型,并且显示中文注释

1. 首先新建模型,选择物理数据模型
PowerDesigner链接Oracle导出数据模型,并且显示中文注释

2. 对新建模型命名,选择对应的数据库版本
PowerDesigner链接Oracle导出数据模型,并且显示中文注释

3. 选中新建的模型图,选择从数据库更新模型
PowerDesigner链接Oracle导出数据模型,并且显示中文注释

4. 选择使用数据源
PowerDesigner链接Oracle导出数据模型,并且显示中文注释
PowerDesigner链接Oracle导出数据模型,并且显示中文注释
5.新建数据源
PowerDesigner链接Oracle导出数据模型,并且显示中文注释
PowerDesigner链接Oracle导出数据模型,并且显示中文注释
如果在当前页面无法选择系统数据源,说明当前软件不是在管理员模式下运行的。退出,重新新建,点击PowerDesigner右键,选择以管理员身份运行即可。
PowerDesigner链接Oracle导出数据模型,并且显示中文注释
选择对应的驱动,如果本机没有对应的驱动程序,可以百度任意安装一个Oracle驱动即可。
PowerDesigner链接Oracle导出数据模型,并且显示中文注释
点击完成,填写数据库连接信息
PowerDesigner链接Oracle导出数据模型,并且显示中文注释
PowerDesigner链接Oracle导出数据模型,并且显示中文注释
选择刚刚配置好的数据源
PowerDesigner链接Oracle导出数据模型,并且显示中文注释
PowerDesigner链接Oracle导出数据模型,并且显示中文注释
点击确定即可。
PowerDesigner链接Oracle导出数据模型,并且显示中文注释
选择你要导出的表
PowerDesigner链接Oracle导出数据模型,并且显示中文注释
导出如图所示
PowerDesigner链接Oracle导出数据模型,并且显示中文注释

6. 给导出的模型加上中文注释
PowerDesigner链接Oracle导出数据模型,并且显示中文注释
双击导出表模型图,选择Columns查看。可以使用上面的筛选按钮,选择要展示的列。
下来需要让字段的中文注释显示到模型图上

  • 首先,增加自定义字段
    PowerDesigner链接Oracle导出数据模型,并且显示中文注释
    PowerDesigner链接Oracle导出数据模型,并且显示中文注释
    PowerDesigner链接Oracle导出数据模型,并且显示中文注释
    PowerDesigner链接Oracle导出数据模型,并且显示中文注释
    PowerDesigner链接Oracle导出数据模型,并且显示中文注释
    PowerDesigner链接Oracle导出数据模型,并且显示中文注释
    切换到Get Method Script tab:把原有的代码:
    %Get% = “”
    换成:%Get% = Rtf2Ascii (obj.Comment)
    注意:mysql是换成%Get% = Rtf2Ascii (obj.Comment)。
    PowerDesigner链接Oracle导出数据模型,并且显示中文注释
    PowerDesigner链接Oracle导出数据模型,并且显示中文注释
    PowerDesigner链接Oracle导出数据模型,并且显示中文注释
    PowerDesigner链接Oracle导出数据模型,并且显示中文注释
    选中刚刚自定义的列
    PowerDesigner链接Oracle导出数据模型,并且显示中文注释
    直接确定,到此我们可以看见视图
    PowerDesigner链接Oracle导出数据模型,并且显示中文注释
    - 结尾
    PowerDesigner链接Oracle导出数据模型,并且显示中文注释
    建立表关系。通常是子表指向主表(子表中将主表的主键作为外键)

对于PowerDesigner,我之前使用的并不多,此次只是由于项目交接需要导出数据模型,如有个别错误之处,还望各位不吝赐教。