tedia2sql reads a Dia diagram file (in plain or gzipped format) and writes to a file containing SQL commands responsible for creating Tables, Views, Indexes and Constraints. It's capable of writing SQL for the following database engines:
apt-get install tedia2sql
Via terminal:
tedia2sql -t mysql -o <nom_fitxerSQL> <nom_fitxerDIA>
Opcions per si es vols que crei DROPS, claus forànees, …
http://tedia2sql.tigris.org/briefhelp.html
Ajuda de com fer el diagrames DIA: