MyDBGraffle4: Automatically MySQL Schema Drawing in OmniGraffle
MyDBGraffle4 automatically draws MySQL schema in OmniGraffle, given database information. It is based on Paul Davis’ DBGraffle4. MyDBGraffle4 supports MySQL 5 while DBGraffle4 works for PostgreSQL.
You can download the tool as a zip file here, which contains two files: MyDBGraffle4.py and MyDBGraffle4.scpt. It is recommended by Paul to use Script Editor to save the *.scpt as an *.app and placing it in the dock or on the desktop. After its there, you can double click it and follow the popups.
Here, I use a tagging system schema to show you how to use this tool. I name the database as TagSchema.
- Launch MyDBGraffle4.scpt in Script Editor and run it:
- Input the location of MyDBGraffle4.py:
- Input the application name of OmniGraffle:
- Input the MySQL database server host name:
- Input the MySQL database server port:
- Input database user name:
- Input the database name:
- The tool generates the beautiful schema diagram in OmniGraffle:
Note that in order for this tool to work, you only need to setup a local MySQL 5 server with passwordless user root. Then, you load the database schema(s) that you want to have diagrams generated in OmniGraffle. Make sure that there are no overlapping between foreign key(s) and primary key(s) and foreign key(s) are defined before indexes. Of course, foreign keys only work for InnoDB tables under MySQL.
Feel free to report bugs and requirements as comments here.