6 Answers
6

the perl sqlt program from the SQLFairy project (aka SQL::Translator) can read a database schema from a text file (or by directly querying the database using perl DBI) and translate the schema into a variety of formats, including some graphical/documentation formats such as Diagram and GraphViz and HTML.

it supports several different database backends, including Mysql, Postgresql, Sybase, and Oracle.

Some free software ER diagramming tools that can interpret and generate ER models, SQL and do database analysis are StarUML, MySQL Workbench, and SchemaSpy. Some free software diagram tools just draw the shapes without having any knowledge of what they mean, nor do they generate SQL. These include Kivio and Dia. DIA diagrams, however, can be translated with tedia2sql.

If you have access to MS Access, you can create an ODBC connection to the DB and then link all your tables and use the relationship builder inside Access to build the diagram. This is typically what I do, as while it is not the best method, it sure is the easiest.