| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> c.d.o.server -> Re: Naming Convention for Columns
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!
>One rule you might want to consider, and the reason for it: name
>the columns with long, self-descriptive, correctly spelled words.
>Ie, instead of "invc_nbr", it should be "InvoiceNumber". Or,
>perhaps, "Invoice_Number". Again, do it consistently: that way,
>you don't have to *remember* whether or not an underline is in
>the word: it either always is or always isn't.
Be consistent. NEVER mix upper and lower case in column names. You won't believe how much hair you'll rip out the 5th time you've retyped a simple query b/c you have mixed case in Sybase.
You can't get away from SOME abbreviations in column names...the best you can hope ful is to be predictable with your abbreviations. cntrl for control, num for number, ID for identification , etc etc.
As you design your system, before you create the physical entities sort through your attributes by physical name and shake out any inconsistencies. It doesn't take too long. I also advocate standard user defined datatypes linking up w/ the column names (i.e., define a standard for height and then incorporate hgt or h in the column names).
boss Received on Fri Mar 06 1998 - 00:00:00 CST
![]() |
![]() |