April 24th, 2003, 05:04 PM
Tool to generate ER diagram from SQL code
Hi all. Myself and my sys admin are looking for a free tool which will generate a rudimentary ER diagram from an sql file (PostgreSQL or MySQL, but PostgreSQL is the most important).
Doesn't need to be anything overly fancy, just a basic ER diagram indicating tables, columns and relationships would suffice.
I've done a bit of digging but haven't been able to find anything really useful.
Does anyone have any ideas?
April 25th, 2003, 04:00 AM
April 25th, 2003, 10:16 AM
April 25th, 2003, 03:04 PM
As mentioned at http://www.orm.net/resources.html htere is actually a "discontinued" product by Microsoft called VisioModeler, which is still available for download. It is free because it is considered "unsupported". It has now become part of Visio Enterprise version, or something like that.
It can connect to ODBC sources, as well as generate SQL for database creation. I'm sure it has bugs, etc... but it is free ;-). It's actually surprising how much this piece of software can do.
The interesting thing about this tool is that it is not just an ER modeler, but was mainly created as an ORM (Object Role Modeling) tool. For more details about ORM, just visit www.orm.net. ORM is actually a much more advanced type of modeling for data systems, allowing one to specify complex relationships, constraints, and business rules.
April 25th, 2003, 03:55 PM
Or, for another great tool at the opposite end of the spectrum, try DDT (Database Design Tool) by Jo Janssens. This is a tiny piece of software, which would probably run fine on your old 486/33Mhz machine. But, if you just want simple ER diagrams with no fluff, it's actually a great little tool. It can read well-formed SQL to create tables and relationships, and it can generate fairly straightforward SQL statements from diagrams.
Note: this is a Windows-only tool. Also note that if you use UltraEdit to create your SQL files, or if you copy an SQL text file from your Linux/Unix machine, you may need to convert the file to have DOS/Windows-style line endings (\r\n), or DDT will have problems reading the file. Also, printing support is limited at the moment.
If any Windows VC++ gurus here can download the DDT source and add features, I will be happy to suggest a few, such as better printing support, graphic export options for the diagrams, a few more symbols, etc...
reverse snowflakes join could help
An other tool is reverse snowflakes joins (revj at sourceforge). This tool permits to reverse engineer SQL statements (without been connected to the database). Try the demo at snowflakejoins dot com
try DbSchema from wisecoders, dbschema dot com