5

For example DbVisualizer can be used to connect to a DB and create nice diagram out of existing tables and their relations. But in this specific case I do not have a live database but I have bunch of create table and alter statements.

Is there any tool to generate similar diagrams out of SQL DDL?

bluish
  • 26,356
  • 27
  • 122
  • 180
Petteri H
  • 11,779
  • 12
  • 64
  • 94

4 Answers4

8

I found the MySQL tool MySQL Workbench to do a great job. There is a Mac OS X version. More information can be found at http://dev.mysql.com/doc/index-gui.html.

ahalls
  • 1,095
  • 1
  • 12
  • 23
  • I used MySQL Workbench on Windows, it generates diagram. You can click on Arrange -> Autolayout. It arranges all the entities automatically. Very helpful. – Ameer Tamboli Apr 29 '14 at 14:00
  • 1
    If you already have an existing database, you can use `Database -> Reverse Engineer...` to create a graphical mode. – Jonas Gröger Jun 22 '15 at 14:55
4

SQLFairy will generate graphics from plain SQL DDL files:

http://sqlfairy.sourceforge.net/

3

Visual Paradigm for UML can do this.

turtledove
  • 25,464
  • 3
  • 23
  • 20
2

I believe that Embarcadero's ERStudio can import a SQL script into a diagram, but it's a pricey tool to use just for something like this. You could always just create an empty database and run the scripts then point to that.

Tom H
  • 46,766
  • 14
  • 87
  • 128