Good tool to visualise database schema?
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.
Mat
Updated on July 08, 2022Comments
-
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).
-
gcb over 10 yearsthere is no alternative to reading the thing... unless you think this is helpfull apidocs.sugarcrm.com/schema/6.5.14/ce/tables/campaign_log.html
-
Jeroen almost 10 yearsI've asked this question again, on softwarerecs.stackexchange.com, and highly welcome any alternatives to my own current solution.
-
Devart almost 6 yearsVisualize mysql schemas using dbForge Studio for MySQL. Database Designer is included to the free Express edition.
-
uudaddy over 3 yearsMySQL workbench is pretty good in my opinion. I followed this tutorial and was able to create a decent ER diagram. "Create ER Diagram of a Database in MySQL Workbench": medium.com/@tushar0618/…
-
-
Balmus over 15 yearsRed Gate's tools are SQL Server only I'm afraid.
-
Mat over 15 yearsYeah, it kinda helped but wasn't great.
-
Brian Fisher over 15 yearsWorth a try, I always end up arranging myself too - but sometimes it can get me started.
-
James McMahon about 15 yearsThanks, 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 almost 14 yearsExcellent tool. There's also free edition that has most of the great features (synchronization with live db for example).
-
Dolph over 13 yearsMaybe 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 about 13 yearsI 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 over 12 years+1 for sqlfairy not required the JRE (like most of the other answers).
-
Anne over 11 years
+1
Sequel Pro is highly recommendable. -
Ziyan Junaideen about 11 yearsExactly, in my case 40 tables. You can click to drag it, but once you select, you cant de select.
-
fguillen almost 11 yearsI think this answer needs extra explanation: norbauer.com/rails-consulting/notes/…
-
Russ almost 11 yearsI 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 over 10 yearsYou could also checkout Schemapper for Rails 3.0+
-
Lonzak over 10 yearsPlease 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 over 9 yearsThis is good. And its worth noting that plenty of yak shaving must be done to get it working.
-
fivedogit almost 9 yearsI just got what I needed from sqlfairy. Simple and quick.
-
Nassim almost 9 yearsthis is a great tool, it can even generate virtual foreign keys, wow!
-
Pascal over 8 yearssqlfairy 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 over 8 yearsThat's an old comment... Are this tools still under development?
-
iled about 8 yearsThis 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 about 8 yearsIt appears that railroad is dead; long live railroady. github.com/preston/railroady
gem install railroady
-
Aralox over 7 yearsSave 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 over 7 yearsThanks @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 SVGdot -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 almost 2 yearssudo aptitude install sqlfairy (in ubuntu)