Quick Start Guide

The Raijin Database Engine is designed to fill the gap between SQL and document databases. In this short introductory guide, we will show you how you can use Raijin to solve a major headache: schema rigidity.

We assume you are already familiar with SQL and have used an RDBMS product in the past, although this is not a requirement.

Installing Raijin

The first step is to grab either the RPM or the DEB package from the Downloads page.

To install the Raijin Database Engine on Ubuntu, Debian, or one of its derivatives, run the following as root:

$ sudo dpkg -i raijin-server_5.3.6735_amd64.deb

On RedHat, CentOS, or other RPM-based GNU/Linux distributions, use the following command:

$ sudo rpm -ivh raijin-server-5.3.6735.x86_64.rpm

There are no additional packages to install and configure.

Accessing the Raijin web interface

Once you install Raijin, you must turn off authentication to access the web interface for the first time. Open /opt/raijin/data/conf/raijin.conf with a text editor and change the AuthenticationType parameter to NONE.

Restart the Raijin service to apply the changes:

$ sudo service raijin-server restart

Next, open http://localhost:2500 in your web browser, and you should see the Raijin query editor.

You are now running Raijin with user authentication turned off. See User management to create your first superuser and Configuration parameters for advanced configuration options.

You must restart the Raijin service for any configuration changes to take effect.

Running simple queries

You can use the Raijin web-based query editor to start experimenting with Raijin.

Creating a database

To create a database named testdb, try:

CREATE DATABASE testdb;

Clicking Execute Query should return OK, as shown below.

Raijin user interface

Creating tables

Next, go ahead and create a table in your new database:

CREATE TABLE testdb.tbl(a BOOL, b INT);

And populate it with some data:

INSERT INTO testdb.tbl(a, b) VALUES (true, 1);

Both of these commands should return OK.

Retrieving data

Now that your database contains some data, you can retrieve it by executing a SELECT query:

SELECT * FROM testdb.tbl;

Raijin will return the result in JSON format:

{"_id":1,"a":true,"b":1}

Once you’re ready from your testing, you can delete the database used in this exercise:

DROP DATABASE testdb;