01-22-2012, 11:10 AM
Method 1: Using SQL::Translator.
SQL::Translator is a group of Perl modules that manipulate structured data definitions (mostly database schemas) in interesting ways, such as converting among different dialects of CREATE syntax (e.g., MySQL-to-Oracle), visualizations of schemas (pseudo-ER diagrams: GraphViz or GD), automatic code generation (using Class:BI), converting non-RDBMS files to SQL schemas (xSV text files, Excel spreadsheets), serializing parsed schemas (via Storable, YAML and XML), creating documentation (HTML and POD), and more. New to version 0.03 is the ability to talk directly to a database through DBI to query for the structures of several databases.
This is the method I used on my Linux Desktop to create a Schema of the WebERP tables:-
1) Install the latest SQL-Translator from http://search.cpan.org/CPAN/authors/id/R...006.tar.gz. The version my Debian system installed was too old, and it bombed on errors processing the mysqldump file.
2) Create a dump of your database
# mysqldump -u <user> -p<password> -d <database> > mydatabase.sql
3) create the Schema as a png picture
# /usr/local/bin/sqlt-graph -f MySQL --color -o mydatabase_diagram.png mydatabase.sql
Here is a link to one of the Schema pictures I created:-
It's huge at 6530x2634 pixels, so your picture viewer will need to be able to pan.
http://www.portertech.org/test/webERP/my...0x2634.png
Cheers
Terry
SQL::Translator is a group of Perl modules that manipulate structured data definitions (mostly database schemas) in interesting ways, such as converting among different dialects of CREATE syntax (e.g., MySQL-to-Oracle), visualizations of schemas (pseudo-ER diagrams: GraphViz or GD), automatic code generation (using Class:BI), converting non-RDBMS files to SQL schemas (xSV text files, Excel spreadsheets), serializing parsed schemas (via Storable, YAML and XML), creating documentation (HTML and POD), and more. New to version 0.03 is the ability to talk directly to a database through DBI to query for the structures of several databases.
This is the method I used on my Linux Desktop to create a Schema of the WebERP tables:-
1) Install the latest SQL-Translator from http://search.cpan.org/CPAN/authors/id/R...006.tar.gz. The version my Debian system installed was too old, and it bombed on errors processing the mysqldump file.
2) Create a dump of your database
# mysqldump -u <user> -p<password> -d <database> > mydatabase.sql
3) create the Schema as a png picture
# /usr/local/bin/sqlt-graph -f MySQL --color -o mydatabase_diagram.png mydatabase.sql
Here is a link to one of the Schema pictures I created:-
It's huge at 6530x2634 pixels, so your picture viewer will need to be able to pan.
http://www.portertech.org/test/webERP/my...0x2634.png
Cheers
Terry