Skip to content

Visualizing An Existing MySQL Database

So I’ve been working for about a month with a fairly-normalized (53-table) database in which I draw out all kinds of tabular information, and display it in a spatial context. This has required the numerous multiple table joins, with all kinds of weird relationships… you know, the kind that usually don’t work out very well?

In any event, my SOP for handling these queries was to submit sample data through the codeigniter site that our project’s web developer has been courageously firing away at. In this sense, I’d sort-of trace the flow of new information through the various tables of the database, monitoring the information stream as best as I could. I thought to myself, that there has to be a better way to handle this stuff! In comes the MySQL Workbench. This handy tool from the MySQL Dev Zone apparently comes in two flavors: FOSS and commercial.

The free version served my visualization needs perfectly. The layout of the program is very solid. I was easily able to take an SQL export of the existing database and import it into the Workbench, through a tool they call ‘Reverse Engineer MySQL Create Script’. Once the schema has been injected into the program, a model can be automatically created containing all of the tables as well as relationships. The auto-layout feature however, leaves a lot to be desired.

Above: Automatic Layout Results, Snazzy!

Above: Automatic Layout Results, Snazzy!

After about twenty-minutes of fooling with the table graphics, a usable layout can be produced. One feature that I think is really convenient, but will never use, is the automatic setting of the diagram width and height based on numbers of pages. This is useful for those who need a quick-print out of their database for whatever reason.

Above: Workbench w/ Completed Diagram

Above: Workbench w/ Completed Diagram

The real benefit for me however, is the automatic highlighting of key values linking tables together. I’m now able to quickly work my way from the table I need to get to, drilling backwards until I see the table I need to start with.

Above: Automatically Highlight The Key Fields Between Two Tables.

Above: Automatically Highlight The Key Fields Between Two Tables.

3 Comments

  1. gratier wrote:

    MySQL Workbench is a great tool but limited to mysql. It’s derivated from dbdesigner.
    Let’s have a look on dbdesigner fork.
    http://sourceforge.net/projects/dbdesigner-fork
    This tool enable you to connect to MySQL and all database with ODBC support. I do reverse engineering with PostgreSQL/Postgis like that.

    Tuesday, June 2, 2009 at 2:05 am | Permalink
  2. Greg wrote:

    How do you connect to a Posgresql db with dbdesigner-fork?

    Wednesday, July 1, 2009 at 10:49 am | Permalink
  3. Wiktor wrote:

    That’s what im looking for… I hope it will generate diagram for my MySQL database… ;)

    Wednesday, July 15, 2009 at 8:07 am | Permalink

Post a Comment

Your email is never published nor shared. Required fields are marked *
*
*