Relation CLI

Relation is a command line program to do Relational Algebra with text files.
Relation can also be used online https://www.belle-nuit.com/relation/index.html

This presentation gives you a good start to understand relational algebra and its use with these functions
relation-for-excel-200-presentation.pdf

Video demo of Relationa Algebra Online
https://www.belle-nuit.com/download/relation-demo.mov-1080.mp4

Download

Relation has been written in Javascript.
The binary uses Node.JS with the modules process, readline and fs and was compiled with pkg.

https://www.belle-nuit.com/download/relation.zip (Mac)
https://www.belle-nuit.com/download/relation-linux.zip (Linux, not tested)
https://www.belle-nuit.com/download/relation-win.exe.zip (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 https://github.com/bellenuit/Relation

Examples


https://www.belle-nuit.com/download/examples.zip

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.