Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Cartesian Joins
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_BFROM cellsites a, cellsites B;
Daniel Morgan Received on Tue Sep 17 2002 - 10:26:27 CDT
![]() |
![]() |