There are several popular ORM database libraries out there (SQLDelight, GreenDAO, SugarORM) but we’re going to see top 10 Android database library and nearly every one uses reflection for critical database interactions. Back-end developers get things done, plain and simple.
Their work lays the foundation for an app’s success, and it comes with a lot of blood sweat and tears. Whatever your flavor, NoSQL or SQL these database libraries aim to make that work easier.
List of Top 10 Android Database Libraries
1. Sugar ORM (Java)
TMH rating : 8.6/10
Insanely easy way to work with Android databases.
It was built in contrast to other ORM’s to have:
- A simple, concise, and clean integration process with minimal configuration.
- Automatic table and column naming through reflection.
- Support for migrations between different schema versions.
2. SQLDelight (Kotlin)
TMH rating : 7.3/10
Generates Java models from CREATE TABLE statements.
- SQLDelight generates Java models from your SQL
- These models give you a typesafe API to read & write the rows of your tables.
- It helps you to keep your SQL statements together, organized, and easy to access from Java.
3. Nitrite Database (Java)
TMH rating : 6.1/10
Java embedded nosql document store
NOsql Object (NO2 a.k.a Nitrite) database is an open source nosql embedded document store written in Java. It has MongoDB like API. It supports both in-memory and single file based persistent store powered by MVStore engine of h2 database.
It is a server-less embedded database ideal for desktop, mobile or small web applications.
- Embedded key-value/document and object store
- In-memory or single data file
- Very fast and lightweight MongoDB like API
- Full text search capability
- Full Android compatibility
- Observable store
- Both way replication via Nitrite DataGate server
4. AppDataReader (Java)
TMH rating : 5.8/10
A library for reading Shared Preferences and Database values within the application.
A library for reading and writing Shared Preferences and Database values of the application within the device.
Advantages of using this library
- No Java Code. Only gradle dependency.
- Read all the Database Values in the device without the need of a browser.
- See all the Shared Preferences at once or file by file.
- Edit the table data by clicking the value of a column in a row.
- Query the database with various types of queries like SELECT, UPDATE, DELETE, INSERT and RAW QUERY. Querying is made simpler by making an interactive UI for various types of queries.
- Copy the value of an individual column of Shared Preference and Database tables to Clipboard.
- With the help of some additional gradle code, this library will pick up the compileSdk Version, targetSdk Version and Build Tools Version from the main project.
5. greenDAO (Java)
TMH rating : 5.6/10
greenDAO is a light & fast ORM solution for Android that maps objects to SQLite databases.
It is a light & fast ORM for Android that maps objects to SQLite databases. Being highly optimized for Android, greenDAO offers great performance and consumes minimal memory.
greenDAO’s unique set of features:
- Rock solid: greenDAO has been around since 2011 and is used by countless famous apps
- Super simple: concise and straight-forward API, in V3 with annotations
- Small: The library is <150K and it’s just plain Java jar (no CPU dependent native parts)
- Fast: Probably the fastest ORM for Android, driven by intelligent code generation
- Safe and expressive query API: QueryBuilder uses property constants to avoid typos
- Powerful joins: query across entities and even chain joins for complex relations
- Flexible property types: use custom classes or enums to represent data in your entity
- Encryption: supports SQLCipher encrypted databases.