Good tool to visualise database schema?

121,366

Solution 1

I found SchemaSpy quite good - you have to run the script every time schema changes but it is not so big deal.

As pointed out in the comments there is also a GUI for it.

Another nice tool is SchemaCrawler.

Solution 2

I usually use SchemaSpy to do this, but recently I found a really simple article on sqlfairy that just uses the dump file to create the structure graph

Solution 3

I like this tool, called simply DbSchema. It's written in Java so it runs on OS X, Windows, or Linux. It's a little clunky, especially when it comes to printing, but from my experience they're all like that. This one is the best of the several I've tried. It makes nice, clear diagrams. Free trial. Costs about $120 depending on how many licenses you buy.

Solution 4

on Mac OS X you can use Sequel Pro

Solution 5

I would recommend Toad data modeller

Share:
121,366
Mat
Author by

Mat

Updated on July 08, 2022

Comments

  • Mat
    Mat almost 2 years

    Are there any good tools for visualising a pre-existing database schema? I'm using MySQL if it matters.

    I'm currently using MySQL Workbench to process an SQL create script dump, but it's clunky, slow and a manual process to drag all the tables about (which would be okay if it wasn't so slow).

  • Balmus
    Balmus over 15 years
    Red Gate's tools are SQL Server only I'm afraid.
  • Mat
    Mat over 15 years
    Yeah, it kinda helped but wasn't great.
  • Brian Fisher
    Brian Fisher over 15 years
    Worth a try, I always end up arranging myself too - but sometimes it can get me started.
  • James McMahon
    James McMahon about 15 years
    Thanks, I thought the command line interface was kind of a pain, of course once I got it working I noticed the link to the GUI off the front page, joachim-uhl.de/projekte/schemaspygui. It should also be noted that program inserts Google ads into the resulting HTML.
  • wheleph
    wheleph almost 14 years
    Excellent tool. There's also free edition that has most of the great features (synchronization with live db for example).
  • Dolph
    Dolph over 13 years
    Maybe this works for trivial schemas, but I tried it on a schema with 28 tables and it just gave me a purely vertical list of all the tables in alphabetical order, with a mess of vertical lines attempting to illustrate relationships. Couldn't be any more useless.
  • Adam Plumb
    Adam Plumb about 13 years
    I agree with this. I've been looking for any GUI tool to visualize postgresql databases on linux and most of them fall flat on their face. I've just started using SQL Developer but it is the best free option I've found so far.
  • mikewaters
    mikewaters over 12 years
    +1 for sqlfairy not required the JRE (like most of the other answers).
  • Anne
    Anne over 11 years
    +1 Sequel Pro is highly recommendable.
  • Ziyan Junaideen
    Ziyan Junaideen about 11 years
    Exactly, in my case 40 tables. You can click to drag it, but once you select, you cant de select.
  • fguillen
    fguillen almost 11 years
    I think this answer needs extra explanation: norbauer.com/rails-consulting/notes/…
  • Russ
    Russ almost 11 years
    I can't provide a new answer since the question is now closed, but the tool you actually want is DbVisualizer (dbvis.com). It is fantastic... far better than what I recommended in my question (if my usage over the last few years is any indication).
  • RubeOnRails
    RubeOnRails over 10 years
    You could also checkout Schemapper for Rails 3.0+
  • Lonzak
    Lonzak over 10 years
    Please note, that the autolayout feature is not suited for bigger databases - it is just a big mess. (e.g. the space for the diagram seems to be limited and thus there are lots of tables crammed on the right border (in our case 75 tables in one place). I played around with the different layout options but the result is not good in any of the options.
  • Ken Prince
    Ken Prince over 9 years
    This is good. And its worth noting that plenty of yak shaving must be done to get it working.
  • fivedogit
    fivedogit almost 9 years
    I just got what I needed from sqlfairy. Simple and quick.
  • Nassim
    Nassim almost 9 years
    this is a great tool, it can even generate virtual foreign keys, wow!
  • Pascal
    Pascal over 8 years
    sqlfairy can use huge amounts of disk space for large databases. I ran it for a database that was 615mb large and it broke down after having filled the 18gb that remained free on my harddisk.
  • Hons
    Hons over 8 years
    That's an old comment... Are this tools still under development?
  • iled
    iled about 8 years
    This is great! It was easy to get it working. Just follow the instructions. Also, it should be noted that it works not only with MySQL and: DB2, Derby, Firebird, HSQLDB, Informix, MaxDB, MS SQL, Oracle, PostgreSQL, SQLite, Sbase, Teradata.
  • Duke
    Duke about 8 years
    It appears that railroad is dead; long live railroady. github.com/preston/railroady gem install railroady
  • Aralox
    Aralox over 7 years
    Save yourself the work and go with DbVisualizer (dbvis.com). It works with a variety of databases including SQLite, and their EULA allows the free version to be used for commercial projects.
  • Arvid
    Arvid over 7 years
    Thanks @fguillen! Let's add the explanation right here (before the link might break…). It's only 4 easy steps: 1.) Install graphviz, it's available in MacPorts (sudo port install graphviz) and in Homebrew (brew install graphviz). 2.) Export Dot file (in SequelPro go to File > Export > Graphviz Dot and export your database) 3.) Open terminal and convert dot file to SVG dot -Tsvg your_database.dot > your_database.svg 4.) Optionally convert generated SVG to JPG or PNG using any tool of your choice (Inkscape, ImageMagick, GraphicsMagick, etc.)
  • ozma
    ozma almost 2 years
    sudo aptitude install sqlfairy (in ubuntu)