From: Russell F. <r.f...@au...> - 2006-05-16 02:08:03
|
Hi Folks, I'm not on the list so please include me in any replies. I recently found myself having to document some database schema with only open source resources and Mac OS X. I got dia installed and after a little fiddling around decided that it was going to take a long time constructing the UML diagrams by hand. So I started looking for something that would take the SQL and at least turn out the class objects from the table create statements. The nearest thing I found was sqlfairy, so I started hacking the MySql output module to produce the xml that dia needs. Firstly congratulations on a nice clean structure! I figured out that all I needed was to write a Dia.pm and put -t Dia ... I have a Dia.pm that does a very rough basic job of converting sql to dia uml drawings. How rough? Very ;) at the moment I just fill in the attributes with field names and types, no attempt is made to deal with the constraints and all the resulting objects have the same origin on the canvas. Nor does it make any attempt to graphically map the table and key associations. Adding the constraints and doing something a bit prettier with the origins is fairly trivial and I might to that, Working out the table and key associations is doable but decidedly non trivial. Anyway, I'm very happy to feed the code back to the project if there is interest. Russell |