Android database

1.GreenDao

Introduction to the

GreenDAO’s source code, part of which is native code, and part of which is compiled and generated, collaborated to complete greenDAO’s functions, namely, Object-Relational Mapping (ORM).

2.ObjectBox

Introduction to the

Objectbox database is a new non-relational database framework developed by the GreenRobot team, which has also developed greenDao,EventBus and other popular frameworks. According to the official introduction, the library has the following features:

  • Super fast: Claims to be better than any embedded database ever tested
  • Object-oriented API: No Rows, Columns, and SQL, completely zero-based objects (no ORM, no SQLite)
  • Reactivity: Simple and powerful responses to data changes, using the Reaction Data Viewer in ObjectBox or integrated with RxJava.
  • Multiple platforms: Android and Java already supported,ios and MacOs are being integrated
  • Simple threads: The object returned by the ObjectBox can run in all threads
  • We no longer need to manage the version numbers ourselves for database upgrades. ObjectBox automatically manages them for us (ObjectBox is responsible for adding, deleting, and renaming new object versions of attributes).

3.Room

Introduction to the

Room is a data persistence component library in the Android architecture component library launched by Google, which can also be said to be a set of ORM solutions implemented on SQLite. Room mainly consists of three parts:

  • Database: Holds the DB and DAO
  • Entity: Defines POJO classes, which are data table structures
  • DAO(Data Access Objects) : Defines interfaces for accessing Data (adding, deleting, modifying, and querying Data)