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: Adamsdr <adamsdr_at_aol.com>
Date: 1998/03/13
Message-ID: <19980313122200.HAA24063@ladder01.news.aol.com>#1/1

It's not just CASE tools which may have problems with inappropriate naming conventions.

Supposing you have "power users" with direct access to SQL or a drag-n-drop GUI which enables selection of table names / columns. Ambiguous column names can cause real headaches.

At a risk of pouring gasoline on a flame war, here are some "rules of thumb" which I use. (Note: they are not "conventions", just "helpful ideas" - I hope !)

I tend to apply the convention that every column should have a unique name unless it also appears as a key join or natural join in another table.

An example...
Suppose you have an order processing system with "order_header" and "customer" tables.

Both tables could have column "customer_code" - its a natural join. The order header could have "order_number" as a column (since this is also the same attribute when joined to the order_line table).

If you have address information in both tables, then use column names like "customer_address1", "delivery_address1", "invoice_address1".

Do NOT have column names like "value", "amount", "ident" etc.

I worked on an order processing system once where the quantity ordered was (almost always) different from the quantity made, which in turn may have been more or less than the quantity invoiced for... Trying to build MIS reports was a nightmare !

In article <35000C30.6713F614_at_ene.gov.on.ca>, Allan Burger <burgeral_at_ene.gov.on.ca> writes:
>This comment does not solve your argument.
>But some of the low-end CASE tools make the assumption that the column names
>must be unique in the database and force you into the standard of tablename
>prefixes for columns.
 

>Dave Mullen wrote:
>> We are setting up new database naming conventions, and I'd like to
>> hear other people's thoughts on what they consider to be important
>> considerations.
>> In particular, I'd like to know how people feel about prefixing the
>> names of columns in a relational data base with a short prefix
>> representing the table to which the column belong. ........



Dennis Adams
Database Systems Consultant
Dennis.Adams_at_bcs.org.uk
http://members.aol.com/AdamsDR/cv.htm


AdamsDR_at_aol.com
http://members.aol.com/AdamsDR/
Dennis and Jeanette Adams, Harrow, London, UK. "Si fractum non sit, noli id reficere"
Received on Fri Mar 13 1998 - 00:00:00 CST

Original text of this message

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