Page 1 of 1

Suggestions on documenting a database?

Posted: Mon Jun 02, 2003 12:11 pm
by nielsene
I have an application that uses two databases (each with about 100 tables) and each with a number of distinct web-user accounts with different permissions in addition to one-two console user-accounts. I'ld like to generate some good documentation for use by other developers.

I'ld like a Doxygen/phpDoc style tool where I can comment up the SQL DDL file that creates the database and prepopulates some "pseudo-domains". The tool should generate both html and pdf(or other print-format) and should be able to understand SQL for most of its work. (Doxygen can't parse SQL, so while I could use it I'ld have to retype all the SQL DDL into doxygen comments.)

Things that I'ld specificly like the tool to document:
tables, views, rules/triggers/stored procedures, users, domains/user-defined-types

Specifically for tables, it should pull out the table name, the fields and their type/domain with possible comments, the primary key, any foreign key with (web) hyperlinks to the linked table, user permissions as well as pulling description type comments out.

Does anyone know of any such tool? (SQL in general or PostGreSQL in paticular)

Posted: Wed Jun 04, 2003 2:17 am
by []InTeR[]
I use easydraw and notepad.

That's all, making all the referenses between databases visable.
And telling the how and why in the txt file.

Posted: Fri Jun 06, 2003 10:13 am
by nielsene
Well I need something a little more powerful and automated than that and as I couldn't find anything on the 'net, I'm starting to develop my own. If anyone is interested in helping, please let me know.

Just as a note, I'm probably not using PHP to write this tool, looking likely to use Python since its more command-line friendly and more commonly found on people's machines. I got preliminary work done last night to document users and groups (at least under PostGreSQL's command set). Once I get some more work done, I'ld definately like to have a MySQL proficient person help out in understanding its needs....

For an partial example of the level of detail I'm going for you can visit
http://ballroom.mit.edu/cib-dev/CentralDB_Spec.pdf
Its an unfinished spec, coded in LaTeX by hand off the database DDL. The program I'm working on now would produce this automatically from the DDL and comments in the code (excluding the front matter) Pages 6 and above are good examples of the documentation to be produced, of course the HTML version will be hyperlinked.