Database - GhostBusters-APM/GhostHouse GitHub Wiki

The application stores the data into a Room database. These data consists of the list of devices the user has configured and the power data associated with them. Data can be accessed directly by using the defined DAOs and a simple service, DatabaseService, is set for a couple operations that involve more than a single database access.

The database schema is the following:


DAO operations can return the data directly or an observable of the data, that is of type LiveData. This observable can be used so that the view is notified of any change in the data and can react accordingly, updating its contents, as is the case when a new device is added or there is new device power data.