Aug 6, 2012

Database documentation

It is so frustrating to guess database structure intention without any information about it. Liquibase has a great feature, which helps to prevent a lot of guessing. Liquibase can generate an html documentation of db. However the documentation is pretty sparse. But be not frustrated, there is a light over there at the end of the tunnel...

There is another tool which can help a lot with gaps in Liquibase generated documentation. The name of a tool is SchemaSpy. This tool can also generate nice graphviz created PNGs with db relationships and includes them into the documentation it generates.
These two great tools help to get a lost programmer into a picture of a db structures a lot. To get the best of the tools let's chain them with the build tool of your liking such as Ant, Capistrano or Fabric.
For my purposes I created a Fabric target for building db documentation. I have a doc directory in the root of my project. That directory is ignored by my revision control. Every documentation tool I use with the project creates an directory inside the doc dir. This works the best for me.

No comments: