10
Jul
07

DIA from SQL

Today I needed a fast way to generate DIA diagram from an MySQL database structure and I found this great little project on SourceForge called, very convenient, sql2dia. This tool is actually a PERL script which generates XML file (yes, if you ever wondered, DIA file format is pure XML. Nice, a? :)) sql2dia does not provide support for relations between tables, but this feature is planed for the future releases. Anyway, it does exactly what I needed it to do - create a diagram of tables in my PostfixAdmin database (don’t ask why… yet :)). Here is an example how it works and the result.

[ home sql2dia ] # ./mysql2dia -D -d maildb -h localhost \
> -u username -p password -o mail.dia
Debug mode activated.
Creating header…
Creating object admin…
Creating object domain…
Creating object vacation…
Creating object mailbox…
Creating object log…
Creating object alias…
Creating object domain_admins…
Creating footer…

sql2dia


0 Responses to “DIA from SQL”


  1. No Comments

Leave a Reply

This is a captcha-picture. It is used to prevent mass-access by robots. (see: www.captcha.net)

You must read and type the 3 chars within 0..9 and A..F, and submit the form.

  

Oh no, I cannot read this. Please, generate a