Relation:Console application

A console application Relation is also included in the distribution.

It consists of the

  • relation executable file
  • relation Libs library that must always be present in the same folder.

It has a direct mode where you can write relation code directly using an command line option like syntax.

cd YOURPATHTORELATION
./ relation -relation a,b -insert 1,2 -insert 3,4 -print

Instead of new lines, every instruction is preceded by a minus sign.
You should not use the minus sign freely in expressions.
You have to escape all special characters of the console like quote ", pipe | and greater > and lower < Alternatively you can use square braquets to replace quotes.

cd YOURPATHTORELATION
./ relation -read &#92;"table.csv&#92;" -select price &#92;<50 -print

cd YOURPATHTORELATION
./ relation -read [table.csv] -select price &#92;<50 -print

It also has an interactive mode where you can executre relational instructions step by step.

cd YOURPATHTORELATION
./ relation

Use q to quit

The files you read, write and the .rel files must be in the current working directory.

Install relation.exe

You can also install a path for relation.exe so you can just call the app with. Create a bin folder in your home folder and copy the relation.exe and the supporting files there.

relation

Navigate to the home folder

cd ~

If the file .bash_profile does not exist, create it and open with TextEdit

touch .bash_profile
open -e .bash_profile

Add this text to the file and save it

export PATH="$HOME/bin:$PATH"

Quit Terminal and open it again. This should now work:

relation
>