Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Tools to generate database tables diagram with PostgreSQL? [closed]

Are there any free tools to generate table diagrams with PostgreSQL?

like image 533
Hannoun Yassir Avatar asked Jul 11 '10 16:07

Hannoun Yassir


2 Answers

I love schemaspy for schema visualisations. Look at the sample output they provide, and drool. Note the tabs!

You'll need to download the JDBC driver here, then your command should look something like:

java -jar schemaspy-6.0.0-rc2.jar -t pgsql -db database_name -host myhost -u username -p password -o ./schemaspy -dp postgresql-9.3-1100.jdbc3.jar -s public -noads 

Sometimes using options -port will not working if your database has diferrent port, so you have to add manual port after host parameter, for example:

java -jar schemaspy-6.0.0-rc2.jar -t pgsql -db database_name -host myhost:myport -u username -p password -o ./schemaspy -dp postgresql-9.3-1100.jdbc3.jar -s public -noads 

You'll need to install graphviz as well if you want graphics (apt-get install graphviz for debian based distros).

like image 190
Jurgen Avatar answered Nov 23 '22 12:11

Jurgen


SchemaCrawler for PostgreSQL can generate database diagrams from the command line, with the help of GraphViz. You can use regular expressions to include and exclude tables and columns. It can also infer relationships between tables using common naming conventions, if not foreign keys are defined.

like image 36
Sualeh Fatehi Avatar answered Nov 23 '22 10:11

Sualeh Fatehi