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

Home -> Community -> Usenet -> c.d.o.server -> Re: Under what circumstances should one use a non-equijoin?

Re: Under what circumstances should one use a non-equijoin?

From: Jonathan Lewis <jonathan_at_jlcomp.demon.co.uk>
Date: Thu, 1 Jun 2006 22:37:25 +0100
Message-ID: <X9KdneGIdJqBw-LZnZ2dnUVZ8sydnZ2d@bt.com>

As a hypothetical example, how about:

    where stock.next_delivery_date > order_line.order_date + 7     and stock.stock_code = order_line.stock_code

Although the stock_code equi-join is pk/fk, the date predicate is non-key and is a non-equijoin, but does not necessarily suggest a bad design.

-- 
Regards

Jonathan Lewis
http://www.oracle.com/technology/community/oracle_ace/ace1.html#lewis

The Co-operative Oracle Users' FAQ
http://www.jlcomp.demon.co.uk/faq/ind_faq.html

Cost Based Oracle: Fundamentals
http://www.jlcomp.demon.co.uk/cbo_book/ind_book.html


<dananrg_at_yahoo.com> wrote in message 
news:1149196317.088654.221960_at_i39g2000cwa.googlegroups.com...

> It is good or bad practice to perform non-equijoins - e.g. to do table
> joins where there is no formal foreign key to relate two tables.
>
> Under what circumstances is it necessary or desirable to perform
> non-equijoins? Can someone give a few examples?
>
> If I have to perform a non-equijoins, does this mean I'm using a poorly
> designed RDBMS?
>
Received on Thu Jun 01 2006 - 16:37:25 CDT

Original text of this message

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