gitmyhub

objectbox-java

Java ★ 4.6k updated 1d ago

Database for Android and JVM - first and fast, lightweight on-device vector database

ObjectBox is a fast, easy-to-use database for Android, Java, and Kotlin apps that lets you store and retrieve objects directly without SQL, and uniquely offers on-device vector search for building local AI features.

JavaKotlinAndroidGradleMavensetup: easycomplexity 2/5

ObjectBox is a database library for Android apps and Java or Kotlin programs that run on a computer. It lets you store and retrieve data without writing SQL queries. Instead of working with tables and rows the way a traditional database requires, you define a plain Java or Kotlin class, mark it with an annotation, and ObjectBox handles the rest. You put objects in, you get objects out.

The core idea is that saving a "Person" object should be as simple as calling box.put(person), and reading it back should be box.get(id). The library generates the necessary database code for you based on the class definition, so you spend less time on boilerplate. It supports creating, reading, updating, and deleting records, as well as defining relationships between different types of objects.

One feature the README highlights is on-device vector search. This is a way of finding records that are similar to a given input, which is the same technique used in AI-powered search and recommendation systems. ObjectBox claims to be the first database of its kind to offer this capability directly on a device, without sending data to a server. The README connects this to use cases like building apps that include local AI features.

The library works on Android 5.0 and newer, and on desktop or server systems running Linux, macOS, or Windows. It supports Java 8 and newer, and Kotlin 1.7 and newer. Setup is done through Gradle or Maven, the standard build tools for Java projects. The README includes detailed configuration steps for both.

ObjectBox is released under the Apache 2.0 license, which allows free use in commercial and open-source projects. The project also offers paid plans with additional features, as noted in the linked documentation.

Where it fits