Re: How to make a good documentation of a database ?

From: Chris Browne <cbbrowne(at)acm(dot)org>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: How to make a good documentation of a database ?
Date: 2004-11-18 18:48:14
Message-ID: 60brdvgfip.fsf@dba2.int.libertyrms.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

dpradier(at)apartia(dot)fr (David Pradier) writes:
> I've just inherited the responsibility of a postgresql database
> of roughly 480 tables and 6460 columns, mainly without constraints,
> not even foreign keys.
>
> I'd like to make it a little more orthodox (lots and lots of
> constraints, yeah !!), but I need a tool to make a documentation about
> every column, at least, as some column are really vicious (like, they
> are a foreign key to a table which depends on the type of another column...).
>
> The best idea I could come with to do that was to maintain an output of
> pgdump --shema-only, versioned with cvs, annotated with a patch, itself
> versioned with cvs.
> Not that bright, isn't it ?
>
> The problem is, I don't want to use a lot of time to maintain this
> documentation, and above all, I'd prefer not to insert the information
> twice (read: a new constraint in the database should automagically
> update the documentation).
>
> Does somebody know the right way to do this ?

We use Rod Taylor's "postgresql-autodoc", which is a Perl script that
rummages through a database schema and generates output in several
forms.

The form that we're finding most useful is the HTML form, where it
generates an HTML table for each table, annotated with any COMMENTs on
tables/columns, as well as indicating linkages between objects.

The capabilities for generating "pretty pictures" are a bit limited,
but it does reasonable cross-referencing in the HTML form...
--
let name="cbbrowne" and tld="cbbrowne.com" in String.concat "@" [name;tld];;
http://www.ntlug.org/~cbbrowne/linuxxian.html
A VAX is virtually a computer, but not quite.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Chris Browne 2004-11-18 18:50:22 Re: How to make a good documentation of a database ?
Previous Message Adam Witney 2004-11-18 18:44:24 Re: Can COPY skip columns?