![]() | |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Howdi, I'm not asking for the answer - but a gentle nudge in the right direction I've been asked to write a Relational Algebra Expression to get the most expesive item i'm not really sure how to go about it, any help appreciated |
#3
| |||
| |||
|
|
I've been asked to write a Relational Algebra Expression to get the most expesive item |
#4
| |||
| |||
|
|
Express the query with RA expressions and a series of intermediate relations |
|
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 |
#5
| |||
| |||
|
|
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 (DOT) be> wrote in message news:yhI7b.12675$FL7.476299 (AT) phobos (DOT) 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 |
![]() |
| Thread Tools | |
| Display Modes | |
| |