1

I have a bunch of Oracle SQL queries I'd like to prepare some visual model / diagrams for. For example, to show all of the tables, the joins, and the join conditions.

Does such a tool exist?

corycorycory
  • 1,448
  • 2
  • 23
  • 42
  • Oracle has a tool for creating ER diagrams, see this: https://stackoverflow.com/questions/6580529/how-to-generate-an-entity-relationship-er-diagram-using-oracle-sql-developer – Mehrad Eslami Jun 06 '18 at 16:58

2 Answers2

4

Yes, Oracle SQL Developer, and it's included with your license of Oracle Database...in other words, it's free.

Bonus, it's Java, so will run on Windows, OS X, and Linux.

Open a connection, this give you a SQL Worksheet.

Type your query, example:

select b.extra_column
      ,b.department_id
      ,b.department_name
      ,b.manager_id
      ,b.location_id
      ,c.employee_id
      ,c.first_name
      ,c.last_name
      ,c.email
      ,c.phone_number
      ,c.hire_date
      ,c.job_id
      ,c.salary
      ,c.commission_pct
      ,c.manager_id
      ,c.department_id
      ,a.location_id
      ,a.street_address
      ,a.postal_code
      ,a.city
      ,a.state_province
      ,a.country_id
  from departments b
    ,locations a
    ,employees c
 where a.location_id = b.location_id
   and c.employee_id = b.manager_id
   and b.department_id = c.department_id;

Click the Query Builder tab.

enter image description here

Voila.

enter image description here

Note there is a performance bug in current version, will be fixed for version 18.2. In other words, it will take a few moments to render the diagram for you today.

thatjeffsmith
  • 20,522
  • 6
  • 37
  • 120
-1

Also this, from the SQL text only with no need to create the tables: https://sqldep.com/

FranckPachot
  • 414
  • 4
  • 10