Wednesday, July 16, 2008

Creating an Entity Relationship Diagram From MySQL DB

So this morning I was informed that my documentation was scanty. I translated this to convince myself that I needed an ER diagram. This morning I started to find out how I can create an entity relationship (ER) diagram or schema of the DB tables and the relationships for MySQL DB for our ruby on rails application.

I searched and read something about a DB visualizer but it was no good because it had proprietary format for saving the diagram and it was a trial of some sort. It used a jdbc connection and a jdbc connector or jar file from which it obtained the driver.

But again the diagram obtained was proprietary and we used VISIO in our organization (as everyone else). Railroad was available but it is not Visio (to say the least) and its diagrams are not editable from within a word document. Now the problem with VISIO is that it does not have any pre packaged connector or driver or "DSN" (data source name) for mysql . Since I couldn't find it I didnt really wish to venture into it. I was in a hurry and needed to get the diagram reverse engineered fast! I looked on google (in my opinion its search results are highly opinionated or bluntly speaking : erroneous) and saw that nearly everyone wanted to do the same thing. There was one option "expert exchange" had a question that was precisely what I was looking for : BUT you had to pay for it (see here)

That would not do. I was pushed for time (who isn't, right? May God have mercy on the software engineers and may God deal with the armchair intellectuals who denounce us as anti globalization modern day luddites[yes Dr. Scheve and Dr. Slaughter this one is directed at you])... but I was upset enough to decide that I would find the solution and then I will post it for the world to see. So as I found the solution I went about taking screen shots of every action and managed to reverse engineer the schema from MySql into Visio two different ways (thank God!). The next post shall deal with this ...

1 comment:

Anonymous said...

But you don't have to pay for expert exchange, just scroll right down to the bottom past all the advertising and links and all the answers are there. I'm constantly surprised by how many people don't know this!

Total Pageviews

Popular Posts