如何在 PowerDesigner 中指定数据库架构
我想将我的模型导出到 PostgreSQL 数据库。如果我按原样这样做,则对象将构建在公共架构中,因为模型未指定架构,而公共恰好是默认架构。有谁知道在 PowerDesigner 中指定架构的方法吗?
我可以更改数据库中的默认架构,但这对我来说似乎有点俗气。在我看来,我应该能够在我的建模工具中控制它。
I want to export my model to a PostgreSQL database. If I do so as is, the objects are built in the Public schema, because the model doesn't specify a schema, and Public happens to be the default. Does anyone know a way to specify a schema in PowerDesigner?
I can change the default schema in the database, but that seems a little cheesy to me. I ought to be able to control that in my modeling tool, it seems to me.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
转至工具菜单
转至
类别 > 模型设置 > 表和表格下的模型 选项查看
然后您将在右侧看到默认所有者。
对评论的回应
PD 是一个很棒的工具,因为尝试简单的案例非常容易。请按照以下步骤操作。
现在右键单击浏览器窗格中的 PDM,然后选择预览选项卡。
您将看到:
请注意 table_2 的预览如何具有 DBO。完全按照您的意愿在表名称前面。我还在屏幕截图中包含了表格列表的屏幕。您可以通过模型菜单找到它。请注意如何将 table_2 的所有者设置为 DBO 用户,与预览的 DDL 中完全相同。如果您进入 table_1 的属性或使用此屏幕来集体更改所有表,则所有 DDL 都将按照您想要的方式工作。
XDB 文件
不确定 %QUALIFIER% 变量填充了什么,但它似乎有效。
Go to the Tools Menu
Go to Model Options
Under Category>Model Settings>Table & View
Then you'll see Default owner on the right side.
Response to comment
PD is a great tool because it's very easy to try out simple cases. Follow these steps.
Now right click on the PDM in the browser pane and choose the preview tab.
You'll see:
Notice how the preview for table_2 has DBO. in front of the table name EXACTLY as you desire. I've also included in the screencap the screen for the List of Tables. You get to that via the Model menu. Notice how the owner is set to the DBO user for table_2, exactly like in the previewed DDL. If you go into the properties for table_1 or use this screen to change ALL of your tables en masse, all of your DDL will work the way you want.
XDB File
Not sure what the %QUALIFIER% variable gets filled with but it seems to work.