Database Schema using PostgreSQL Autodoc
This Postgresql Autodoc is a nice tool which constructs a dot file and other files based on the database schema. You can run it the same way as you will run any of the pg commands, but it requires you to type the password in the command line using the --password option:
#bash# postgresql_autodoc -h localhost -d cosmo -u test --password=test
The above command will generate lots of files in different format (dia, html, dot). Of particular interest will be the dot file which can be used to create any kind of image file (gif, png, jpeg, etc). The dot utility will allow you to convert this cosmo.dot file into a png file:
#bash# dot -Tpng cosmo.dot > cosmo.png
An example of the complete schema is shown below:
- Cosmo Schema (the one hibernate generates for us) using postgresql autodoc
--
VinubalajiGopal - 19 Oct 2006