Quickstart

Create a table, define a live view over it, and watch ReifyDB keep that view up to date as the data changes. Right here in your browser, nothing to install.

This page is a real database
Every snippet below runs against a real ReifyDB engine compiled to WebAssembly. Click Run on each snippet, top to bottom. You can edit any of them.

1. Create a table

Tables hold authoritative state. Every table lives in a namespace and is addressed as namespace::table:

$ Create a Table
$ ctrl+enter to run

2. Define a live view

A transactional view is derived state. You declare the query once; ReifyDB maintains the result incrementally, inside the same transaction as every write that affects it. No polling, no cache invalidation, no batch refresh:

$ Create a Transactional View
$ ctrl+enter to run

The view tracks changes from the moment it is created, so we define it before inserting data.

3. Insert rows

INSERT takes an array of records:

$ Insert Rows
$ ctrl+enter to run

4. Query the table

RQL queries are pipelines. Start with from, then chain steps; each line transforms the output of the line above it:

$ Query the Table
$ ctrl+enter to run

5. Query the view

The view already contains the two open orders. Nothing recomputed the query; the inserts themselves maintained it:

$ Query the View
$ ctrl+enter to run

6. Change the data

Ship the keyboard order:

$ Update a Row
$ ctrl+enter to run

Then query the view again. The shipped order is gone, because the view's filter no longer matches it:

$ The View Maintained Itself
$ ctrl+enter to run

7. Aggregate

Pipelines end wherever you need them to. Group and aggregate with aggregate ... by:

$ Aggregate Revenue by Status
$ ctrl+enter to run

Where next

  • --RQL in five minutes - the query language, one concept at a time
  • --Installation - run ReifyDB for real, embedded or as a server
  • --Concepts - what an application state database is and when to use one