Graphical Visualization of databases with PostgreSQL Autodoc


PostgreSQL Autodoc provides simple tools for description of the PostgreSQL databases in various formats such as HTML, DocBook, Dia and GraphViz. Although I do not have a complicated database scheme in my GSoC project, visualization shortened the time spent creating mock-ups. In order to generate a graphic in PNG format, first we need to install PostgreSQL Autodoc:

yum install postgresql_autodoc

Then we create a GraphViz compatible description of our database:

postgresql_autodoc -t dot -h hostname -u username -d databasename --password

Finally using the dot utility from GraphViz, we can export a PNG image:

dot -Tpng databasename.dot -o image.png