Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Naming Convention for Columns

Re: Naming Convention for Columns

From: Alvin Sylvain <alvin_at_NO.JUNK>
Date: 1998/03/09
Message-ID: <01bd4b10$21e41e80$7387d9cf@rana>#1/1

Todd Boss <boss_at_netcom.com> wrote in article <bossEpEqsK.Ctr_at_netcom.com>...
> In article <01bd48d0$1252b6d0$b187d9cf_at_rana>,
> Alvin Sylvain <alvin_at_NO.JUNK> wrote:
> >Dave Mullen <dave.mullen_at_emjay.com> wrote in article
> ><6dnbes$6r5_at_newsops.execpc.com>...
> >
> >First off, I hate naming conventions altogether. Most important:
> >do one thing, and do it consistently. But don't have heartburn
> >if someone doesn't quite come up to snuff.
> >
> >We had three different spellings of "invoice number":
> > invc_nbr, invc_no, invc_num.
> >
> >Ouch.
> >
> >The problem in writing code for this mess was remembering which
> >table had which spelling, particularly in joins. You compile and
> >test something three times before you get it right. We fixed the
> >problem before it got too far.
>
> So, let me see, you hate naming conventions, but then a situation
 arises
> that really pisses you off, but which could have been avoided by,
 yes,
> having naming conventions!

Actually, I really should add to this the fact that the thing that created this confusion in the first place was our *changing* from a rather loose set-up to a "rigorous" naming convention!

If we had simply left everything alone (it was previously "invoicenumber"), we would have saved ourselves some considerable heartburn!

The main problem in naming conventions this way (ie, using "shortcut" names) is coming up with unambiguous shortcuts for everything (because the guy who came up with the idea is fairly lazy when it comes to typing)
vs. words that are "long-enough-for-any-idiot-to-understand."

What you have to do, and what we did, was create a "glossary" of "company accepted" shortcuts. Naturally, the only person who read and followed this glossary was the guy who wrote it. (I mean, come ON, already: changing a perfectly understandable "FLAG" to cryptic "FLG" in order save one character? Is it "DT" or "DTE" or "DAT" instead of "DATE"? All this confustion just to follow this "consistency" bug-a-boo?)

So, in other words, in order to follow this new naming convention, we all had to learn a new "vocabulary." On top of all the other crap we had to learn (we were proficient in Sybase, but the customer wanted Oracle).

My personal preference is for self-documenting variables, including table and column names, using shortcuts only where necessary. Of course, you still have the problem with ambiguous and multiple full spellings of words, but I think that problem isn't anywhere near as severe as that of the utter *reams* of possible shortcuts for words!

Sure, the programmer has to type a little more: but statistics prove that only 20% (or less) of programmer time is spent typing anyway, so what's the big deal? (Actually, it's something like 80% maintenance,
and 20% everything else.) You want double your 80% fraction in order to save on your 20% fraction? Penny-wise and Pound-foolish!

A. Received on Mon Mar 09 1998 - 00:00:00 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US