Android Room Database Operations, Insert Update Delete || Android Studio Tutorial

Опубликовано: 09 Май 2020
на канале: larn tech
9,836
74

#larntech #roomdatabase #viewmodel #mvvm #update #delete

Android Room Database Operations, Insert Update Delete || Android Studio Tutorial

For additional help/customization and tasks reach me via.
https://www.fiverr.com/share/ADdzzR

In this tutorial, we shall learn room database operations, Insert Update Delete, and Query.

This is part two of my previous tutorials on Room Database, ViewModel, LiveData, RecyclerView (MVVM) || Android Architecture Component

Be sure to check it here so that you can understand this one better.
   • Room Database , ViewModel , LiveData, Recy...  

Room Database being an architectural component that allows fluent database access in mobile applications.


Major Components in Room Database:
1. Database:
This is the main access point for the underlying connection to your app’s persistent relational data.
Usually annotated with @Database.
An abstract class that extends RoomDatabase.
It contains an abstract class that has no arguments which returns class annotated with @Dao.
It contains a list of entities.
2. Entity:
Represents tables in the database.
3. Dao:
It contains methods used to access the database.

Step we have followed in this tutorial to Insert Update and Delete Items in room database.
1. Creating a menu item (delete and update)
2. Adding image view which when clicked inflate the menu item
3. Adding a click listener to delete and update
4. Including @delete and @update in @Dao methods.
5. Updating the repository and view model with delete and update method.
6. Performing delete and update when a menu item is clicked.

Thanks for watching if you are not subscribed. Kindly subscribe for more tutorials.
Subscribe link: https://www.youtube.com/c/larntech20?...

For additional help, feel free to comment below.


На этой странице сайта вы можете посмотреть видео онлайн Android Room Database Operations, Insert Update Delete || Android Studio Tutorial длительностью часов минут секунд в хорошем качестве, которое загрузил пользователь larn tech 09 Май 2020, поделитесь ссылкой с друзьями и знакомыми, на youtube это видео уже посмотрели 9,836 раз и оно понравилось 74 зрителям. Приятного просмотра!