objectbox/objectbox-java
Database for Android and JVM - first and fast, lightweight on-device vector database
ObjectBox Java – On‑device NoSQL database with vector search
What it is
ObjectBox‑Java is a lightweight, on‑device database for Java and Kotlin apps (Android, desktop, server). It stores plain objects (POJOs) directly, so you never write SQL. The library also includes a vector‑search engine, letting you keep high‑dimensional embeddings alongside your regular data and run fast similarity queries – useful for RAG, generative‑AI or recommendation features.
Why you might want it
| Feature | What it means for you |
|---|---|
| First on‑device vector DB | Store embeddings locally and run similarity search without a remote service. |
| High performance | Benchmarks claim CRUD operations are faster than SQLite or Realm, with low CPU, memory and battery impact – important for mobile or edge devices. |
| Object‑oriented API | Define an @Entity class, get a Box<T> and call put, get, remove. No SQL strings, compile‑time type safety. |
| Built‑in relations | One‑to‑many, many‑to‑many links are handled automatically, simplifying complex data models. |
| Cross‑platform | Works on Android and any JVM (Linux, macOS, Windows) and supports ARM CPUs. |
| Sync & time‑series extensions (separate products) | Optional add‑ons for syncing data between devices or storing time‑series data. |
How you use it (quick sketch)
@Entity
public class Person {
@Id long id; // auto‑generated primary key
String firstName;
String lastName;
}
BoxStore store = MyObjectBox.builder()
.name("person-db")
.build();
Box<Person> box = store.boxFor(Person.class);
Person p = new Person();
long id = box.put(p); // create
Person loaded = box.get(id); // read
loaded.lastName = "Smith";
box.put(loaded); // update
box.remove(loaded); // delete
Kotlin usage is analogous, using the same annotations.
Getting it into your project
- Gradle – add the
io.objectboxplugin (or use a version catalog) and the ObjectBox dependencies from Maven Central. - Maven – supported for JVM projects; see the example repo for a pom file.
- Requires Java 8+ (or Kotlin 1.7+), runs on Android 5.0+ and on modern desktop OSes.
Where to learn more
- Docs & getting‑started – https://docs.objectbox.io
- Example apps – https://github.com/objectbox/objectbox-examples
- FAQ / troubleshooting – linked from the README.
- Performance benchmark repo – shows speed vs. SQLite/Realm.
License
Apache 2.0 (the code in this repo). Other ObjectBox components have their own licensing terms.
ObjectBox Java is a genuine software project focused on local data storage and on‑device vector search, fitting the AI/ML frontier by enabling edge‑side similarity search for embeddings.
Related
- Project
- Project
- Project
- Project
- Project