HyperSQL is like the doxygen program with Javadoc added, but for SQL. It hypermaps SQL views, packages, procedures, and functions to HTML source code listings, and it shows all the code locations where these are used. You can use JavaDoc-style comments for documentation and even embed UnitTests with them.