uriDium
uriDium

Reputation: 13420

Is there a way to view relationships in Oracle SQL Developer?

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.

Upvotes: 17

Views: 68629

Answers (3)

jcadcell
jcadcell

Reputation: 811

Steps in SQL Developer

  • go to View > Data Modeler > Browser to open up the Browser view/tab.
  • (Browser view/tab*) right click on Relational Models and select New Relational Model which opens up a new window.

This should create a new blank diagram which one can drag and drop tables from the Connections view into the diagram.

Upvotes: 19

tuinstoel
tuinstoel

Reputation: 7306

See Oracle SQL Developer Data Modeler: http://www.oracle.com/technetwork/developer-tools/datamodeler/overview/index.html

Upvotes: 2

dpbradley
dpbradley

Reputation: 11915

It's not clear if you're looking for a GUI solution, but you can query the information from the dictionary by:

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')
  ) 

Upvotes: 18

Related Questions