for the existing SQLite APIs. • Room persistence library helps you manage your sql database • Part of android jetpack Architecture components • Room provides an abstraction layer over SQLite to allow fluent database access while harnessing the full power of SQLite
you write when converting sqlite queries to java objects • Automatic updates on affected queries when schema changes • Compile time verification of raw sqlite queries -if you have an error in your query it will give an exception during compile time unlike sqlite which gives during run time
the following conditions: • Be an abstract class that extends RoomDatabase. • Include the list of entities associated with the database within the annotation. • Contain an abstract method that has 0 arguments and returns the class that is annotated with @Dao.
It makes you verify your database code during compile time. • It makes your code more modular and readable as you divide your database code in three components like Entity , DAO and Database.