views:

959

answers:

6

I'm looking for a tool that can map the relationships in my database in mysql. I would like something like the view that is generated in MS-SQL Server Management Studio in the 'Show Diagram Pane'. Does such a thing exist?

I'm in charge of the design of the database and its using rails conventions. I would not be adverse to specifying relationships by hand.

A: 

Most MySQL databases still use MyISAM tables, which do not provide foreign key constraints. Without explicit FKs the best you can do is guess at the relationships between tables.

Sean McSomething
Just because RI constraints are not recorded or enforced by MyISAM doesn't mean table relationships don't exist in the logical database design.
Bill Karwin
A: 

One year ago I used DBVis together with Oracle. It believe it also works with MySql.

Ruben
A: 

Altova DatabaseSpy will show them if you are on Windows. If not, the easiest way is to query INFORMATION_SCHEMA (if you're using v5 or later of MySQL) and check out the key column usage statistics for all the tables. This is easy to script.

Michel
+2  A: 

Maybe the official tool has that?

http://dev.mysql.com/downloads/workbench/5.1.html

JAlexoid
+2  A: 

Doesn't MySQL Toad have a schema diagram tool? I think it does. I'm not a diagram guy (much happier with mysqldump output) but I've worked with many people who swear by Toad.

hromanko
A: 

MySQL Workbench 5.1.16 is buggy on my OS X 10.5.7 system. I found that it does things like crashes and vanishes with no error. Or it will error out when trying to change page size in the print setup.

I also tried running it on Windows XP under VMWare. It seemed more stable and usable there. I was able to reverse engineer a DB and create a diagram.

Ethan