views:

4323

answers:

16

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).

A: 

When you say visualize the database schema, are you referring to a text-document of all your tables, sprocs, etc., or are you referring to a visual representation of your schema and dependencies?

I know you mentioned MySQL (and it is very possible that it is supported now, but I am not sure), but RedGate has a number of tools that make that pretty simple. It's SQL Doc program can take your entire database and create full-blown database documentation for it. SQL Dependency Tracker can give you a visual representation of all your tables and show their linkings, or you can load in just certain tables or sprocs to show what is using them or what they are using themselves.

TheTXI
Red Gate's tools are SQL Server only I'm afraid.
Dave R.
I was after a visual graphical representation rather than a full-blown database doc, but still sounds interesting (even if it is SQL Server only - have some other stuff using that).
Mat
+6  A: 

I would recommend Toad data modeller

Kb
+18  A: 

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

rkj
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, http://www.joachim-uhl.de/projekte/schemaspygui/. It should also be noted that program inserts Google ads into the resulting HTML.
James McMahon
+1  A: 

Have you tried the arrange > auto arrange function in MySQL Workbench. It may save you from manually moving the tables around.

Brian Fisher
Yeah, it kinda helped but wasn't great.
Mat
Worth a try, I always end up arranging myself too - but sometimes it can get me started.
Brian Fisher
+3  A: 

How about the SQuirreL SQL Client? As mentioned in another SO question, this programs has the capability to generate a simple ER diagram.

Marc Novakowski
A: 

Years ago, I used to use Data Architect. I don't know if it's still out there.

You could reverse engineer an existing schema into a relational table diagram.

Or you could go even further, and reverse engineer an Entity-Relationship model with an accompanying diagram. ER diagrams were really useful to me when discussing the data with people who were neither programmers nor database experts.

Sometimes a few manual fixups to the ER model and ER diagram were necessary before it was a useful communication tool with stakeholders.

Walter Mitty
+1  A: 

DeZign for Databases might be interesting for you. You can reverse engineer and modify existing databases. Has got an auto-layout function and diagram layout is not meshed up when synchronizing your data model with the database.

A: 

Good query tool that can work with different databases (SQL, MySQL,Text...) and show you the database Schema.

(six months of usage is free )

Itamar
+1  A: 

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.

Ethan
Excellent tool. There's also free edition that has most of the great features (synchronization with live db for example).
wheleph
A: 

Visio professional has a database reverse-engineering tool built into it. You should be able to use it with MySQL through an ODBC driver. It works best when you reverse engineer the database and then create the diagrams by dragging them off the tables and views panel. It will drag any foreign key objects and put them on the diagram as well.

ConcernedOfTunbridgeWells
+2  A: 

I'm start to create own Perl script based on SQL::Translator module (GraphViz). Here are first results.

mj41
A: 

SchemaBall is doing visualisation its own interesting way.

mj41
A: 

I use SQL::Translator with DBIx::Class

I have DBIx::Class in my toolchain anyway, and combining it with SQL::Translator allows me to convert the schema into lots of different formats. Mostly initialization SQL scripts for different database servers (making it easy to develop on SQLite and move to Postgresql for production) but it can output GraphViz data too, so diagrams are trivial to generate.

David Dorward
+1  A: 

ER/Studio by Embarcadero is one of the costlier ones, but the hierarchical mode it present is by far the best one for understanding database models. It makes query writing the easiest task in the world.

It also is incredible with normalization, denormalization, warehousing, documentation, etc.

The downside is that it is a pretty expensive tool especially when you go multiplatform.

Raj More
A: 

A different approach, but if you're using Ruby on Rails try RailRoad: http://railroad.rubyforge.org

tmarkiewicz
A: 

Adminer (formerly phpMinAdmin), the web application for managing MySQL databases, draws simple diagram.

The software itself is similiar to phpMyAdmin, but has more features, its lightweight and it comes in single PHP file.

alt text

tomp