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

Home -> Community -> Usenet -> comp.databases.theory -> Re: Tutorial D with + restrict

Re: Tutorial D with + restrict

From: x <x_at_not-exists.org>
Date: Thu, 30 Mar 2006 12:31:00 +0300
Message-ID: <e0g8gh$54k$1@emma.aioe.org>

"Strider" <Anymore_at_shore.it> wrote in message news:Xns97965FC11EAB4strider5athome_at_195.34.135.101...
> Hi there,
>
> I am reading Date's Databases in Depth now, and having trouble with
> expressions like this (it shoud return supp. numbers with numbers of
> distinct parts each suppliers supplies):

I have not read that book.

> WITH ( SP RENAME ( SNO AS X ) ) AS R :
> EXTEND ( S { SNO } ) ADD ( COUNT ( R WHERE X = SNO ) AS NP )
It appears to be a join of

   select sno, count(*) as np from sp group by sno with

   select sno from s
on sno

> what troubles me is thist inner "R WHERE X = SNO" part

> It puzzles me how can R "know" value of SNO attribute?
> Is it just repeatedly evalueated for each tuple of S{SNO}?
> Seems so, but this scenario is not covered in the explanation of RESTRICT
> operator.

What RESTRICT ? I see WHERE in the scope of EXTEND in there. Received on Thu Mar 30 2006 - 03:31:00 CST

Original text of this message

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