Tables¶

Note: Tables are an experimental feature in RAW. Although the format is considered stable, features are missing and the public API is still subject to changes.

Tables are used in RAW to permanently store data.

Tables are designed for "tabular" structure, similarly to SQL tables in relational databases.

To create a table in RAW we use the %%table magic. The type must be passed as an argument.

The type is described in RQL syntax and must consist of a tabular structure, i.e. a collection of records of primitive types.

To create a table called table1.

This table is now empty.

To insert data into the table, we use the tables_insert magic. This requires the table name and the contents to be inserted into the table.

The contents are an RQL query.

This allows users to load data into a RAW table from another location as in:

The table contents can now be queried:

It is also possible to insert data that does not originate from another location.

This can be done by creating a RAW query that includes the data to be inserted.

Let's create a new table, and insert data into it:

To insert data, we write an RQL query using RAW's syntax to create collections and records.

To create a collection in RAW we use [..., ...].

To create records in RAW we use (<field>: <value>, ...).

Therefore, we can insert data manually as in:

Tables use multiversion concurrency control.