0

Possible Duplicate:
Tools to generate a database diagram/ER diagram from existing Oracle database?

I am working with a large scale DB. I am using SQL Developer to access the Oracle DB. I have a high number of tables and schemas, and the tables are related to each other in some way. i.e. fields in table A exist in B as well so on...

I have heard there is a way to find out how they are all linked and produce a graph or a tree/list.

Can anyone help?

Thanks

Community
  • 1
  • 1
case
  • 175
  • 2
  • 4
  • 18

2 Answers2

3

First, you can query user_constraints/all_constraints/dba_constraints to produce a list of the foreign key relationships defined between tables. That can be formatted to be input to a number of graphing programs that will produce a directed graph of the relationships. I've used graphviz for this because at the simplest level you only need to output text along the lines of:

table1 -> table2
table2 -> table2
table2 -> table3

You can build on this to define the nodes as "records" to add more information about the tables.

Advantages: Completely free, much better automatic layout than ER tools Disadvantages: Needs a bit of coding.

David Aldridge
  • 51,479
  • 8
  • 68
  • 96
2

Try Oracle Data Modeller. You can generate ER diagram from your existing database schema.

Alen Oblak
  • 3,285
  • 13
  • 27
  • Thanks for that. I will tr it. However, I do remember an old collegue did a more basic query or script somehow. Thanks though – case Jan 15 '13 at 11:25
  • @sponger: if you need a query, you can try user_constraints/all_constraints/dba_constraints as David Aldridge sugessted. – Alen Oblak Jan 15 '13 at 12:07