I'm fairly new to the syntax of relational algebra, and I'm having a hard time understanding how I could set a "at least one" clause.
Example: I have:
- a table with books (listing the title, year published and ID),
- a table with authors (listing their name and ID),
- a table which lists what author wrote what book (through a tuple of the IDs mentioned before).
How could I, in relational algebra, get "All the authors that have published at least one book per year between 2008 and 2010"?
I have figured this so far. At step "b", the Natural join is used since both tables have PublicationID in common. Thus, the resulting table is |PublicationID|AuthorID|Year|. So I'm simply missing the step "c", where I don't understand how to gather a sub-set of the authors that published at least one book per year between 2008 and 2010.
$ a \leftarrow \pi_{PublicationID,Year} (Publication)$
$ b \leftarrow a \bowtie AuthorPublication $
$ c \leftarrow \sigma_{something} $