SQLite Database for Android - Full Course

Sdílet
Vložit
  • čas přidán 12. 10. 2020
  • 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 CZcams channel: / shadsluiter
    --
    Learn to code for free and get a developer job: www.freecodecamp.org
    Read hundreds of articles on programming: freecodecamp.org/news

Komentáře • 216

  • @brunoribeiro3376
    @brunoribeiro3376 Před 3 lety +209

    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

  • @burakcanduzcan
    @burakcanduzcan Před 3 lety +50

    44:20 "Refactor -> Extract" is now called "Refactor -> Introduce Constant"

  • @noahbastola9386
    @noahbastola9386 Před 3 lety +93

    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.

    • @rxtechandtrading
      @rxtechandtrading Před 2 lety

      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

    • @mohamedmire8646
      @mohamedmire8646 Před rokem

      because this is a university preffossor, not just a freelancer CZcamsrs.
      He's trainined prof.

    • @Kirmeins
      @Kirmeins Před rokem

      @@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. :)

  • @VikSintus
    @VikSintus Před 3 lety +11

    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

  • @ronanlarkin
    @ronanlarkin Před 2 lety +4

    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!

  • @brandonmchugh9821
    @brandonmchugh9821 Před 2 lety +4

    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!!!

  • @fwogg3r158
    @fwogg3r158 Před měsícem

    Went from nothing to everything in an incredibly comprehensive and cohesive manner. Incredible lecture even today; Thank you!

  • @attaullahshah6611
    @attaullahshah6611 Před 2 lety +5

    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 :)

  • @poogaia
    @poogaia Před rokem +1

    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

  • @albanmarku6743
    @albanmarku6743 Před 2 lety +4

    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.

  • @jothamithagu7403
    @jothamithagu7403 Před 9 měsíci

    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...👏👏👏👏👏👏👏👏👏

  • @KASalgado
    @KASalgado Před 3 lety +4

    Excellent tutorial. It has a very good focus in Code Standards like no other videos. Good job. Thanks.

  • @MrStickmanish
    @MrStickmanish Před 2 lety +4

    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!

  • @alwa6648
    @alwa6648 Před 2 lety +1

    Thank you for all the quality content you produce. You probably contributed more than my teachers toward obtaining my degree.

  • @user-sr4gg2rk9i
    @user-sr4gg2rk9i Před 2 lety +1

    Wonderful. Best teacher I've ever seen on CZcams.

  • @colt45jr
    @colt45jr Před 3 měsíci

    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!

  • @okrimtech
    @okrimtech Před rokem +2

    Amazing tutorial as always. Your materials helped me tremendously with several of my university classes. Thank you a thousand times!

  • @DagothDaddy
    @DagothDaddy Před 3 lety +9

    I took his class when I attended GCU. He was great.

  • @siomarapantarotto
    @siomarapantarotto Před rokem +1

    What a great teacher. I loved this tutorial ❤ Thanks a lot, Professor Sluiter!

  • @xvzf115
    @xvzf115 Před 3 lety +5

    Really nice tutorial format. Thank you, very clear explanations!

  • @elohimalves
    @elohimalves Před 3 lety +1

    You explain everything you are doing, Excellent Professor!

  • @taniamartinezvillagomez6448

    Thank you very much, your teaching skills are amazing. This is one of the best android tutorials I have ever seen.

  • @cryptonews-q-h4
    @cryptonews-q-h4 Před 2 lety

    One of the best video on CZcams for android sqlite database..

  • @Tim-chik
    @Tim-chik Před 2 lety +2

    You are a great person. I needed it and I found it! So thankful for your job!!!

  • @ajieewin2398
    @ajieewin2398 Před 2 lety +22

    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

  • @YuGan-lm4ce
    @YuGan-lm4ce Před rokem

    I am so glad that I found this video, the best teacher I found so far!

  • @h.r.60
    @h.r.60 Před 3 lety +3

    Keep up the amazing work my friend!

  • @aivkhairulamirin9004
    @aivkhairulamirin9004 Před 10 měsíci

    Thank you. This tutorial is worth our time. It provides the basic of SQLite with easy-to-follow instructions.

  • @williamselinder9138
    @williamselinder9138 Před 2 lety

    What a great teacher! All understood, all worked well! Fantastic!!!

  • @wkalou
    @wkalou Před 2 lety

    Exclusive video that helped to understand where other videos failed
    Good job
    GOD bless

  • @sportscity5487
    @sportscity5487 Před 2 lety

    One of the best formal way to do this task.
    Thank you..

  • @kojofosuedue3686
    @kojofosuedue3686 Před 3 lety +1

    Very detailed...i loved every bit of it. Thanks guys

  • @oniii-chan_
    @oniii-chan_ Před 3 lety +3

    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 🤞🤞

  • @deepakpitaliya8932
    @deepakpitaliya8932 Před 10 měsíci

    Thank you Prof. Sluiter for this excellent tutorial.

  • @poisonshroom64
    @poisonshroom64 Před rokem

    better and more straighforward than my uni teacher, thanks a bunch

  • @eddyjaga8899
    @eddyjaga8899 Před 2 lety +1

    Thank you for your time. It's great and understandable content. Much better than my lecturer 👩‍🏫 👨‍🏫 🧑‍🏫

  • @patriciarodrigues598
    @patriciarodrigues598 Před 3 lety +1

    Great ! Thanks from Brazil!

  • @mehdihachimi9624
    @mehdihachimi9624 Před 2 lety +1

    Awesome tutorial, thank you so much for this!

  • @thejustinfernald
    @thejustinfernald Před 3 lety +1

    Big fan of Professor Sluiter.

  • @Simomajola1
    @Simomajola1 Před 3 lety +1

    Best Tutorial Ever !!!!!!!!!!!!!!!!!!!!!!!!!!

  • @Kunal-jp8tn
    @Kunal-jp8tn Před 2 lety +1

    Thank you so much for providing such cool valuable content.

  • @zekeriemand6336
    @zekeriemand6336 Před 3 lety

    Thank you very much for this video. It helped me a lot.

  • @vancheloChanel
    @vancheloChanel Před 3 lety +1

    Very helpful! Thank you

  • @snoop3800
    @snoop3800 Před 3 měsíci

    Thanks awesome tutorial, the good thing that you are showing how to use documentation added to that the clear explication

  • @josejayant3127
    @josejayant3127 Před 3 lety +9

    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

  • @akunformalitas
    @akunformalitas Před 2 lety

    As a desktop programmer this video helps me so much to switch to android apps.

  • @theguyf8316
    @theguyf8316 Před rokem

    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!

  • @ashishthaakur45
    @ashishthaakur45 Před 3 lety +2

    Love you freecodecamp

  • @andrefiord2357
    @andrefiord2357 Před rokem

    Excellent tutorial. A bit incomplete w/o search and update but still extremely informative. Thank you!

  • @qpdbwvwdbqp4730
    @qpdbwvwdbqp4730 Před 2 lety

    Amazing! It was very useful! Thank you so much!

  • @jesusribeiro9447
    @jesusribeiro9447 Před 2 lety +1

    Commenting so I can get back to it tomorrow. ( 58:47 ) Awesome tutorial so far!

  • @crimsonblue1455
    @crimsonblue1455 Před 2 lety

    this guy is good at teaching people. very nice 🤗🤗

  • @lowblowjimboy
    @lowblowjimboy Před 2 lety

    TOP CLASS TEACHER!!! Thank you Sir!

  • @hhh48222
    @hhh48222 Před 2 lety +2

    Mind blowing tutorial

  • @benukapunchihewa4125
    @benukapunchihewa4125 Před 2 lety

    Thank you very much. Great Video. Looking forward to watch awesome content like this.

  • @lxdzii
    @lxdzii Před 8 měsíci

    Wow, this was a beautiful one!

  • @lioneldynasty
    @lioneldynasty Před rokem

    This tutorial is amazing andget he's really good at teaching

  • @bashconsole
    @bashconsole Před 3 lety

    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.

  • @returnMarcco
    @returnMarcco Před rokem

    Thanks very much, awesome tutorial

  • @bishnubhusal5999
    @bishnubhusal5999 Před rokem

    Best explanation ever.

  • @user-hu7ne5ut5g
    @user-hu7ne5ut5g Před 2 lety

    Thanks a lot!
    It worked amazing

  • @solomonjara9725
    @solomonjara9725 Před 3 lety

    it is very important tutorial i appreciate u

  • @floresjose
    @floresjose Před rokem

    now I understand a lot of fundamental things, thanks a lot, by the way: You rock!

  • @Marc1920x1080p
    @Marc1920x1080p Před 2 lety

    Thank you so much for this great video. Really told me alot of new stuff :-)

  • @HarderThanCalculus
    @HarderThanCalculus Před 2 lety

    great video, thank you so much!

  • @sleave_exe
    @sleave_exe Před 7 měsíci

    thank you man it was really good

  • @kimsing1796
    @kimsing1796 Před 3 lety +1

    I just binge watch freecodecamp, but I learn a lot.

  • @indeep6820
    @indeep6820 Před 2 lety

    thanks for tutorials

  • @anathemafps5323
    @anathemafps5323 Před 11 měsíci

    best tutorial ever

  • @yeasinarafat2667
    @yeasinarafat2667 Před 3 lety +1

    Excellent

  • @rapyd5134
    @rapyd5134 Před 3 lety

    thanks Sir at 16:14 for buttons you could use "Chaining"

  • @neerajahlawat7393
    @neerajahlawat7393 Před 2 lety

    Nice explanation

  • @dimitrigeorgoudakis3676
    @dimitrigeorgoudakis3676 Před 2 lety +1

    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 ?

    • @maryannadelman4438
      @maryannadelman4438 Před 2 lety

      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.

    • @dimitrigeorgoudakis3676
      @dimitrigeorgoudakis3676 Před 2 lety

      @@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.

    • @mirsadhadzic5076
      @mirsadhadzic5076 Před rokem

      similar problem, had to make spaces inside commas when creating new table

  • @tabassummansuri7998
    @tabassummansuri7998 Před 3 lety +1

    Sir can u make one video on payroll management system with database connectivity. your concent are really amazing.I want to learn more...

  • @tomm-_-16
    @tomm-_-16 Před 3 lety +36

    If you are reading this God bless you and have a wonderful day and stay safe ❤️🥰

    • @DevsLikeUs
      @DevsLikeUs Před 3 lety +1

      Thank You 😊

    • @danielflorez3762
      @danielflorez3762 Před 3 lety

      im not going to give you like but thanks :)

    • @alibindrayton5211
      @alibindrayton5211 Před rokem +1

      Thank you ba HA SHAM AHAYAH same to you ba HA SHAM YASHAYAH

    • @NHKCarimi
      @NHKCarimi Před 2 měsíci

      Same applies to You dear, the feelings are mutual, Jumma Mubarak ❤

  • @rahulraj94391
    @rahulraj94391 Před rokem +1

    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)

  • @utkarshrastogi8791
    @utkarshrastogi8791 Před 3 lety +2

    Thank you sir, this will be of great help to me.

  • @dibyajyotiparida7316
    @dibyajyotiparida7316 Před 3 lety +16

    It would be very helpful if someone adds the timestamp🙂

  • @parvizjonhojiev5528
    @parvizjonhojiev5528 Před 3 lety +2

    android studio has it's own database inspector

  • @hereistyagi
    @hereistyagi Před rokem

    love the way you teach sir #BestTeacherHaveEverSeen

  • @marcusgarner1146
    @marcusgarner1146 Před rokem

    Great video, thank you! Can you make a video where you show how to implement the search function for the database in the app? :)

  • @tonystark_2017
    @tonystark_2017 Před 3 lety +1

    Perfect time .

  • @aboutiti2838
    @aboutiti2838 Před 2 lety

    Thks so much 😊🙏🏼

  • @pcradwan8704
    @pcradwan8704 Před 2 lety

    Thank you sir

  • @SuperTenja
    @SuperTenja Před 2 lety

    Awesome!

  • @amirchaka1407
    @amirchaka1407 Před 2 lety +2

    thanks very much sir please can u show us how to remove CustomerModel from list view and share search and add image as well

  • @eddyjaga8899
    @eddyjaga8899 Před 2 lety

    Thanks!

  • @DevsLikeUs
    @DevsLikeUs Před 3 lety +1

    Awesome

  • @melhemhamade4210
    @melhemhamade4210 Před 3 lety

    Thank you

  • @ankitchaurasiya6105
    @ankitchaurasiya6105 Před 3 lety +1

    Great

  • @madonnalamin
    @madonnalamin Před 22 dny

    Thank You

  • @rensonplacino2737
    @rensonplacino2737 Před 3 lety +3

    My deleteOne function has a problem it keeps crashing whenever I attempt to delete something in my database though I follow all your instructions

  • @kevinnortham268
    @kevinnortham268 Před 3 lety +1

    Bing Thanks :D

  • @aislinggallagher7841
    @aislinggallagher7841 Před 3 lety

    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.

  • @michaelhung9892
    @michaelhung9892 Před rokem

    It's so good

  • @maryannadelman4438
    @maryannadelman4438 Před 2 lety +1

    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.

  • @Gerrit2686
    @Gerrit2686 Před rokem +1

    Danke!

  • @PraneshPyaraShrestha
    @PraneshPyaraShrestha Před 3 lety

    Make videos on projects of android development

  • @khaledabdessamed8612
    @khaledabdessamed8612 Před 2 lety

    WOOOW😮😍