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

Pubblicato il: 09 maggio 2020
sul canale di: 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.


In questa pagina del sito puoi guardare il video online Android Room Database Operations, Insert Update Delete || Android Studio Tutorial della durata di ore minuti seconda in buona qualità , che l'utente ha caricato larn tech 09 maggio 2020, condividi il link con amici e conoscenti, su youtube questo video è già stato visto 9,836 volte e gli è piaciuto 74 spettatori. Buona visione!