Oracle FAQ Your Portal to the Oracle Knowledge Grid

Home -> Community -> Usenet -> comp.databases.theory -> Re: x*x-1=0

Re: x*x-1=0

From: Jan Hidders <>
Date: 24 Jan 2001 12:28:31 GMT
Message-ID: <94mhpf$jdh$>

Vadim Tropashko wrote:
> In article <94jj6o$r5p$>,
> (Jan Hidders) wrote:
> > > > But things get, from an algebraic perspective, a little more
> > > > complicated because the cartesian product does not commute as
> > > > the join does.
> >
> > The relational cartesian product is defined as follows
> >
> > R1 CP R2 = { <m_1,...,m_k, n_1,...,n_l> |<m_1,...,m_k> in R1 and
> > <n_1,...,n_l> in R2 }
> >
> > If you want to simulate R1 JOIN R2 then you have to write
> > SEL[#i=#j] (R1 CP R2) where #i and #j are the numbers of the fields
> > upon which you want to join. If you join on more than one field
> > than you add another selection. But the problem is that as you can
> > tell by the definition the cartesian product does not commute,
> > i.e., R1 CP R2 <> R2 CP R1.
> It is the order of tuple components that makes CR incommutative. Then,
> applying SEL is not a remedy, because tuples still have their
> components ordered differently for SEL[...](R1 CP R2) and SEL[...](R2
> CP R1). If CR is uncommutative, then JOIN should be as well, right?

Yes, that's right. If your tuples are ordered then both JOIN and CP do not commute. If the tuples are not ordered then they both commute.

Note that if you have ordered tuples then the projection is also likely to be slightly different. If you say PROJ[#1,#2](R) then that will mean something else than PROJ[#2,#1](R).

> I disagree that CP = MULTIPLY, and, in general, that order of columns
> matters. This is why I wanted some congruences on tuples.

You cannot disagree, it is just a matter of definition. :-) And whether CP = MULTIPLY depends an how you define MULTIPLY and that you didn't do yet.

  Jan Hidders
Received on Wed Jan 24 2001 - 06:28:31 CST

Original text of this message