Introduction

Getting started

Ra has the concept of a current schema, grouping the currently accessible data together under a given name. A disk directory is used for this, providing the name and file grouping needed. Before starting Ra, first choose a directory to use as the current schema, e.g.

$ chdir myschema

or create a new schema and then choose it, e.g.

$ mkdir myschema
$ chdir myschema

Once in the schema directory, start the Ra interpreter using ra (rlwrap provides improved editing and command history):

$ rlwrap ra

Ra will read any data stored in the current directory, then it will run the init.ra schema initialisation program if one exists here, and then it will present the REPL prompt.

myschema Ra> 

Then we can start working with data, e.g.

myschema Ra> group({planet_name:str, moon_name:str, period:float}{["Mars", "Phobos", 7.66], ["Mars", "Deimos", 30.31]}, {moon_name, period}, moons)
┌─────────────┬────────────────────────┐
│ planet_name │ moons                  │
├─────────────┼────────────────────────┤
│ Mars        │ ┌───────────┬────────┐ │
│             │ │ moon_name │ period │ │
│             │ ├───────────┼────────┤ │
│             │ │ Deimos    │  30.31 │ │
│             │ │ Phobos    │   7.66 │ │
│             │ └───────────┴────────┘ │
└─────────────┴────────────────────────┘

To get help, including a list of help topics:

myschema Ra> )help

To get help on a specific topic:

myschema Ra> )help <topic>