SQLite Database for Android - Full Course
ฝัง
- เผยแพร่เมื่อ 29 ส.ค. 2024
- Learn how to use an SQLite database in Android Studio.
This tutorial shows every step of programming a demo Android application that uses an SQLlite local database. You will learn how to create an SQLite local database on the Android device, configure new tables with the onCreate method, setup the columns and data types, extend the SQLiteHelper class, create CRUD methods in a DAO (Data Access Object) class, display results on a listview, and more.
✏️ Course developed by Shad Sluiter. Check out his TH-cam channel: / shadsluiter
--
Learn to code for free and get a developer job: www.freecodeca...
Read hundreds of articles on programming: freecodecamp.o...
8:38 - Layout
18:20 - Data Model
22:02 - Button Click Listeners
32:07 - SQLite Open Helper Class
40:58 - Create New Tables with onCreate Method
58:25 - SELECT * FROM table
1:12:00 - Set Data In a ListView
1:19:37 - Delete a Record
Thanks
Thanks man 👍
Thank you very much! I was intimidated by the hour and a half of runtime
Thanks
life saver, thank you very much
44:20 "Refactor -> Extract" is now called "Refactor -> Introduce Constant"
also works with 'ctrl + alt + c'
I'm not usually one to comment on videos, but this is by far the best coding teacher I've ever seen on youtube. What I like most is that he shows you how to use the documentation as a guide for development, because no one has an encyclopedic knowledge base of code.
Yeah, hes beter than most of the cluster f@$%s out there...BUT. as good as he is, what pisses me off about his tutorials is when he forgets to go into some essential details about the documentation and how different sections of it apply to different SDK versions or API levels
because this is a university preffossor, not just a freelancer TH-camrs.
He's trainined prof.
@@mohamedmire8646 From my experience, a "trained proffessor" is rarely equal to a trained teacher in their pedagogical approach. In fact, most professors have no training at all in pedagogics and tend to just monotonously read some high level facts off of their screen without explaining the base concepts. Sometimes they don't even make and update their slides themselves. And university students are usually expected to learn those basic things in their own time or in tutoriums led by older students.
So in other words: this guy is better than most not just on YT because he has both the talent and the wish to teach. :)
so many clever people on this planet, but not so many be able to share or deliver their knowledge to others like this one, thank you, sir
Normally I spend my time rifling through 10 minute videos but this was well worth taking the time to sit down and watch in full.
Thanks so much! Very helpful!
This is amazing. I've been trying to figure out SQL databases but all other tutorials have been lackluster and confusing. This is the first one that has made sense. Thank you!!!
I've just completed my 19min and all works perfect.
I'll watch & follow along this vid repeatedly for 3 times and believe you me, I'll build my first Booking app from this course.
Lots of appreciation from Kenya...
You are a great tutor...👏👏👏👏👏👏👏👏👏
Went from nothing to everything in an incredibly comprehensive and cohesive manner. Incredible lecture even today; Thank you!
This is the best Android Studio Java tutorial I've seen yet. I'm halfway through developing my first app and I've just learned so much. Boom
9:06 Part I - Layout
18:59 Part II - Data Model
22:35 Part III - Button Click Listeners
32:36 Part IV - SQLite Open Helper Class
41:27 Part V - Create New Tables with the OnCreate Method
58:54 Part VI - Pull Data from Database (Select * From Table)
1:12:31 Part VII - Set Data in a ListView
1:20:07 Part VIII - Delete a Record
1:26:46 Challenge
This one makes more sense
I took his class when I attended GCU. He was great.
Hello, feeling lucky to found you. You are teaching so professionally like nothing is vague and the concept is also building. Please keep it up :)
Came here to learn about SQLite, and learned about a lot of cool features for refactoring and debugging in Android Studio. Great teacher and great video!
If you are reading this God bless you and have a wonderful day and stay safe ❤️🥰
Thank You 😊
im not going to give you like but thanks :)
Thank you ba HA SHAM AHAYAH same to you ba HA SHAM YASHAYAH
Same applies to You dear, the feelings are mutual, Jumma Mubarak ❤
9:08 Layout
18:51 Data Model
22:34 Button Click Listeners
32:37 SQLite Open Helper Class
41:28 Create New Tables with onCreate Method
58:44 SELECT * FROM table
@ - Set Data In a ListView
@ - Delete a Record
Very good video. Really like how you talk through your thought process when using classes that require inputs and making it clear what the current goal is.
Amazing tutorial as always. Your materials helped me tremendously with several of my university classes. Thank you a thousand times!
Great teacher and tutorial! One of the very few that don't rush things and show you exactly where you are in the code and why you are doing something. I actually laughed with voice on the context (this) part xD Even "funny" videos only make me blow air out of my nose but this was good! Thank you!
Wonderful. Best teacher I've ever seen on TH-cam.
Hey guys, first of all I would like to say that it was a very intuitive video. Thank you. Secondly, I did everything according to the video but the app crashed (probably when entering data into the database) Did anyone else experience this ?
I did everything also. All was working until I got to the point of changing the View All button to show the list instead of the Toast msg. And as a newbie, trying to figure out what went wrong is very difficult.
@@maryannadelman4438 Hey Mary, so, my problem was at the point where we insert the SQL statement into the code . I had left out a comma or something and expected the debugger to pick up on it but it wasn't so it was just crashing .Either than that it worked fine for me. Try to check and compare your code line by line to the original code.
similar problem, had to make spaces inside commas when creating new table
Thank you. This tutorial is worth our time. It provides the basic of SQLite with easy-to-follow instructions.
Excellent tutorial. It has a very good focus in Code Standards like no other videos. Good job. Thanks.
If you experience the db is not in the same path, you can use this code to get the right path to the db in the console.
String dbPath = getDatabasePath("bar_rater.db").getAbsolutePath();
System.out.println(dbPath); . Great video thx!
One of the best video on TH-cam for android sqlite database..
It would be very helpful if someone adds the timestamp🙂
26:54
You have used tools:text = "View All" (This will show the text only in Design window)
You have to use android:text = "View All" (This will show "View All" at runtime)
WOw! today only I was told in class that we would start sqlite(in python) tomorrow and this appeared I hope this would be helpful for it 🤞🤞
What a great teacher. I loved this tutorial ❤ Thanks a lot, Professor Sluiter!
Exclusive video that helped to understand where other videos failed
Good job
GOD bless
Thank you very much, your teaching skills are amazing. This is one of the best android tutorials I have ever seen.
You are a great person. I needed it and I found it! So thankful for your job!!!
Thank you for all the quality content you produce. You probably contributed more than my teachers toward obtaining my degree.
Thanks awesome tutorial, the good thing that you are showing how to use documentation added to that the clear explication
As a desktop programmer this video helps me so much to switch to android apps.
thanks very much sir please can u show us how to remove CustomerModel from list view and share search and add image as well
I am so glad that I found this video, the best teacher I found so far!
That felling when you watch this video with a cup of coffee having 23+ years of software development experience and understanding what is SQLite. Relaxed.
Commenting so I can get back to it tomorrow. ( 58:47 ) Awesome tutorial so far!
Big fan of Professor Sluiter.
android studio has it's own database inspector
Really nice tutorial format. Thank you, very clear explanations!
I think the hardest part for a newbie is the first adding. The app was crashing and i didnt get anything on the terminal. I was thinking about the emulator and the switch component is obsolate etc. I know it part of the journey but the code what he writes at 29:00 is here.
CustomerModel customerModel = new CustomerModel(-1,et_name.getText().toString(),Integer.parseInt(et_age.getText().toString()),sw_activeCustomer.isChecked());
U guys all doing a nice job here.
better and more straighforward than my uni teacher, thanks a bunch
One of the best formal way to do this task.
Thank you..
You explain everything you are doing, Excellent Professor!
Thank you Prof. Sluiter for this excellent tutorial.
My deleteOne function has a problem it keeps crashing whenever I attempt to delete something in my database though I follow all your instructions
Thank you for your time. It's great and understandable content. Much better than my lecturer 👩🏫 👨🏫 🧑🏫
Excellent tutorial. A bit incomplete w/o search and update but still extremely informative. Thank you!
What a great teacher! All understood, all worked well! Fantastic!!!
Keep up the amazing work my friend!
this guy is good at teaching people. very nice 🤗🤗
Sir can u make one video on payroll management system with database connectivity. your concent are really amazing.I want to learn more...
This tutorial is amazing andget he's really good at teaching
Mind blowing tutorial
48:50 getWritable()
51:25 insert
1:00:54 select *
best tutorial ever
thanks Sir at 16:14 for buttons you could use "Chaining"
Wow, this was a beautiful one!
Very detailed...i loved every bit of it. Thanks guys
love the way you teach sir #BestTeacherHaveEverSeen
Best Tutorial Ever !!!!!!!!!!!!!!!!!!!!!!!!!!
Great video, thank you! Can you make a video where you show how to implement the search function for the database in the app? :)
I just binge watch freecodecamp, but I learn a lot.
At 1:06:18, the professor uses a ternary operator, I would assume to demonstrate the syntax which may be unfamiliar to some people. To add a little bit of clarity on how Java types work, the == operator already returns a boolean value, so x == 1 already returns true or false, no ternary operator needed. While I'm sure the professor is aware, I'd just like to point it out for the people who are still learning Java.
True, ternary operator is not necessary here.
Thanks very much, awesome tutorial
Great teaching style. I'm a newbie and so far this has helped tremendously. However, I've followed everything exactly and it was working just fine until I got to the last section about changing the View All button to show the list instead of the Toast msg. "ArrayAdapter" is yellowed out and now the app crashes when clicking "view all". Any idea why this would be the case? I'm running Bumblebee version.
Great ! Thanks from Brazil!
now I understand a lot of fundamental things, thanks a lot, by the way: You rock!
Thank you so much for providing such cool valuable content.
thank you man it was really good
TOP CLASS TEACHER!!! Thank you Sir!
Awesome tutorial, thank you so much for this!
Love you freecodecamp
Best explanation ever.
Danke!
PLEASE...
even if I do not fill anything, it send the data, how can I do not accept if the fields are empty?
I'm Brazilian, sorry for any mistake.
Add NOT NULL after data type when creating the table
it is very important tutorial i appreciate u
Thank You
Thanks a lot Mr. Sluiter for this very usefull video. Is the code of the program available to download?
not bad. it was getting worse by the end. on 1:23:46 you say, "View view is the ListView", which is not correct, but then later you say that "parent" is ListView
so *View view* is the exact item that we click, and *AdapterView parent* is ListView
the way you implemented it so ID is incremented every time you click "add" wasn't shown too, which makes no sense for the last part
CUSTOMER_TABLE + " (" + COLUMN_ID + " INTEGER PRIMARY KEY AUTOINCREMENT.
Thank you very much. Great Video. Looking forward to watch awesome content like this.
this is a great tuto but there is a little mistake. Maybe due to video recorder.
Amazing! It was very useful! Thank you so much!
Very helpful! Thank you
amazing , but i think ViewList btn feature is useless after enhance the code at the end :)
Thank you very much for this video. It helped me a lot.
Where can I find the video about Room that he is talking about at the end ?
hi thanks due to your excellent video , but in btn_viewAll.setOnClickListener ((v) → { how to write forward Arrow symbol ?
Thanks!
26:44 he add the button text name in tools atttribute of xml it is onlty visible in the xml layout not in application
Thanks a lot!
It worked amazing
I have a quick question;
Is it a must to install XAMPP for AndroidStudio to be complete?
Thank you sir, this will be of great help to me.
Nice explanation
Thank you so much for this great video. Really told me alot of new stuff :-)
I don’t even listen to Nice tutorialm im just reading the comnts lmao
Lol I thought his head was cut off. Great tutorial though. Cheers!
Very new to android apps and databases, my question is, if I follow what you have done in the above video, and leave out the delete function, can anyone update, add to the same database or is that strictly when you add to db, it only goes to your phone? If I wanted to do a 'universal' db that anyone can add to it, what do I do? Thank you, and also, great video, easy to follow.