This project compares performance of various database libraries for Android.
Libraries tested:
- ObjectBox (NoSQL, object-oriented, non-relational)
- Realm (NoSQL, object-oriented, non-relational)
- Room (SQL ORM)
- SQLDelight (SQL ORM)
- SqliteOpenHelper (SQL)
- SharedPreferences (NoSQL, key-value storage)
- DataStore Proto (NoSQL, protobuf storage)
For now there are two data sets:
- 1) Floating numbers (high uniqueness) - see common/dataset/weatherlogs
- 2) Strings (almost no uniqueness) - see common/dataset/news-reports
The project is divided into three types of modules:
- app - main screen and Application class.
- feature - logic for testing a particular database
- common - code shared between the modules
To structure the code itself, clean architecture is used. With the only classes being different across the features are DtoConverter and DbDataSource on the data layer. This means if you want to add a performance test for a new database, all you have to do is create your own implementation of these two classes.
This project utilizes the latest Android technologies, such as: