Moin!
I just wrote a relatively simple database structure graph generator and
decided that it would be a good idea to share it.
It uses the neato tool from graphviz for generating the actual graph.
Graphviz is available from http://www.graphviz.org/
You can get the script itself at
http://flgr.0x42.net/structure/structure.erb
It should be placed in /scripts and is invoked like this:
erb structure.erb > structure.dot
neato structure.dot -Tpng -o structure.png
Sample graphs:
- My own ecommerce system:
http://flgr.0x42.net/structure/structure.png
- technoweenie''s comics portal:
http://flgr.0x42.net/structure/comiclog-structure.png
- danp''s integrated user account manager:
http://glueless.net/structure.png
While prettiness and quality of these graphs is still not perfect, they
still are useful for getting a quick overview over the database structure.
I know that there is commercial software that can do this, but I think
having this functionality available freely (even if at inferior quality)
is still a good thing.
If you generate a graph using this, please post the URL -- I''m
interested in seeing other people''s designs as well. :)
If you are familiar with graphviz and know how I could get the arrows to
avoid overlapping even the boxes they come from / go to, please tell.
If you have any other ideas for improving this, please let me know and
I''ll have a look.
License is the same as Ruby''s of course, so modify and use this in
whatever way you want.
Regards,
Florian Gross