Re: relational algebra question

From: Riza <k_at_wa.bp.net>
Date: Thu, 11 Sep 2003 01:43:13 GMT
Message-ID: <RqQ7b.93706$bo1.57226_at_news-server.bigpond.net.au>


thank you for advice so far,

Find the "not most expensive items" sure -I get how I could do this with a loop...like java, but in Relational Algebra?

And How can I traverse down a column comparing the next row to the previous?

the question says

> Express the query with RA expressions and a series of intermediate
relations

Do I make a recursive loop or something?

as I don't know how many items there are I can't see how I can, just using ">" and "<" make sure I definately have a group of either the most expensive, or not the most expensive item..

(this question is actually really easy and I'm missing something simple, yeh?)

riley

"Jan Hidders" <jan.hidders_at_pandora.be> wrote in message news:yhI7b.12675$FL7.476299_at_phobos.telenet-ops.be...
> riley wrote:
> >
> > I've been asked to write a Relational Algebra Expression to get the most
> > expesive item
>
> Hint: First write an algebra expression for the items that are *not* the
> most expensive. Then use this expression to build a bigger expression that
> computes the answer that you want.
>
> In case you have trouble finding that particular expression let me remind
> you of the following trivial truth:
>
> An item is not the most expensive one if there is another one that is more
> expensive.
>
> Good luck,
>
> -- Jan Hidders
>
Received on Thu Sep 11 2003 - 03:43:13 CEST

Original text of this message