Skip site navigation (1) Skip section navigation (2)

Documenting a DB schema

From: "Shahaf Abileah" <shahaf(at)redfin(dot)com>
To: <pgsql-admin(at)postgresql(dot)org>,<pgsql-docs(at)postgresql(dot)org>,<pgsql-general(at)postgresql(dot)org>,<psql-novice(at)postgresql(dot)org>,<pgsql-sql(at)postgresql(dot)org>
Subject: Documenting a DB schema
Date: 2008-03-04 20:02:27
Message-ID: 082D8A131DF72A4D88C908A1AD3DEB22023B34F2@mail-1.rf.lan (view raw or flat)
Thread:
Lists: pgsql-adminpgsql-docspgsql-generalpgsql-sql
I'm looking for a systematic way to document the schema for the database
behind our website (www.redfin.com <http://www.redfin.com/> ), so that
the developers using this database have a better idea what all the
tables and columns mean and what data to expect.  Any recommendations?

 

It would be great if the documentation could be kept as close to the
code as possible - that way we stand a chance of keeping it up to date.
So, in the same way that Java docs go right there on top of the class or
method definitions, it would be great if I could attach my comments to
the table definitions. It looks like MySQL has that kind of capability:

 

            create table table_with_comments(a int comment 'this is
column a...');

 

(see http://dev.mysql.com/doc/refman/5.0/en/create-table.html)

 

However, Postgres doesn't support the "comment" keyword.  Is there an
alternative?

 

Thanks,

 

--S

 

Shahaf Abileah | Lead Software Developer 

shahaf(at)redfin(dot)com | tel: 206.859.2869 | fax: 877.733.3469

Redfin Corporation
710 2nd Ave
Suite 600
Seattle, WA 98104

 

Responses

pgsql-docs by date

Next:From: Oisin GlynnDate: 2008-03-04 20:45:51
Subject: Re: [GENERAL] Documenting a DB schema
Previous:From: Bruce MomjianDate: 2008-02-29 15:41:15
Subject: Widow/Orphan lines in docs

pgsql-sql by date

Next:From: Oisin GlynnDate: 2008-03-04 20:45:51
Subject: Re: [GENERAL] Documenting a DB schema
Previous:From: Gerardo HerzigDate: 2008-03-04 16:16:16
Subject: Re: compiling plpython compilation error (solved)

pgsql-admin by date

Next:From: A LauDate: 2008-03-04 20:14:50
Subject: GRANT ALL ON recursive for all tables in my scheme?
Previous:From: chris.juradoDate: 2008-03-04 04:41:57
Subject: Replacing the corrupt "global" folder with older one

pgsql-general by date

Next:From: A LauDate: 2008-03-04 20:14:50
Subject: GRANT ALL ON recursive for all tables in my scheme?
Previous:From: Benoît CarpentierDate: 2008-03-04 19:59:19
Subject: Benetl version 1.6

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group