ObjectBox

MMAP Mobile Nearest Neighbor Search NoSQL Time-Series

ObjectBox is an object-oriented DBMS library built for IoT, mobile, and embedded devices. It is also the very first vector database that runs on these devices. ObjectBox supports several programming languages (Java, C/C++, Go, Swift, Kotlin, and Python) and runs on multiple platforms (Linux, QNX, Windows, Mac/iOS, Android, and any POSIX system).

ObjectBox stores objects directly, instead of storing data in relational DBs and accessing them through an ORM layer. It has full ACID compatibility, provides transaction semantics, and uses MVCC for concurrency control.

History

ObjectBox is represented by ObjectBox Ltd. Before (in 2011), one of the co-founders created greenDAO, a popular Android ORM library that uses SQLite as backend. The team then decided to build a NoSQL object-oriented DBMS from scratch, which is ObjectBox. ObjectBox' first public beta release was on 2017/1/24.

The author of greenDAO and ObjectBox is Markus Junginger.

Data Model

Object-Oriented

ObjectBox is object-oriented. Objects are stored directly without another layer of relational tables.

Foreign Keys

Supported

Foreign keys are maintained by relations in each entity. There are 2 kinds of relations: ToOne and ToMany. By combining the type of the relation and the type of the reverse relation, the user can define one-to-one, one-to-many, and many-to-many relations.

Indexes

B+Tree

B+ tree based with 3 different options: value, 32 bit hash, 64 bit hash (hashes for string values only)

Joins

Index Nested Loop Join

Joins in ObjectBox is implemented using relations stored in each object. Each object stores reference to the other object(s) in the relation, which is similar to index nested loop join.

Query Compilation

Not Supported

A query builder "compiles" query objects by setting up using code pointers that check criteria

Query Interface

Custom API

ObjectBox provides builder APIs for creating queries. Created queries are reusable by setting different parameters.

Storage Architecture

Hybrid

Low-level mmap approach taking care of OS in-memory caches and ACID compliant disk storage

Storage Model

Custom

Storage Organization

Copy-on-Write / Shadow Paging

Stored Procedures

Not Supported

The DB itself don't have stored procedures, but it can be implemented using functions in the corresponding programming language when run as an embedded database.

System Architecture

Embedded

The DB runs on IoT and mobile devices and does not share disk or memory with other devices. However, the ObjectBox supports automatic synchronization of data with the backend server. When the server is unavailable (i.e. network failure), the synchronization will stop, and it is restored seamlessly when the server is available again.

People Also Viewed