Path: text.usenetserver.com!out02b.usenetserver.com!news.usenetserver.com!in02.usenetserver.com!news.usenetserver.com!postnews.google.com!d30g2000prg.googlegroups.com!not-for-mail
From:  Doug_McMahon@yahoo.com
Newsgroups: comp.databases.theory
Subject: Re: attribute name conflicts
Date: Wed, 08 Aug 2007 13:23:42 -0700
Organization: http://groups.google.com
Lines: 30
Message-ID: <1186604622.962271.191350@d30g2000prg.googlegroups.com>
References: <62wgi.68059$NV3.45985@pd7urf2no><Cgwgi.68070$NV3.48265@pd7urf2no>
NNTP-Posting-Host: 148.87.1.171
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
X-Trace: posting.google.com 1186604623 731 127.0.0.1 (8 Aug 2007 20:23:43 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Wed, 8 Aug 2007 20:23:43 +0000 (UTC)
In-Reply-To: <Cgwgi.68070$NV3.48265@pd7urf2no>
User-Agent: G2/1.0
X-HTTP-UserAgent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.13) Gecko/20060417,gzip(gfe),gzip(gfe)
X-HTTP-Via: 1.1 inet-nc02 (NetCache NetApp/6.0.6)
Complaints-To: groups-abuse@google.com
Injection-Info: d30g2000prg.googlegroups.com; posting-host=148.87.1.171;
   posting-account=ps2QrAMAAAA6_jCuRt2JEIpn5Otqf_w0
Xref: usenetserver.com comp.databases.theory:166151
X-Received-Date: Wed, 08 Aug 2007 16:23:43 EDT (text.usenetserver.com)

On Jun 27, 9:30 am, paul c <toledobythe...@oohay.ac> wrote:
> paul c wrote:
> > Does it ever make sense within a
> given appl'n to have two different relations that use the same attribute
> name but with different types?
>
> p

It's common practice, though it's never *necessary*.  What *is*
necessary is to have multiple attribute names that draw values
from the same domain.  Use cases are easy to find; for example,
on an order I want to keep track of the Shipped_Quantity
and the Ordered_Quantity as distinct values, even though both
are bound to a common domain, Quantity.  Cases involving
view columns are also easy to produce, for example any situation
where a self-join is involved, e.g. if I join Employee to itself
along the Manager foreign key, inevitably I will have a potential
conflict of attribute names if I'm stuck using a single name in
all circumstances for a particular domain.  I suspect it is these
use cases that led Codd to distinguish attribute names, which
are effectively member names with meaning only within the
scope of a relation.  Another way to think about it is to consider
programming languages such as Java; the domain name is
like the type name, whereas the member name can be almost
anything so long as it doesn't collide with another member name
in the same scope.  Once you accept that your column names
are the equivalent of member names, there is no a priori reason
*not* to re-use a member name with varying domains in different
tables of the application.

