Received: from localhost (unknown [200.46.204.184]) by postgresql.org (Postfix) with ESMTP id A78A32E02FC; Tue, 4 Mar 2008 16:34:13 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.184]) (amavisd-maia, port 10024) with ESMTP id 82833-02; Tue, 4 Mar 2008 16:34:03 -0400 (AST) X-Greylist: delayed 00:29:51.574284 by SQLgrey-1.7.5 X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from outbound7-dub-R.bigfish.com (outbound-dub.frontbridge.com [213.199.154.16]) by postgresql.org (Postfix) with ESMTP id 06FBB2E02D0; Tue, 4 Mar 2008 16:34:05 -0400 (AST) Received: from outbound7-dub.bigfish.com (localhost.localdomain [127.0.0.1]) by outbound7-dub-R.bigfish.com (Postfix) with ESMTP id 798525D24CB; Tue, 4 Mar 2008 20:03:57 +0000 (UTC) Received: from mail16-dub-R.bigfish.com (mail16-dub [10.5.7.13]) by outbound7-dub.bigfish.com (Postfix) with ESMTP id 544C4898053; Tue, 4 Mar 2008 20:03:57 +0000 (UTC) Received: from mail16-dub (localhost.localdomain [127.0.0.1]) by mail16-dub-R.bigfish.com (Postfix) with ESMTP id 1F29064832A; Tue, 4 Mar 2008 20:03:57 +0000 (UTC) X-BigFish: VP X-MS-Exchange-Organization-Antispam-Report: OrigIP: 207.170.241.12; Service: EHS Received: by mail16-dub (MessageSwitch) id 1204661033103733_9580; Tue, 4 Mar 2008 20:03:53 +0000 (UCT) Received: from mail-1.rf.lan (207-170-241-12.static.twtelecom.net [207.170.241.12]) by mail16-dub.bigfish.com (Postfix) with ESMTP id 85C069D80E6; Tue, 4 Mar 2008 20:03:49 +0000 (UTC) X-MimeOLE: Produced By Microsoft Exchange V6.5 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----_=_NextPart_001_01C87E32.AC0FC1BC" Subject: Documenting a DB schema Date: Tue, 4 Mar 2008 12:02:27 -0800 Message-ID: <082D8A131DF72A4D88C908A1AD3DEB22023B34F2@mail-1.rf.lan> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: Documenting a DB schema Thread-Index: Ach+MqvKpCylwa1/RpiTYtOd0cSs4A== From: "Shahaf Abileah" To: , , , , X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200803/17 X-Sequence-Number: 28500 This is a multi-part message in MIME format. ------_=_NextPart_001_01C87E32.AC0FC1BC Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable I'm looking for a systematic way to document the schema for the database behind our website (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? =20 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: =20 create table table_with_comments(a int comment 'this is column a...'); =20 (see http://dev.mysql.com/doc/refman/5.0/en/create-table.html) =20 However, Postgres doesn't support the "comment" keyword. Is there an alternative? =20 Thanks, =20 --S =20 Shahaf Abileah | Lead Software Developer=20 shahaf@redfin.com | tel: 206.859.2869 | fax: 877.733.3469 Redfin Corporation 710 2nd Ave Suite 600 Seattle, WA 98104 =20 ------_=_NextPart_001_01C87E32.AC0FC1BC Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

I’m looking for a systematic way to document = the schema for the database behind our website (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@redfin.com = | tel: 206.859.2869 | fax: 877.733.3469

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

 

------_=_NextPart_001_01C87E32.AC0FC1BC--