Android Documentation suggests to use Room Persistence Library when dealing with SQL Lite. The purpose of this library is to avoid writing redundant and low level code when accessing information in the database.
As explained in the tutorial, it is good practice to create a Repository class when we have multiple data sources in a project. The idea is to encapsulate all data accesses with public methods in this class. This allows to abstract the interaction with the different data sources and provide a clean data API.
Android Documentation suggests to use Room Persistence Library when dealing with SQL Lite. The purpose of this library is to avoid writing redundant and low level code when accessing information in the database.
I went through this tutorial and Google's documentation.
As explained in the tutorial, it is good practice to create a Repository class when we have multiple data sources in a project. The idea is to encapsulate all data accesses with public methods in this class. This allows to abstract the interaction with the different data sources and provide a clean data API.