Print

RioSQL

I know… Another No SQL language to learn. (Sigh)
But consider this. High-performance analytics is a bit complex. If you were to build high-performing analytic applications in Java, C, Rust, etc., it would take you many pages of code for each specific task. And as you get requirements for a different task, there goes another 20 pages of code.
So think of it this way: Each little statement you write in RioSQL saves you from writing tons of equivalent code from scratch. If you write 10 statements in one hour, you just saved your team a month (or months) of writing equivalent code.

1 – RioSQL Basics

RioSQL (RioDB Stream Query Language) is not the same as standard SQL (Structure Query Language).
SQL is meant to query data in a certain state (a snapshot in time), returning records where conditions are met.
RioSQL is meant to query data that is changing continuously, never-ceassing, triggering some action when conditions are met, and continue to scan after that.
These are different purposes, therefore, the RioDB Stream Query Language has to provide some different functionality, making it different from standard SQL.
That being said, we kept it as close as possible to standard SQL, so the learning curve should be A LOT shorter than learning some of the other “stream query languages” out there.

RioSQL is case-insensitive, except for hard-coded string values that you pass ‘quoted’.

Each statement is terminated with a semi-colon ‘;’

The general phylosophy of RioSQL is not to write some kind of client application that queries RioDB (as your would with traditional databases and JDBC, etc.). The main goal is to give RioDB a query and let it run the query continously, never-ceasing, and RioDB will notify you (or trigger some action) whenever the query runs into a matching scenario, and RioDB will continue to run the query after that, until told to stop.

2 – How to run RioSQL

There are 3 methods:

  1. You can post statements to RioDB via the HTTP API, from something like Postman or CURL.
  2. You can post statements via the interactive riodb console, an application shipped with the RioDB downloadable archive. This is specially useful if you can only run commands from localhost (on a cloud server that cannot be reached from Postman on your laptop).
  3. You can put files in RioDB’s home directory /sql. Then RioDB executes these commands everytime it starts up.

TIP, you can use method 1 for the development environment and restrict to method 2 or 3 in production environments. See the Security doc.

Table of Contents
Scroll to Top