Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: Cartesian Joins

Re: Cartesian Joins

From: Daniel Morgan <dmorgan_at_exesolutions.com>
Date: Tue, 17 Sep 2002 15:26:27 GMT
Message-ID: <3D87496D.36D80D44@exesolutions.com>


Bob McAlone wrote:

> Can anyone come up with a scenario where a cartesian join is good? A lot of
> the manuals say that is is _probably_ an error / bad design which implies
> that it does have a use. Every case me and the guys at work come up with can
> be better solved with a half decent normalised design.
>
> Cheers
> Bob

Gladly.

While consulting at AT&T Wireless I needed to calculate the distance between every cell site and every other cell site within a specific metropolitan area. The only way is to intentionally produce a Cartesian product. The query, greatly simplified, looked something like this:

CURSOR xyz IS

   SELECT a.cellsite CELL_A, a.latitude LAT_A, a.longitude LON_A,

                  b.cellsite CELL_B, b.latitude LAT_B, b.longitude LON_B
   FROM cellsites a, cellsites B;

Daniel Morgan Received on Tue Sep 17 2002 - 10:26:27 CDT

Original text of this message

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