Room is a part of Android Jetpack and is an Object Relational Mapping (ORM) library that provides an abstraction layer over SQLite. It simplifies database management by allowing you to interact with your database using Java or Kotlin objects, rather than writing raw SQL queries.
Entity: A data class that represents a table in the database.
DAO (Data Access Object): An interface that defines database operations like insert(), update(), delete(), and query() using annotations.
Database: An abstract class that extends RoomDatabase and provides access to DAOs.
Compile-time query validation.
Easy integration with LiveData, Flow, and RxJava.
Reduces boilerplate code for database operations.
Works well with MVVM architecture.
In this video we will setup the project such that we can implement Room Database in it and also, create the Entity.
In this video we will create the DAO interface which will abstract the complexity from database to the rest of the application.
In this video we will create the abstract class which will extend to RoomDatabase in order to create an instance of our DAO for the rest of the application.
In this video we will work on our repository and setup the app for manual dependency injection.
In this video we will work on our viewmodel and write the method to save the note into the database.
In this video we will work on our viewmodel and write the method to read the data from the database.
In this video we will work on our viewmodel and write the method to update and delete the data in the database.
In this video we will work on fixing the bug and improving the user experience as well as the code base.