Relation CLI

Relation is a command line program to do Relational Algebra with text files.
Relation can also be used online

This presentation gives you a good start to understand relational algebra and its use with these functions

Video demo of Relationa Algebra Online


Relation has been written in Javascript.
The binary uses Node.JS with the modules process, readline and fs and was compiled with pkg. (Mac) (Linux, not tested) (Windows, not tested)

To be used as ./relation in interactive mode and as .relation -b file.rel in batch mode.

Source Code

Relation is on GitHub


Read a Relation CLI sample session

Short User guide

The text files can be .csv (comma separated values) and .txt (tab separated values),. both in Unicode UTF 8.

Relation has an interactive shell that allows you to open and save relations

And to create relations directly

The columns are not typed. They values are either strings or numbers depending on the context.
Any value other than 0 is considered true.

Once you have created the relations, you can make the relational operators

Expressions can use

Agregators can be

You can use also non-relational non relational operators:

The order mode can be A, Z (alphabetically normal and reverse), 1, 9 (numerically ascending or descending).

Finally, you can manipulate the operation stack:

And print out the results:

And view and edit the history to rerun it

The history of the command line can be saved as .rel file to be reused.