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: Where clause and cartesian product

Re: Where clause and cartesian product

From: Hari <excel_hari_at_yahoo.com>
Date: 13 Dec 2005 03:52:46 -0800
Message-ID: <1134474766.112984.161110@g44g2000cwa.googlegroups.com>


Mark,

Thanks for the reply.

Anyway back to my original doubt. In the following example,

select job_id, dept_name
from employees e , departments d
where e.dept_id = d. dept_id;

Would a cartesian product occur in the above case? (as per you examples a cartesian product occurs only in cases which dont have a "Using" clause in them - am i right in this interpretation?)

I went to OTN site and was blown over by the amount of documentation available, rather got confused as to which Docs would be suitable for me. I enrolled in Oracle mainly because I wanted to get comfortable with using Proc SQL in SAS etc and to some extent preparing myself for a future job(s) which might entail using Oracle databases for interfacing with SAS. SAS also has thousands of pages of documentation but am a little more comfortable wading through them, probably because my present company has SAS but not Oracle.

In nutshell, I would be a potential user of databases (and not in to designing) and would like to know which docs from Oracle site would be useful for me. (I have enrolled for SQL and PL/SQL within Oracle and it is probably called as OCA certification??!!?). Presently I have downloaded PDF's of Oracle 9i SQL reference (release 2), Application developer's guide and Database concepts from Oracle site. I expected to find syntax of a select clause within SQL reference book but somehow didnt find it. In which PDF are stuff (beginner) like that given?

> yikes! get a new teacher! really! if he/she doesn't know how it works he/she
> has no business teaching certification courses.
Its so hard to find really "knowledgeable" teachers in training institutes out here. Blind parroting of information is considered as knowing the stuff and it gets propogated to a new batch of students. Hence newsgroups have become one of the chief/reliable sources for clearing my doubts.

Regards,
Hari
India

Mark C. Stock wrote:
>
> yikes! get a new teacher! really! if he/she doesn't know how it works he/she
> has no business teaching certification courses.
>
> if you're serious about learning oracle, read the oracle concepts manual
> (it's free at http://tahiti.oracle.com) and the tuning guide
>
> you'll see that orale NEVER does a cartesian product as the first step of a
> join unless there is no join criteria
>
> so
>
> select *
> from emp, dept
>
> gets a cartesian product
>
> select *
> from emp. dept
> where job = 'CLERK'
>
> gets a cartesian product
>
> select *
> from emp join dept using (deptno)
>
> does NOT product a cartesian product (use SET AUTOTRACE ON in SQL*Plus to
> verify how Oracle processes the query)
>
> ++ mcs
Received on Tue Dec 13 2005 - 05:52:46 CST

Original text of this message

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