Room Database in Android | Introduction to Room Persistence Library Hindi- CheezyCode #10

  Рет қаралды 68,996

Cheezy Code

Cheezy Code

3 жыл бұрын

Learn Room Database in Android with examples in Hindi. Learn how to store data in SQLite Database in Android using Room Persistence Library. This is part of the android architecture jetpack library. What is the need of a Room Database? What advantages does it provide over SQLite Database? Less Boilerplate and Compile-Time Verification of SQL queries provides a huge advantage over SQLite. Learn what are Entities, DAO, Database class in Android. Learn all this about Android Jetpack Components in Hindi by creating small projects.
These components help in writing clean code and help in following clean architecture in android. Learn all this about Android in Hindi by creating small projects. Everything is explained in Hindi (हिंदी में )
Topics Covered -
1. What is Room Database in Android?
2. Need of Room Library and benefits of using Room Library over SQLite
3. What is Entity? @Entity
4. What is Data Access Object or DAO? @Insert, @Update, @Delete, @Query Annotations
5. How to define a database using RoomDatabase Class? @Database Annotation
6. Simple Example of Room Database
ViewModel Concept -
• Android ViewModel Tuto...
ViewModelFactory -
• Android ViewModel Fact...
Beginner series in Android Playlist (Hindi) -
• Android Tutorials Step...
Kotlin Beginners Tutorial Series -
• Kotlin Beginner Tutori...
For more info - visit the below link
www.cheezycode.com
We are social. Follow us at -
Facebook - / cheezycode
Twitter - / cheezycode
Instagram - / cheezycode

Пікірлер: 133
@sunilkumar-zl6eo
@sunilkumar-zl6eo 3 жыл бұрын
Sir .........Great work......Your teaching will make the lot of guys career......respect from heart...
@CheezyCode
@CheezyCode 3 жыл бұрын
Thank you for your love brother. Cheers
@rishabjain2634
@rishabjain2634 Жыл бұрын
@@CheezyCode sirjii wo do bar kaise hova entry oncreate tho 1 hi bar call hogna when app opens??
@rishabjain2634
@rishabjain2634 Жыл бұрын
@@CheezyCode sirijii when we open our app as manytimes as we want to should get only the entries in the table once how to implement it
@chetanmittal660
@chetanmittal660 Жыл бұрын
amazing explanation sir, maine bhot logo ki video dekhi, yaha tk ki 1-1 ghnte vali bhi dekhi lekin kisi ne itna exact aur accha ni smjhaya jitna aapne smjhaya. Dil se shukriya
@theuntoldtree
@theuntoldtree 2 жыл бұрын
other tutorials:- here is theory explanation || here is code . cheezy code:- here is theory explanation && here is code + ye language bhi seekh lo vo language bhi seekh lo. thanks again sir.
@CheezyCode
@CheezyCode 2 жыл бұрын
Thank you 👍
@uavishal777
@uavishal777 Жыл бұрын
What an explanation Sir.....Till Now only I used to see code and type but after your explanation, I am knowing every concept line by line...Please upload more concept if you can sir...
@amanpahari690
@amanpahari690 9 ай бұрын
thnks for explaining it with such simplicity
@jabidkhan6085
@jabidkhan6085 8 ай бұрын
Good explain really your all videos very nice
@chandansuthar6447
@chandansuthar6447 2 жыл бұрын
Very Simple Explanation
@Subratsss
@Subratsss 2 ай бұрын
Your teaching style is very very impressive
@raokarampal
@raokarampal 3 жыл бұрын
Thankyou for video aapka din subh ho🙏😊
@CheezyCode
@CheezyCode 3 жыл бұрын
Haha....thanks bro for supporting
@sat_talk
@sat_talk 3 жыл бұрын
Thanks, bro for the Awesome Video..
@CheezyCode
@CheezyCode 3 жыл бұрын
Thank you brother 🤘. Please support us by sharing these videos if possible
@appshub6024
@appshub6024 3 жыл бұрын
tutorial smooth as cheez..
@CheezyCode
@CheezyCode 3 жыл бұрын
haha...cheers bro ✌️
@user-iw1sx7ue8u
@user-iw1sx7ue8u Жыл бұрын
great content
@GHOST-mg7uu
@GHOST-mg7uu 3 жыл бұрын
thank you so much!
@shrikanttiwari6682
@shrikanttiwari6682 2 жыл бұрын
Nice explanation. Kotlin coroutine is interesting topic. Request to make a separate video on coroutine as well to clear visibility for the same.
@CheezyCode
@CheezyCode 2 жыл бұрын
As soon as possible
@champion5946
@champion5946 Жыл бұрын
Thanks
@vishaltorgal3372
@vishaltorgal3372 7 ай бұрын
Nice
@moeed1584
@moeed1584 3 жыл бұрын
very well explained sir, requesting you to please cover more topics.
@CheezyCode
@CheezyCode 3 жыл бұрын
Yes bro in progress
@moeed1584
@moeed1584 3 жыл бұрын
​@@CheezyCode getting error "Kotlin version that is used for building with Gradle (1.3.72) differs from the one bundled into the IDE plugin (1.4.21) "" sir please tell ext.kotlin_version Thanks in advance
@CheezyCode
@CheezyCode 3 жыл бұрын
Just google it....you need to update Kotlin version
@chndraja
@chndraja 2 жыл бұрын
Awesome Sir, thoroughly enjoyed Android Architecture Components playlist. Do you have any videos on Multi Module Project ?? If not please make one.
@CheezyCode
@CheezyCode 2 жыл бұрын
Not on multi module - Dagger is in progress then HILT
@Ab-no6rz
@Ab-no6rz 3 жыл бұрын
Best teacher
@CheezyCode
@CheezyCode 3 жыл бұрын
Thank you 🤘
@nehamandhare2480
@nehamandhare2480 3 жыл бұрын
Super explained
@CheezyCode
@CheezyCode 3 жыл бұрын
Thank you 🤘
@arpitkhandelwal2999
@arpitkhandelwal2999 3 жыл бұрын
Good going But a small request to u please make a separate video on coroutine including evething about that it really helps to clear the basis of coroutine and how it works ....
@CheezyCode
@CheezyCode 3 жыл бұрын
Sure brother...it will be covered in this series
@arpitkhandelwal2999
@arpitkhandelwal2999 3 жыл бұрын
@@CheezyCode THANKS for your efforts ❤️
@TarunAttri
@TarunAttri 2 жыл бұрын
Bro, you rock.
@CheezyCode
@CheezyCode 2 жыл бұрын
Thanks Tarun
@nimeshluhana4796
@nimeshluhana4796 2 жыл бұрын
Hey Good Explanation You have mentioned that the getContact function will be called in the background thread. Now, can this also be made a suspend function, so that we can use the advantages of a coroutine rather than running this on a thread only?
@nehasahoo2638
@nehasahoo2638 2 жыл бұрын
We can do that, but since we made its return type a livedata(which anyway runs on background thread) the suspend keyword is skipped for that function
@sjaffri6939
@sjaffri6939 Жыл бұрын
SUperb *****
@AkashJhaDDN
@AkashJhaDDN 3 жыл бұрын
Thanks sir
@CheezyCode
@CheezyCode 3 жыл бұрын
Thank you Akash for always supporting. Cheers 🤘
@Sikarwar0020
@Sikarwar0020 3 жыл бұрын
First Comment.. 🔥🔥
@CheezyCode
@CheezyCode 3 жыл бұрын
Thank you Vipin for your constant support. Cheers 🤘
@rishabjain2634
@rishabjain2634 Жыл бұрын
​ @Cheezy Code sirjii wo getcontact() wale function mai...Kisne Flow use kiya hai aur apne LiveData konsa use karna hai?
@CheezyCode
@CheezyCode Жыл бұрын
Flow use kar skte ho....Livedata bhi use kar skte ho...dono aane chaiye...
@binodbhandari7543
@binodbhandari7543 3 жыл бұрын
Super
@CheezyCode
@CheezyCode 3 жыл бұрын
Thank you 🤘
@InnovativeChangazi
@InnovativeChangazi 2 жыл бұрын
Can you explain why you have used coroutines-core along with coroutines android? In the documentation for android for coroutines only a single library implementation is used and that is the android implementation.
@CheezyCode
@CheezyCode 2 жыл бұрын
Safer side....
@yunhi1853
@yunhi1853 Жыл бұрын
sir new errror pls suggest solution > 'compileDebugJavaWithJavac' task (current target is 1.8) and 'kaptGenerateStubsDebugKotlin' task (current target is 17) jvm target compatibility should be set to the same Java version.
@nihal999in
@nihal999in 2 жыл бұрын
Awesome Sir, Please ek video aap Dagger Hilt pe aap banaiye.. bahut easy ho jayega samjhnaa .. please 🙏🙏🙏
@CheezyCode
@CheezyCode 2 жыл бұрын
new series on Dagger 2 is live.
@nihal999in
@nihal999in 2 жыл бұрын
@@CheezyCode please share link and try to make a series on dagger hilt. Your teaching way is awesome. ❤️❤️👍🙏
@ahsansyed4146
@ahsansyed4146 3 жыл бұрын
Good Work Buddy, DAO m ArrayList support nai krta room ? LiveData ?
@suhebrafique7341
@suhebrafique7341 Жыл бұрын
How to store custom object arraylist in room database, can you please add one video on it
@CheezyCode
@CheezyCode Жыл бұрын
just convert that into json and store it in DB
@suhebrafique7341
@suhebrafique7341 Жыл бұрын
@@CheezyCode ok, thank you for the reply. Also i want to know can we store a complete arraylist at a time in room?
@CheezyCode
@CheezyCode Жыл бұрын
Yes.. 2 options- - Save method mei list of object accept karlo - arraylist as a unit store karana hai toh as a string save karlo by converting it into json
@CheezyCode
@CheezyCode Жыл бұрын
@Insert suspend fun addNote(notes: List) For instance - this method will store the list of notes in the db in one go
@AP-pm9cp
@AP-pm9cp 2 жыл бұрын
Android made easy ::CheeY Code
@CheezyCode
@CheezyCode 2 жыл бұрын
Thanks AP
@tanishqsingh4
@tanishqsingh4 Жыл бұрын
Hi Can you make video on prepopulate database with upgrade version
@ayushpandey538
@ayushpandey538 2 жыл бұрын
Sir can we insert whole ArrayList() at once or we need to insert each element one by one?
@CheezyCode
@CheezyCode 2 жыл бұрын
Whole list can be inserted...room with mvvm wala example refer kar skte ho
@ayushpandey538
@ayushpandey538 2 жыл бұрын
@@CheezyCode thanks sir
@akankshatripathi3222
@akankshatripathi3222 10 ай бұрын
sir the kotlin plugin does not support as well as annotation processor there is an error in kapt in my case
@singhpraveen5460
@singhpraveen5460 2 жыл бұрын
Sir please bring course on Android Development
@CheezyCode
@CheezyCode 2 жыл бұрын
koshish poori hai bro...
@TechnicalAkshay
@TechnicalAkshay 2 ай бұрын
Why google choose to make Room Database as annotation instead of using inheritance in for using room database functionality
@IntegersTechnology
@IntegersTechnology 3 ай бұрын
SIR please provide a complete tutorial about Room Database
@jayeshpobari395
@jayeshpobari395 3 жыл бұрын
new hu to pahle sqlite sikhna chahiye ya diect room database ?
@CheezyCode
@CheezyCode 3 жыл бұрын
Direct Room
@harshad_waghmare
@harshad_waghmare 2 ай бұрын
Sir how to fetch roomdata into lazyColumn? i searched it ,there are complicated ways shown beyond understanding..please make a video on it through viewmodel,repository etc
@sahinmunshi6441
@sahinmunshi6441 Жыл бұрын
Sir please make a tutorial on SearchView with suggestions
@sandhyaverma5751
@sandhyaverma5751 3 жыл бұрын
Sir dagger pr Bhi 1 video banadijiye. Pls
@CheezyCode
@CheezyCode 3 жыл бұрын
For sure....
@GamLopStudio
@GamLopStudio 3 жыл бұрын
Can Realm better then SQLite for CRUD system ?
@CheezyCode
@CheezyCode 3 жыл бұрын
Depends on the scenario. This debate is same as SQL vs NoSql. Totally depends on your scenario
@mohit1483
@mohit1483 3 жыл бұрын
Should a newbie in android development learn jetpack or stick to java ,xml ..?
@CheezyCode
@CheezyCode 3 жыл бұрын
Newbie - 1. KOTLIN 2. ANDROID WITH KOTLIN - BASICS 3. JETPACK COMPONENTS 4. ADVANCED CONCEPTS
@mohit1483
@mohit1483 3 жыл бұрын
@@CheezyCode thank you ....is java /xml still valid because I started with it and becoming comfortable
@CheezyCode
@CheezyCode 3 жыл бұрын
It is valid and will be there for long.
@mohit1483
@mohit1483 3 жыл бұрын
@@CheezyCode 😁keep the good work on...!thank you
@pritamdas2232
@pritamdas2232 2 жыл бұрын
after every insert delete and update operation my recyclerview automatically scroll to top .. ..plz tell how to prevent this....
@TheAbhidugar
@TheAbhidugar 3 жыл бұрын
Bhaiya do I need to learn SQL to learn Room database? I have no knowledge of any database system. Newbie Here. Please reply.
@CheezyCode
@CheezyCode 3 жыл бұрын
Han thoda idea Toh chaiye rdbms visualize karne ke liye - Jahan pe multiple tables involve honge waha thoda gyaan chaiye - baaki agar related tables nahi h Toh issue nahi hoga... But Sql is recommended for every developer.
@saeedsharif2463
@saeedsharif2463 Жыл бұрын
sir please make vadoe on concureent acces
@samarthvarshney512
@samarthvarshney512 Жыл бұрын
if you face an error in contactDao just upgrade do a minor change in gradel , change the def room_version = "2.4.3" and the error will go
@roh9934
@roh9934 3 жыл бұрын
Bro, the data get inserted again after OnCreate again. Suppose I have to put data only once. No matter how many times I run the app, how to do that?
@CheezyCode
@CheezyCode 3 жыл бұрын
Shared pref
@mohammadtaqi4051
@mohammadtaqi4051 2 жыл бұрын
Why did you pass "applicationContext"... What if we pass only "this"... Does this have any effect? (I know applicationContext ties with application lifecycle and"this" ties with activity lifecycle) if i am not wrong
@CheezyCode
@CheezyCode 2 жыл бұрын
Activity rotated activity died. Storing activity context holds the object, so memory leak
@mohammadtaqi4051
@mohammadtaqi4051 2 жыл бұрын
@@CheezyCode Thx... Bt can you elaborate little bit more...
@sulmanrasheed007
@sulmanrasheed007 3 жыл бұрын
Sir Android Navigation Component b kara de Java mai... Thanks
@CheezyCode
@CheezyCode 3 жыл бұрын
Bro Android is Kotlin only. Navigation component will be covered but that will be in Kotlin - no more Java in Android world
@sulmanrasheed007
@sulmanrasheed007 3 жыл бұрын
@@CheezyCode Ok
@Sikarwar0020
@Sikarwar0020 3 жыл бұрын
@@sulmanrasheed007 switch to Kotlin... Asli maza to Kotlin me hai.. sab kuch easy hai aur Features bhi hai Kotlin me as compared to java
@yunhi1853
@yunhi1853 Жыл бұрын
cannot find implementation for com.example.aawe.ContactDatabase. cuasing error where we declared abstract fun in database
@CheezyCode
@CheezyCode Жыл бұрын
Check the dependencies are there
@yunhi1853
@yunhi1853 Жыл бұрын
@@CheezyCode thanks error resolved
@technicalwizard2200
@technicalwizard2200 2 жыл бұрын
Can we store the pdf document in room database?
@CheezyCode
@CheezyCode 2 жыл бұрын
We can store but what's the need. Keep the file as is and store it's name
@arbazabdullah5431
@arbazabdullah5431 3 ай бұрын
Pre populate room database
@Dharmendrakumar-tl8vp
@Dharmendrakumar-tl8vp 2 жыл бұрын
I am using Room database with coroutines but I am unable to compile the code and i am getting following error "error: Type of the parameter must be a class annotated with @Entity or a collection/array of it. kotlin.coroutines.Continuation
@sommayghosh4617
@sommayghosh4617 2 жыл бұрын
Suspend keyword hata kar run kro
@Dharmendrakumar-tl8vp
@Dharmendrakumar-tl8vp 2 жыл бұрын
@@sommayghosh4617 Thanks bro it worked
@CheezyCode
@CheezyCode 2 жыл бұрын
Well done 👍
@simransingla9397
@simransingla9397 2 жыл бұрын
I have an error on databasebuilder plz help me
@CheezyCode
@CheezyCode 2 жыл бұрын
What's the error?
@simransingla9397
@simransingla9397 2 жыл бұрын
@@CheezyCode not enough information to infer type variable T : this is showing to me while i move cursor to database builder and has error(Unresolved reference java) on java(ContactDatabase::class.java)also
@tamimkhan1428
@tamimkhan1428 3 жыл бұрын
please sir,Give us Rx java tutorial. advance thanks
@leetcodebaby6680
@leetcodebaby6680 Жыл бұрын
Bhai function kyu abstract hoga? class kyu abstract hoga? Ye sab nahi btana hota? Ratta mar rkha hai bas vo yaha aake pel diya sab.
@CheezyCode
@CheezyCode Жыл бұрын
😂
@CheezyCode
@CheezyCode Жыл бұрын
Ratta marlo naukri chaiye toh...waise answer jaan na hai toh Google will help...aur shayad shi se puch lete toh yahin bta dete
@hamzajaved7746
@hamzajaved7746 3 жыл бұрын
Share GitHub link please
@CheezyCode
@CheezyCode 3 жыл бұрын
Will do
@hamzajaved7746
@hamzajaved7746 3 жыл бұрын
@@CheezyCode Thanks Ma wait kr rha hun ap k links ka ap tutorials achy hain bus ap source code bhe provide kr dya krain
@mubaraknative
@mubaraknative Жыл бұрын
Entities and POJOs must have a usable public constructor. You can have an empty constructor or a constructor whose parameters match the fields (by name and type). kotlin.unit error
@ramashishkumar6416
@ramashishkumar6416 2 жыл бұрын
dataBase = Room.databaseBuilder( applicationContext, ContactDatabase::class.java, "contactDB" ).build() after adding getting error-- java.lang.RuntimeException: cannot find implementation for com.example.roomdatabaseapplication_fromcheezycode.ContactDatabase. ContactDatabase_Impl does not exist
@aqibriaz5664
@aqibriaz5664 10 ай бұрын
have you solved this issue?
@nachiketekare4178
@nachiketekare4178 7 ай бұрын
Have you solved this issue
@ramashishkumar6416
@ramashishkumar6416 7 ай бұрын
@@aqibriaz5664 yes
@ramashishkumar6416
@ramashishkumar6416 7 ай бұрын
yes
@ramashishkumar6416
@ramashishkumar6416 6 ай бұрын
@@aqibriaz5664 yes
@RahulPahuja1991
@RahulPahuja1991 Жыл бұрын
Room has error error: There is a problem with the query: [SQLITE_ERROR] SQL error or missing database (no such table: contacts) public abstract androidx.lifecycle.LiveData getAllContact();
@CheezyCode
@CheezyCode Жыл бұрын
Check the entities annotation on database
@RahulPahuja1991
@RahulPahuja1991 Жыл бұрын
@@CheezyCode yes you are right, the entity name was incorrect
Alat Seru Penolong untuk Mimpi Indah Bayi!
00:31
Let's GLOW! Indonesian
Рет қаралды 16 МЛН
ОСКАР vs БАДАБУМЧИК БОЙ!  УВЕЗЛИ на СКОРОЙ!
13:45
Бадабумчик
Рет қаралды 4,8 МЛН
Became invisible for one day!  #funny #wednesday #memes
00:25
Watch Me
Рет қаралды 55 МЛН
KINDNESS ALWAYS COME BACK
00:59
dednahype
Рет қаралды 137 МЛН
Room Database 🛢 in Android  | Android Tutorial | 2024
19:34
Room Database Integration in MVVM in Hindi #5
14:58
Neat Roots
Рет қаралды 3 М.
ROOM Database in Android Studio using Kotlin | Android Knowledge
11:04
Android Knowledge
Рет қаралды 3,9 М.
Alat Seru Penolong untuk Mimpi Indah Bayi!
00:31
Let's GLOW! Indonesian
Рет қаралды 16 МЛН