Re: Is relational theory irrelevant?

From: Joe \ <joe_at_bftsi0.UUCP>
Date: Tue, 18 Nov 2003 13:26:17 -0800
Message-ID: <1069190783.219363_at_news-1.nethere.net>


"Serge Rielau" <srielau_at_ca.eye-bee-m.com> wrote in message <news:bpduip$3p2$1_at_hanover.torolab.ibm.com>...

> Joe "Nuke Me Xemu" Foster wrote:
>
> > "Paul Vernon" <paul.vernon_at_ukk.ibmm.comm> wrote in message <news:bpdpuh$1v88$1_at_gazette.almaden.ibm.com>...
> >
> >
> >>Sniped in and bold added:
> >>
> >> your *client program* opens the *cursor* and *iterates*
> >
> >
> > Fine, then define sendmail() to take one or more relations
> > as arguments and let /it/ do any iterating:
> >
> > sendmail(select address from harvestedlist, "MAKE MONEY FAST!!!")
> >
> > I suppose that if we can only push iteration down deep enough,
> > it goes away entirely?
> >
> Ah, OK. Now what if I want to reuse the result of the sendmail function?
> Let's say to validate the email wasn't bounced (or least not malformed).
> What you have now is a sendmail relational operator :-)

If there is more than one row in the relation, split it into two and recursively call sendmail() with each half. If there is only one row, delegate it to some other Beowulf node and let it actually send the mail and update the database with the result. Voila! No "iteration" anywhere. >=)

> A note to Mikito:
> SQL was originally SEQUEL: Structured ENGLISH query language.
> And no, I'm not a native English speaker ...
> To fetch the LAST 5 ROWS ONLY one simply flips the ORDER BY :-)
> I have never seen a request to get the MIDDLE outside of TPC-C.

I've seen requests for the median and friends, which get ugly. However, the median gives us a way to "split [the relation] into two" without stumbling into the iteration heresy.

OTOH, keeping things simple and elegant can make like easier for both developers and code/query optimizers alike.

--
Joe Foster <mailto:jlfoster%40znet.com>  Auditine Addict <http://www.xenu.net/>
WARNING: I cannot be held responsible for the above        They're   coming  to
because  my cats have  apparently  learned to type.        take me away, ha ha!
Received on Tue Nov 18 2003 - 22:26:17 CET

Original text of this message