greenrobot/greenDAO
greenrobot/greenDAO has 12,583 GitHub stars and 2,848 forks. GitHot measured 0 stars in 24 hours. Last checked 2026-11-06 04:17 UTC. Last push 2024-04-30.
greenDAO is a light & fast ORM solution for Android that maps objects to SQLite databases.
What you can do
- 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
Measured star growth
- in 24h
- 0
- in 7 days
- Collecting history
- in 15 days
- Collecting history
- in 1 month
- Collecting history
Net star changes over overlapping periods, not daily totals. Missing measurements are left blank. Stars measure attention, not software quality.
README.md
Original⚠️ This project is not longer actively maintained. If you are looking for an easy to use and efficient database solution, please:
Check out ObjectBox
Check out our new mobile database ObjectBox (GitHub repo).
ObjectBox is a superfast object-oriented database with strong relation support. ObjectBox is embedded into your Android, Linux, macOS, or Windows app.
greenDAO
greenDAO 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.
Home page, documentation, and support links: https://greenrobot.org/greendao/
Features
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
Add greenDAO to your project
greenDAO is available on Maven Central. Please ensure that you are using the latest versions of the greendao and greendao-gradle-plugin artifact.
Add the following Gradle configuration to your Android project. In your root build.gradle file:
buildscript {
repositories {
jcenter()
mavenCentral() // add repository
}
dependencies {
classpath 'com.android.tools.build:gradle:<agp-version>'
classpath 'org.greenrobot:greendao-gradle-plugin:3.3.1' // add plugin
}
}
In your app modules app/build.gradle file:
apply plugin: 'com.android.application'
apply plugin: 'org.greenrobot.greendao' // apply plugin
dependencies {
implementation 'org.greenrobot:greendao:3.3.0' // add library
}
Note that this hooks up the greenDAO Gradle plugin to your build process. When you build your project, it generates classes like DaoMaster, DaoSession and DAOs.
Continue at the Getting Started page.
R8, ProGuard
If your project uses R8 or ProGuard add the following rules:
-keepclassmembers class * extends org.greenrobot.greendao.AbstractDao {
public static java.lang.String TABLENAME;
}
-keep class **$Properties { *; }
# If you DO use SQLCipher:
-keep class org.greenrobot.greendao.database.SqlCipherEncryptedHelper { *; }
# If you do NOT use SQLCipher:
-dontwarn net.sqlcipher.database.**
# If you do NOT use RxJava:
-dontwarn rx.**
Homepage, Documentation, Links
For more details on greenDAO please check greenDAO's website. Here are some direct links you may find useful:
More Open Source by greenrobot
ObjectBox is a new superfast object-oriented database for mobile.
EventBus is a central publish/subscribe bus for Android with optional delivery threads, priorities, and sticky events. A great tool to decouple components (e.g. Activities, Fragments, logic components) from each other.
Essentials is a set of utility classes and hash functions for Android & Java projects.
Explore related projects
Asabeneh/30-Days-Of-Python
The 30 Days of Python programming challenge is a step-by-step guide to learn the Python programming language in 30 days. This challenge may take more than 100 days. Follow your own pace. These videos may help too: https://www.youtube.com/channel/UC7PNRuno1rzYPb1xLa4yktw
78,236 starsgrafana/grafana
The open and composable observability and data visualization platform. Visualize metrics, logs, and traces from multiple sources like Prometheus, Loki, Elasticsearch, InfluxDB, Postgres and many more.
77,724 starsredis/redis
For developers, who are building real-time data-driven applications, Redis is the preferred, fastest, and most feature-rich cache, data structure server, and document and vector query engine.
77,201 starsapache/superset
Apache Superset is a Data Visualization and Data Exploration Platform
75,420 stars