Here is Nick's original post to the course forums.
Relational Algebra Interpreter
I've written an interpreter that can work with relational algebra.
The idea is that it is easier to get the hang of relational algebra if you can play around and experiment with the different operators. I looked at some of my solutions and though 'if only I could just run this to see if it works'.
The interpreter handles select, project, join, divide , rename, union, difference, intersection, alias and times.
The main limitation is that you cannot create a relation within the interpreter - you have to load it in from a CSV file. But then you can create new relations from it.
rela := load "/home/nick/my-rela.csv"
select rela where a > 2
project rela over a, b, c
project (select rela where a > 2 or b <= 5) over a, b It also handles assignment, so: relb := project rela over a, b, c Which creates a new relation called relb. Loads more examples in the documentation along with some example CSV files and how to make your own. Hint: in the interpreter use
to get a newline (for long expressions) and use to evaluate.
The project is written in Java and has a re-usable class called Relation that does all the work. It's free for anyone that wants to use it.
You can download the executable jar file and/or source code at:
The interpreter itself is a JAR file called "raeval.jar" and is available under the downloads tab. To run it you need the Java Runtime Environment that is also available free. I have had it up and running on Windows, Mac and Ubuntu Linux.
There are some (really) basic instructions there too.
Note: this is beta software. I've tested all of the functionality but there probably are some bugs left. Contact me from the project home if you spot them. But please be gentle, because this has been an obsession...