What is Genji?

Genji is a document-oriented, embedded, SQL database written in Go.

It combines the power of SQL with the versatility of documents to provide a maximum of flexibility with no compromise.

Here is a list of Genji’s main features:

  • Optional schemas: Genji tables are schemaless, but it is possible to add constraints on any field to ensure the coherence of data within a table.
  • Multiple Storage Engines: It is possible to store data on disk or in ram, but also to choose between B-Trees and LSM trees. Genji relies on BoltDB and Badger to manage data.
  • Transaction support: Read-only and read/write transactions are supported by default.
  • SQL and Documents: Genji mixes the best of both worlds by combining powerful SQL commands with JSON dot notation.
  • Easy to use, easy to learn: Genji was designed for simplicity in mind. It is really easy to insert and read documents of any shape.

Concepts

Genji’s main concepts are not new and semantics have been chosen to match as much as possible what is already existing in other databases:

Classic SQL databases Genji
Table Table
Row Document
Column Field
Schema Field constraints
  • Table: A collection of documents. Tables are schemaless by default and support optional
  • Document: A list of fields
  • Field: A key-value pair
  • Field constraint: A constraint validated against a field of every inserted or updated document

Getting started

How to install and use Genji

Essentials

How to create and manage database structures using Genji SQL syntax

Reference

Complete documentation about Genji’s SQL syntax


Last modified October 21, 2021: Move back to docs (991ad67)