views:

79

answers:

4

We have a system built by Parallels, which is relying on a huge (800+) tables to maintain everything.

I need to learn this system, in order to be able to write queries to retrieve data for report generation on various needs.

I am obviously, having difficulties isolating which tables are currently relevant for the task at hand, so I thought the best way would be, to generate and print ERD over multiple pages, for the entire system of tables.

I have attempted to drag all the tables using TOAD - which crashed :) On second attempt, I dragged tables A-N, after a (long) while, M-Z tables successfully.

I even managed to have them all resized, arranged and saved the ERD into file.

However, when I go into print or preview, the sub-process for print crashes hehe.

Any suggestions on how to print this massive ERD? or perhaps another method? The table names dont seem self explanatory, so I cant (and honestly, not really wanting) go over 800+ tables, and hope I dont miss what I need, or parts of.

I would greatly appreciate any advices or ideas on how to proceed, before I even get to actually writing the scripts and code.

The database is on mySQL under CentOS, some tables are InnoDB, some are MyISAM. Many tables seem to be having Foreign Keys.

Thanks!

+2  A: 

have you tried mysql workbench? if you don't mind windows, you could try Enterprise Architect as well

Balint Pato
This is indeed the way go. But there WILL NOT be a logical order of the tables. They will most likely be over each other so you need to rearrange them individually. +1
DrColossos
EA can layout it for you in various layouts as well, it's pretty cool. Though to print it out...he will need quite a lot of paper :)
Balint Pato
See my notes on Sinter's post below for mysql workbench.I started up EA trial version - but I cant find how to work with the database there.. connect to it, import it or something - so I can import the tables into an ERD.
Carmageddon
EA: create an ODBC connection first with http://dev.mysql.com/downloads/connector/odbc/5.1.html#downloads, then create a Data Modelling diagram (it's in the Extended group) - right-click, Import DB schema from ODBC source...
Balint Pato
Ok, I have the connector, however I am still unsure on how to create a Data Modelling Diagram (I cant find a group called Extended). can you be more specific, please?
Carmageddon
+1  A: 

MySQL Workbench has some great tools for reverse engineering from the create script. I haven't used it for such large databases, but you should check it.

Link: http://wb.mysql.com/

Klark
I got WB installed, however I am unable to retrieve the DB schema:[code]Fetching schema list.Operation failed: Table 'information_schema.schemata' doesn't exist[/code]I looked for it manually as well - it seems the schema was removed.I also tried to menu options Database-> Reverse Engineer, also tried Synchronize Model option, both want schema.
Carmageddon
what mysql version are you using? it could be a version difference issue.
Balint Pato
server version: 4.1.20-standard
Carmageddon
+2  A: 

I worked at a place that had several hundred tables (near 1k) and no one really knew what was going on in the system, company was growing and hiring a lot. A guy was tasked with doing a diagram, and he auto-magically created a gigantic tiled poster that contained every table with lines connecting various tables (going all over the place). I'm not sure what he used, it was Unix and Oracle years ago (way before Linux and open source). There was no real rhyme or reason to the layout of the the tables in his diagram. He had successfully created a diagram of every table. The "poster" was put on a wall in a common area, and got a few looks, but no one ever really used it, it was unusable, too cluttered, too unorganized. As a result, I used MS-Word to create a single page diagram containing the 20 main tables (it went through a few iterations as I "discovered" new main tables) with lines for each foreign key and each table located in a logical manner. I showed the column name, data type, nullability, PK, and all FKs. I put my diagram up on my wall by my monitor. Eventually everyone wanted a copy of my diagram, including the person that made the "poster". When I left that job they were still giving my diagram to new hires.

I recommend that you work like an explorer, find the key tables and map them as you go, making as many specific diagrams as necessary as you discover the system. Trying to make a gigantic "poster" automatically will not work very well.

KM
A: 

IIRC, MS Sql Server has some nice utility for making diagrams, I know it helped a lot, you could add a table and it would automatically add all related tables. If you could convert your tables to a MS SQL compatible sql script, this might help.

ceteras
I only have them on a running production system, I don't want to risk breaking the system.Can you suggest a simple risk-free way to convert to MS SQL? then I will load it and try the function you suggested.
Carmageddon
ceteras