SQLite in Python || Python Tutorial || Learn Python Programming

Sdílet
Vložit
  • čas přidán 11. 04. 2023
  • Are you a Python programmer who loves Data? This is your lucky video! Hit play as we dive into the world of SQLite in Python. We'll cover connecting & creating databases, cursors, different ways to execute queries, the secrets of dodging SQL Injection Attacks, and more! So buckle up, grab your coding gear, and let's get this party started!
    Find our programming playlists here:
    Python: bit.ly/PythonSocratica
    SQL: bit.ly/SQL_Socratica
    Subscribe to Socratica + bell for notifications:
    bit.ly/SocraticaSubscribe
    ⧓⧓⧓⧓⧓
    We recommend:
    How to Be a Great Student
    ebook: amzn.to/2Lh3XSP
    Paperback: amzn.to/3t5jeH3
    Kindle Unlimited (read free): amzn.to/3atr8TJ
    Python Cookbook, 3rd edition
    amzn.to/3jprjX2
    ⧓⧓⧓⧓⧓
    Join this channel to get access to perks:
    / @socratica
    Support Socratica on Patreon:
    / socratica
    Python instructor: Ulka Simone Mohanty (@ulkam on Twitter)
    Written & Produced by Michael Harrison
    Edited by Megi Shuke and Michael Harrison
    #pythontutorial #sqlite #coding

Komentáře • 115

  • @cyndicorinne
    @cyndicorinne Před rokem +53

    This is a great introduction to the use of for SQLite and Python. As always, the deadpan humor is much appreciated. 💜

  • @AhmadAlMutawa_abunoor
    @AhmadAlMutawa_abunoor Před rokem +38

    I can not convey how much I am glad to see your videos coming back.
    I use SQLite extensively with C#. But I am glad to see that I can extend my usage to python as well.
    Please, please, please, make more videos like this, and with more frequency 🙏🙏

  • @KaizerKilborn
    @KaizerKilborn Před rokem +24

    I started learning SQL yesterday, and am using it in Python. This video has arrived with precise timing. Would expect nothing less from Socratica. Thank you for making this video!

  • @thatotherguy4245
    @thatotherguy4245 Před rokem +9

    This could not have come at a better time...my boss just asked me to speed up our dashboards and start managing our own data instead of relying on the technology team. Awesome video as always.

  • @darius_defiant
    @darius_defiant Před rokem +2

    I love the way this is narrated SO much. It's the perfect amount of efficient, to-the-point teaching and humour. It keeps me engaged and interesting through otherwise relatively dry subject matter

  • @djl3009
    @djl3009 Před rokem +26

    {
    "title":"SQLite in Python",
    "chapters":{
    "start" : "00:00:00",
    "What is SQLite" : "00:00:34",
    "Create DB" : "00:01:20",
    "Create Table" : "00:02:27",
    "Insert data" : "00:03:13",
    "Commit the connection" : "00:04:42",
    "Data Types" : "00:05:07",
    "execute & exececutemany" : "00:05:50",
    "executescript" : "00:06:01",
    "Cursor iteration" : "00:07:12",
    "? placeholder" : "00:07:39",
    "Summary" : "00:08:42",
    "end" : "00:10:10"
    }
    }

  • @alvarocafe
    @alvarocafe Před rokem +3

    This channel just keeps getting better! Cheers!

  • @metinunlu_
    @metinunlu_ Před rokem +1

    I don't remember enjoying a cs related education video this much, absolutely loved it! Thank you.

  • @FlyingTurtleLP
    @FlyingTurtleLP Před rokem +10

    Oh how much I love these videos :D ... Amazing style and so entertaining!

  • @Socratica
    @Socratica  Před rokem +8

    𝙎𝙩𝙖𝙮 𝙞𝙣 𝙩𝙝𝙚 𝙡𝙤𝙤𝙥 𝙄𝙉𝙁𝙄𝙉𝙄𝙏𝙀𝙇𝙔: snu.socratica.com/python
    Code samples & test data live at → github.com/socratica/python

  • @paulw3182
    @paulw3182 Před rokem +1

    This is wonderful, the comedic take is sublime.

  • @binsitt
    @binsitt Před rokem +1

    I LOVE that style, learning is a breeze here!

  • @neurite001
    @neurite001 Před rokem +1

    Appreciate you have included the topic of SQL injection in this short video.

  • @rhysdavies9376
    @rhysdavies9376 Před 5 měsíci

    I'm new to Python and SQL and this helped me overcome my first hurdle - also made me giggle too, which is very much a plus - Great stuff!!

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

    Love the video style, production and clear content, thank you!

  • @pochta1000
    @pochta1000 Před rokem

    Great, great, great to see and hear you back ! Thank you ! So cool that you have immediately involved ChatGPT (who haven't ?). Eager to see more and more of your brilliant videos !

  • @MrPioneer7
    @MrPioneer7 Před rokem

    Welcome back Socratica. Please continue posting videos.

  • @df6148
    @df6148 Před rokem +16

    I would really love a MongoDb video just like this. 🙏🏽

    • @murphygreen8484
      @murphygreen8484 Před rokem +1

      Have you tried duckdb?

    • @df6148
      @df6148 Před rokem +1

      @@murphygreen8484 I have not 😞 . Thanks for the recommendation it looks interesting. 😄

  • @JorgeEscobarMX
    @JorgeEscobarMX Před rokem +1

    Omg! ❤ it's been so long. I'm just happy to have a new SQL video on socratica

    • @Socratica
      @Socratica  Před rokem +1

      We're so tickled we had a chance to make another programming video! Working on the next script now...

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

    Welcome Back, OMG
    I watched just to enjoy your amazing hilarious presentation. :D
    Aslo, as alwase the best content ever.

  • @absmustang
    @absmustang Před rokem

    Another fine video full of memorable info. Thanks!

  • @kiiandrii
    @kiiandrii Před rokem +12

    these videos are always so clear and funny.

    • @abyss2200
      @abyss2200 Před rokem

      Yes lol exactly

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

      SQLite standing behind you: Am I a joke to you?!

  • @baasantserenganbold2925

    Wow, thank you. I love your tutotials.

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

    This is pure gold! loved the humor

  • @ozzman530
    @ozzman530 Před rokem +1

    I've been using SQLite3 for years in python to import and export Excel files. I love the versatility. It makes anything I can put into Excel, easy to handle for generating formatted colorized output in a terminal of a bastion server. Also love the fact that I still learned a couple new concepts from this video. Great job.

    • @user-yo9om1zr3l
      @user-yo9om1zr3l Před rokem

      hi there do i have to download sqlite3 to connect? i'm getting an error.

    • @ozzman530
      @ozzman530 Před rokem

      @@user-yo9om1zr3l you should be able to use sqlite in python, but if you want to interact with the program outside of python you may need to download some more materials.

  • @sabuein
    @sabuein Před rokem

    Thank you, and welcome back :)

  • @kingofcastlechaos
    @kingofcastlechaos Před rokem

    I need to write a Python script that detects I am watching your videos, and then reminds me to NOT be drinking or chewing while watching, or I may be cleaning up my desktop yet again. LOVE the humor!

  • @graytonw5238
    @graytonw5238 Před rokem

    I come to these videos for the bone-dry humor in addition to the education. Another winner!

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

    i love how you explain these things

  • @budddmj8191
    @budddmj8191 Před rokem +1

    You are back!

  • @cryptolikeaboss
    @cryptolikeaboss Před rokem +1

    The Snap at the end... LOL🤣

    • @cryptolikeaboss
      @cryptolikeaboss Před 6 měsíci

      It got me too 😅😅😅😅😅😅😅🤣

  • @bckzilla
    @bckzilla Před rokem

    Sensational. Thanks.

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

    Great Video!

  • @jamesT008
    @jamesT008 Před rokem

    As always good explained😊

  • @travelvideos
    @travelvideos Před rokem

    Welcome back!

  • @pile333
    @pile333 Před rokem +1

    Well done!

  • @walsoftai
    @walsoftai Před 5 měsíci

    Great stuff

  • @faisalfftamil7814
    @faisalfftamil7814 Před rokem +2

    Wonderful💙

  • @eder8170
    @eder8170 Před rokem

    Hey there
    It's been a while .. u are my hero

  • @Shubh22
    @Shubh22 Před rokem

    Only Socratica can make me watch a tutorial on Friday night!

  • @oguching
    @oguching Před rokem

    She's back.

  • @kunalsoni7681
    @kunalsoni7681 Před rokem

    Very Interesting Video ⭐⭐⭐⭐⭐😊

  • @aliwaseem5990
    @aliwaseem5990 Před rokem +1

    BIG like for your BIG video.

  • @abyss2200
    @abyss2200 Před rokem +1

    Ulka I'm obsessed with you and your abilities.
    I wish you come to India then 🍽️ be from my side.
    Please bring your Socratica fnds too 😅

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

    Been using your tutorial since school, now I'm a graduate in computer science. How time flies. 😅 Waiting for a new tutorial to be dropped back then.

    • @Socratica
      @Socratica  Před 9 měsíci +1

      We're so happy to be making this journey with you! 💜🦉

  • @FilterYT
    @FilterYT Před rokem

    I enjoy this character, I would watch even if I wasn't interested in the subject.

  • @jordang6142
    @jordang6142 Před 6 měsíci

    I love how she specifies "In another timeline" for the SQL intro lol. So the SQL series is another timeline in the SCU - Socratica Cinematic Universe. Very small touch but I love it 😂

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

    Thank youuuuuu

  • @murphygreen8484
    @murphygreen8484 Před rokem +1

    Can you close the connection with a context manager?

  • @JorgeEscobarMX
    @JorgeEscobarMX Před rokem

    I wonder if sqlite has constraint support. To enforce relational rules between tables

  • @farhadpza
    @farhadpza Před rokem +1

    Thanks, please talk about mongodb and python too

  • @oida10000
    @oida10000 Před rokem +2

    I would recommend using the with statement, it does the closing for you.
    Question can I do:
    with sqlite3.connect("mydb") as mycon, mycon.cursor() as curs:
    #do something
    or does it need to be
    with sqlite3.connect("mydb") as mycon:
    with mycon.cursor() as curs:
    #dosomething
    Update maybe you need to use the context liberary for that.

    • @birdie123
      @birdie123 Před rokem

      Example usage of context manager, simply use it on the connection.
      import sqlite3
      def execute_query(query, db_name, parameters= ()):
      with sqlite3.connect(db_name) as conn:
      cursor = conn.cursor()
      query_result = cursor.execute(query, parameters)
      conn.commit()
      return query_result
      if __name__ == "__main__":
      db_name = "member.db"
      query = "SELECT * FROM table"
      results = execute_query(db_name=db_name, query=query)
      for result in results:
      print(result)

  • @Allen-by6ci
    @Allen-by6ci Před rokem +6

    Hey Socratica...Please put Ulka's name in the credits... She does a fantastic job... Thanks!

    • @Socratica
      @Socratica  Před rokem +1

      Ulka's the BEST! You can find the Socratica Team credits in the Description. Thanks for your nice message. 💜🦉

  • @rrsrjspa
    @rrsrjspa Před rokem

    I Love your videos

  • @happyspaceinvader508
    @happyspaceinvader508 Před rokem

    It would be awesome if Socratica did NodeJS and Golang.

  • @krzysztoflechowski5745

    Thanks!

  • @zarakikenpachi011
    @zarakikenpachi011 Před rokem

    8:38 = cur.execute("SELECT * FROM membros WHERE fn=?", (user_input,))
    Thank you! executescript is new for me...

  • @arunsp767
    @arunsp767 Před rokem

    I'm now convinced that ChatGPT is a subconscious copy of Socratica

  • @murphygreen8484
    @murphygreen8484 Před 6 měsíci

    Refresh with a video on DuckDB?

  • @benjamindover4337
    @benjamindover4337 Před rokem

    Now you're speaking my language.

  • @Bruno-rm9er
    @Bruno-rm9er Před 10 měsíci

    That was the most weird and understandable tutorial I've seen in a while

    • @Socratica
      @Socratica  Před 10 měsíci +1

      Weird and Understandable is us exactly thank youuuu 💜🦉

  • @yash1152
    @yash1152 Před rokem

    1:32 please share how to start from a csv data?! thanks :)

  • @MrEarbuckets
    @MrEarbuckets Před rokem

    JS is respectable....FINALLY! Wheeee!

  • @anterprites
    @anterprites Před rokem +1

    6:09 Flashbang harder than Filian

  • @zoltanposfai3451
    @zoltanposfai3451 Před rokem

    You got me for a moment, but I checked. I'm alone in the room...

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

    2:04 "If you try to connect to a database file that does not exist, then one will be created for you. So if you misspell the name of an existing database, surprise - you now have a second database."
    This example shows that evolution in programming languages apparently does not imply better quality and sophistication. More than 50 years ago some languages would automatically inform you of een error which, depending on the errorcode could be processed and taken appropriate action on the fly under program control.

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

      You wrap it around "if os.path.exists(filename) " . There will always be a default action for every command. You must think of every common use case.

  • @cmugy
    @cmugy Před rokem

    ❤❤

  • @arulananthams2540
    @arulananthams2540 Před rokem

    We need how to use chatgpt in terminal

  • @TheRealPyCodeSniffer
    @TheRealPyCodeSniffer Před rokem

    how are you making this voice?

  • @furqanehsan8338
    @furqanehsan8338 Před rokem

    Love from Pakistan ❤

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

    Surprise! You now have a second database...😂😂

  • @hammer86_
    @hammer86_ Před rokem

    Fun Fact: sqlite uses flexible typing, and datatype names in column definitions are completely optional 😳

  • @xornand6833
    @xornand6833 Před rokem

    hei ! I subscribed in a Group Theory Channel what happened ?

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

    A robot? :)

  • @orionNsirius
    @orionNsirius Před 4 měsíci

    I need to overcome the anxiety that I don't have graphical interface if using sqlite

  • @kevon217
    @kevon217 Před rokem

    it’s not always the size of data that matters, but how you use it…

  • @dixztube
    @dixztube Před rokem

    whoa js is respectable now!? how about that!

  • @forgottenvy
    @forgottenvy Před rokem +3

    She's back to the channel or it's just AI generated video? Or she's been an AI all along? I don't follow this community much so I was curious

  • @amateurwizard
    @amateurwizard Před rokem +1

    Everywhere I go I overload SQLite Databases 😢

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

    everything is big now 🤣

  • @ArsParfenov
    @ArsParfenov Před rokem

    Did You really name yout son Robert'); DROP TABLE Students;-- ?

  • @thatomofolo452
    @thatomofolo452 Před rokem +1

    Fr Fr Fr 🎯🎯🎯💯

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

    Whopping zero bytes🤣

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

    Why is this video talking like a robot?

  • @TheSpacecraftX
    @TheSpacecraftX Před rokem +6

    Implying Java is not a respectable programming language haha.

    • @el_witcher
      @el_witcher Před 5 měsíci

      Not even C++ got a taste of respect haha

    • @justintodd5145
      @justintodd5145 Před 3 měsíci +1

      Java is a great language.

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

      Java has been dead for 10+ years and yes microsunsystems and their autistic kiddie language is terrible

  • @MehediHasan-sz5xf
    @MehediHasan-sz5xf Před 11 měsíci +1

    ridiculous

  • @xucaen
    @xucaen Před rokem

    I wish you wouldn't use ChatGPT.

    • @stultuses
      @stultuses Před rokem +1

      She has been teaching Python and sql well before ChatGPT ever existed
      I wish people wouldn't just think people are using ChatGPT

    • @Socratica
      @Socratica  Před rokem +1

      We definitely want to help people understand how to use this new remarkable tool. We can't ignore that it exists! 💜🦉

  • @GrypV
    @GrypV Před rokem

    Thanks!

    • @Socratica
      @Socratica  Před rokem

      Thank you for your kind support!!