Room
The Room persistence library acts as a wrapper between your application code and the SQLite storage. You can think of SQLite as a database that runs without its own server and saves all the application data in an internal file that’s only accessible to your application (if the device is not rooted).
Room sits between the application code and the SQLite Android Framework, and handles the necessary create, read, update, and delete (CRUD) operations while exposing an abstraction that your application can use to define the data and how you want the data to be handled. This abstraction comes in the form of the following objects:
- Entities: You can specify how you want your data to be stored and the relationships between your data
- Data access object (DAO): The operations that can be done on your data
- Database: You can specify the configurations that your database should have (the name of the database and migration scenarios)
These can be seen in the following...