database 有没有办法在 Oracle SQL Developer 中查看关系?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/926437/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Is there a way to view relationships in Oracle SQL Developer?
提问by uriDium
I want to find which tables are related to a specific table. I can see all the foreign key constraints easily enough, but what about table for which the table I am looking at is the primary key table and the other table is the referenced table.
我想查找哪些表与特定表相关。我可以很容易地看到所有的外键约束,但是我正在查看的表是主键表而另一个表是被引用表的表呢?
回答by jcadcell
Steps in SQL Developer
SQL Developer 中的步骤
- go to
View
>Data Modeler
>Browser
to open up theBrowser
view/tab. - (
Browser
view/tab*) right click onRelational Models
and selectNew Relational Model
which opens up a new window.
- 转到
View
>Data Modeler
>Browser
打开Browser
视图/选项卡。 - (
Browser
view/tab*) 右键单击Relational Models
并选择New Relational Model
打开一个新窗口。
This should create a new blank diagram which one can drag and drop tables from the Connections
view into the diagram.
这应该创建一个新的空白图表,可以将表格从Connections
视图拖放到图表中。
回答by dpbradley
It's not clear if you're looking for a GUI solution, but you can query the information from the dictionary by:
不清楚您是否正在寻找 GUI 解决方案,但您可以通过以下方式从字典中查询信息:
select table_name from user_constraints
where r_constraint_name in
(select constraint_name
from user_constraints
where constraint_type in ('P','U')
and table_name = upper('&tableOfInterest')
)
回答by tuinstoel
See Oracle SQL Developer Data Modeler: http://www.oracle.com/technetwork/developer-tools/datamodeler/overview/index.html
请参阅 Oracle SQL Developer 数据建模器:http: //www.oracle.com/technetwork/developer-tools/datamodeler/overview/index.html