Using ra


ra is a simple relational algebra interpreter for IBM DB2. It is implemented by translating relational algebra queries into SQL queries and executing them on DB2. To use ra, log into rack40 and set up the DB2 environment. Then, just type ra at the shell prompt. You will see the ra> prompt.

You exit the interface by issuing the \quit; command. The simplest relational query you can write is one that returns the content of a database table---just type tableName;, where tableName is the name of the table. Note that every command/operator should start with a backslash (\), and every query should be terminated by a semicolon (;).

ra supports the following relational algebra operators:

Currently, ra has the following limitations: