Re: Relational Database: Union Compatibility Question

From: Paul <paul_at_test.com>
Date: Tue, 30 Nov 2004 12:06:51 +0000
Message-ID: <41ac625c$0$50881$ed2619ec_at_ptn-nntp-reader01.plus.net>


TonY wrote:
> According to one reference, the union compatibility is defined as
> such:
> (1)the two relations have the same degree n (number of attributes) ,
> and (2) domain (Ai)= domain (Bi) for 1=<i<=n, where domain stands for
> data type.
>
> In other reference, it is stated that two relations are union
> compatibles if they have the same degree and the *same attribute
> names* and domains. The *order of attributes is immaterial*.
>
> which one is the fully correct?

I think these two are equivalent, just written using different conventions. The first one uses more mathematical language, where it's conventional to make things as obscure as possible and name things using integers rather than meaningful names. It's not implying that column A1 comes "before" A2 in any sense: the numbers are just to uniquely identify them. The fact that numbers have an ordering is just by-the-by, just as the alphabetical ordering of named columns is immaterial. So you could write the columns as:

  A5, A3, A2, A4, A1

if you wanted. So if you look at it this, way the first definition becomes identical to the second one.

Paul. Received on Tue Nov 30 2004 - 13:06:51 CET

Original text of this message