Hello Friends,
Welcome to my channel "Android Pro"
In this video series, I am going to show you how to implement Room database in your project.
Room has major three components.
1. Entity
2. Dao
3. Database
Let's see Dao and implement it -
Dao stands for Data Access Object. This is the main class where database interaction query is written.
This class annotated with @Dao. All queries written in class verified at compile time.
There are some direct annotation for SQL query like:-
i. @Insert -- To insert data into database
ii. @Delete -- To delete data from database
iii. @Update -- To update the data in database
iv. @Query - To write custom SQL query (E.g: @Query("Select * from Todo") )
Application Name:- TodoApp
Steps to follow:-
a. Create a new Android Project and give name as TodoApp
b. Create Entity class and give name as Todo
c. Create Dao Class and named as TodoDao