Re: Relational Algebra Expression
- From: Bob Badour <bbadour@xxxxxxxxxxxxxxxx>
- Date: Sat, 09 Feb 2008 13:12:00 -0400
gamehack wrote:
On Feb 9, 4:47 pm, Bob Badour <bbad...@xxxxxxxxxxxxxxxx> wrote:
gamehack wrote:
[snip]
What I'm trying to do is extract all the years where we have more than
1 relation for the year. For the sample table, we need to get:
1999
2001
I tried to do in a couple of ways but I couldn't. I tried using a
projection on Year so that I can remove duplicates but then I can't
just use difference because the new relations are not compatible. Any
hints are greatly appreciated.
Equijoin on year and inequality theta-join on name project on year.
Hi,
I can't really understand what this means - can you bracket it so I
can see the results of each operation?
Thanks very much,
g
Read it left to right, like you would any other english sentence, and think about the result after each operation. How many of each year will you have after each step?
Ask yourself whether it works for "more than 1".
Ask yourself whether it generalizes to "more than n".
Then, think about how you would write it in whatever algebraic syntax you are using.
.
- References:
- Relational Algebra Expression
- From: gamehack
- Re: Relational Algebra Expression
- From: Bob Badour
- Re: Relational Algebra Expression
- From: gamehack
- Relational Algebra Expression
- Prev by Date: Re: Relational Algebra Expression
- Next by Date: Re: Relational Algebra Expression
- Previous by thread: Re: Relational Algebra Expression
- Next by thread: Re: Relational Algebra Expression
- Index(es):
Relevant Pages
|