Re: Thoughts on comments

From: Norman Dunbar <oracle_at_dunbar-it.co.uk>
Date: Fri, 22 Mar 2013 08:19:57 +0000
Message-ID: <514C142D.60707_at_dunbar-it.co.uk>



On 22/03/13 04:25, z b wrote:

> Does anyone do this as a regular best practice?
Yes, me.

> I would prefer to see this abstraction in a data model,
Your vendor supplied data models? Wish ours would. Never have, apparently, never will. I always end up using Toad Data Modeller to reverse engineer the schema(s).

That's useful, but sometimes you get too many tables to managed to rearrange them into a decent ERD diagram. (Whoops, D = Diagram!) plus, some of the schemas are auto-generated.

create table T1000( t1000_01 varchar2(100), t1000_02 number ...)

You catch my drift. That definitely needs to be commented. In the model and in the database. Otherwise, WTH do you do to find out what columns in what tables have what usage? Writing ad-hoc queries with this garbage is hopeless.

> .. layer, especially since not all RDBMS engines have "comment"
> functionality.

So? The ones I use, Oracle and Firebird, both do. That's enough for me! I think SQL Server does as well, but I don't use it, thankfully.

> The thought is we should do this for every column, every table, every
> oracle db. This ends up being several million comments added to the
> our various instances.

Consider it documentation. Consider it useful in the future when someone asks "does anyone know where the total accrued value is for this set of accounts?" - think of the kudos you'll get when you say "It's table T1000 column t1000_02", off the top of your head! ;-)

Cheers,
Norm.

-- 
Norman Dunbar
Dunbar IT Consultants Ltd

Registered address:
Thorpe House
61 Richardshaw Lane
Pudsey
West Yorkshire
United Kingdom
LS28 7EL

Company Number: 05132767
--
http://www.freelists.org/webpage/oracle-l
Received on Fri Mar 22 2013 - 09:19:57 CET

Original text of this message