| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> comp.databases.theory -> Re: relational algebra question
"Riza" <k_at_wa.bp.net> wrote in message
news: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?)
Yeh. You want to write a single expression that involves no looping or recursion. Just describe what you want or what you don't want.
> 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 Wed Sep 10 2003 - 22:02:05 CDT
![]() |
![]() |