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: Same Column names in different tables?

Re: Same Column names in different tables?

From: keith boulton <boulke_at_globalnet.co.uk>
Date: Wed, 03 Mar 1999 16:04:10 GMT
Message-ID: <36dd22e1.7388654@read.news.global.net.uk>


On Wed, 24 Feb 1999 01:30:27 GMT, John Seitz <seitz_at_pobox.com> wrote:

>> John Seitz wrote in message <36D205DF.C69E6D01_at_pobox.com>...

>> >Its been a couple of years since my Intro to Relational DB by Cobb, but
>> >I'm a little stumped.
>> >A person at work today told me that I should never have duplicate
>> >column/field names in different tables unless they are relationships.

When I started work, it seemed to be a common convention to make column names unique by prefixing each column with a short name for the table. Doing this means that you never have to worry about column name ambiguities when joining tables. Personally, I always prefix the column name with the table name in select statements which means this is not an issue.

Also, I've used at least one case tool which required column names to be unique across all tables.

Many graphical query tools assume that when joining tables, the join is performed on columns of the same name, so if you join two tables with a description column it ends up as one of the join criteria.

Personally, I think the most important thing about a name is that it should be readily understood so if two entities have a description, the column name for both should be description. Received on Wed Mar 03 1999 - 10:04:10 CST

Original text of this message

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