Table of Contents

Introduction Installation Projects Tables Inserts Searches Updates Deletes CLI Production Installation Conclusion

Flaarum Introduction

Flaarum is a database that enforces structures and features its own query language.

Why Flaarum?

  1. Table Expansion

    In most structured databases, joins are used when there is a relationship between tables (a store of information). This joins could be very complex especially if you want to join more than three tables. Flaarum instead uses implicit joins or what we call Table Expansion.

    To illustrate table expansion, assume a table called aperson has the following fields: name, email, dob. And it used as three foreign keys in another table called family which has the following fields: father, mother and child.

    So with table expansion, a search that enables table expansion on the table family would yield the following fields: father.name, father.email, father.dob, mother.name, mother.email, mother.dob, child.name, child.email, child.dob

    Note some of the fields are excluded in this example

  2. Seamless Table Definition Update

    In most structured databases, especially when there is already data in a table; some table definitions would be rejected. This presents a problem during prototyping stage, and only uncomfortable solutions presents itself.

    To solve this problem, any table definition (or structure) mutation is stored in the database and is given a version number. This version number is stored in every row of the table. When there is a mutation, the version number increases and leads to new rows being stored with the version number.

    Then in your application, you could check if the row is in the most recent version. And if it is not you could inform the user that he/she needs to update his data.

  3. Autoindexing

    Indexes are small pieces of answers to common searches. This makes any database avoid searching through every row of a table to find the information the search intents.

    One could explicitly declare an field 'nindex' to mean that it would not be indexed.

Audience

Flaarum only supports the Go programming language.

Next >