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

แชร์
ฝัง
  • เผยแพร่เมื่อ 11 เม.ย. 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

ความคิดเห็น • 114

  • @cyndicorinne
    @cyndicorinne ปีที่แล้ว +49

    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 ปีที่แล้ว +37

    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 ปีที่แล้ว +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!

    • @Socratica
      @Socratica  ปีที่แล้ว +3

      SYNCHRONICITY!! 💜🦉

  • @djl3009
    @djl3009 ปีที่แล้ว +24

    {
    "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"
    }
    }

    • @felsrage
      @felsrage 3 หลายเดือนก่อน

      "timestamps.json"

    • @ImHansana123
      @ImHansana123 หลายเดือนก่อน

      pinTheComment()

    • @ImHansana123
      @ImHansana123 หลายเดือนก่อน

      pinTheComment()

  • @thatotherguy4245
    @thatotherguy4245 ปีที่แล้ว +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 ปีที่แล้ว +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

  • @Socratica
    @Socratica  ปีที่แล้ว +8

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

  • @FlyingTurtleLP
    @FlyingTurtleLP ปีที่แล้ว +10

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

  • @alvarocafe
    @alvarocafe ปีที่แล้ว +3

    This channel just keeps getting better! Cheers!

  • @df6148
    @df6148 ปีที่แล้ว +16

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

    • @murphygreen8484
      @murphygreen8484 ปีที่แล้ว +1

      Have you tried duckdb?

    • @df6148
      @df6148 ปีที่แล้ว +1

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

  • @kiiandrii
    @kiiandrii ปีที่แล้ว +12

    these videos are always so clear and funny.

    • @abyss2200
      @abyss2200 ปีที่แล้ว

      Yes lol exactly

    • @Poerak
      @Poerak 6 หลายเดือนก่อน

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

  • @metinunlu_
    @metinunlu_ 11 หลายเดือนก่อน +1

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

  • @paulw3182
    @paulw3182 ปีที่แล้ว +1

    This is wonderful, the comedic take is sublime.

  • @jordang6142
    @jordang6142 5 หลายเดือนก่อน

    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 😂

  • @Dettol68
    @Dettol68 6 หลายเดือนก่อน

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

  • @neurite001
    @neurite001 ปีที่แล้ว +1

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

  • @kingofcastlechaos
    @kingofcastlechaos 11 หลายเดือนก่อน

    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!

  • @pochta1000
    @pochta1000 ปีที่แล้ว

    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 !

  • @mhamd2020
    @mhamd2020 7 หลายเดือนก่อน

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

  • @cryptolikeaboss
    @cryptolikeaboss ปีที่แล้ว +1

    The Snap at the end... LOL🤣

    • @cryptolikeaboss
      @cryptolikeaboss 4 หลายเดือนก่อน

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

  • @MrPioneer7
    @MrPioneer7 ปีที่แล้ว

    Welcome back Socratica. Please continue posting videos.

  • @baasantserenganbold2925
    @baasantserenganbold2925 ปีที่แล้ว

    Wow, thank you. I love your tutotials.

  • @rhysdavies9376
    @rhysdavies9376 3 หลายเดือนก่อน

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

  • @manjubeli
    @manjubeli 8 หลายเดือนก่อน

    This is pure gold! loved the humor

  • @ahmadnurokhim4168
    @ahmadnurokhim4168 9 หลายเดือนก่อน

    i love how you explain these things

  • @absmustang
    @absmustang ปีที่แล้ว

    Another fine video full of memorable info. Thanks!

  • @sabuein
    @sabuein ปีที่แล้ว

    Thank you, and welcome back :)

  • @JorgeEscobarMX
    @JorgeEscobarMX ปีที่แล้ว +1

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

    • @Socratica
      @Socratica  ปีที่แล้ว +1

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

  • @graytonw5238
    @graytonw5238 ปีที่แล้ว

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

  • @bckzilla
    @bckzilla ปีที่แล้ว

    Sensational. Thanks.

  • @jamesT008
    @jamesT008 ปีที่แล้ว

    As always good explained😊

  • @ozzman530
    @ozzman530 ปีที่แล้ว +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 10 หลายเดือนก่อน

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

    • @ozzman530
      @ozzman530 10 หลายเดือนก่อน

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

  • @astroweeb
    @astroweeb หลายเดือนก่อน

    Great Video!

  • @pile333
    @pile333 ปีที่แล้ว +1

    Well done!

  • @user-bb5rs8rv4u
    @user-bb5rs8rv4u 3 หลายเดือนก่อน

    Great stuff

  • @budddmj8191
    @budddmj8191 ปีที่แล้ว +1

    You are back!

  • @faisalfftamil7814
    @faisalfftamil7814 ปีที่แล้ว +2

    Wonderful💙

  • @kunalsoni7681
    @kunalsoni7681 10 หลายเดือนก่อน

    Very Interesting Video ⭐⭐⭐⭐⭐😊

  • @aliwaseem5990
    @aliwaseem5990 ปีที่แล้ว +1

    BIG like for your BIG video.

  • @Allen-by6ci
    @Allen-by6ci ปีที่แล้ว +6

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

    • @Socratica
      @Socratica  ปีที่แล้ว +1

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

  • @travelvideos
    @travelvideos ปีที่แล้ว

    Welcome back!

  • @Shubh22
    @Shubh22 ปีที่แล้ว

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

  • @oguching
    @oguching ปีที่แล้ว

    She's back.

  • @murphygreen8484
    @murphygreen8484 ปีที่แล้ว +1

    Can you close the connection with a context manager?

  • @eder8170
    @eder8170 ปีที่แล้ว

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

  • @claudiatrujillociafre3865
    @claudiatrujillociafre3865 16 วันที่ผ่านมา

    Thank youuuuuu

  • @arunsp767
    @arunsp767 ปีที่แล้ว

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

  • @abyss2200
    @abyss2200 ปีที่แล้ว +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 😅

  • @farhadpza
    @farhadpza ปีที่แล้ว +1

    Thanks, please talk about mongodb and python too

  • @FilterYT
    @FilterYT ปีที่แล้ว

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

  • @oida10000
    @oida10000 ปีที่แล้ว +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 ปีที่แล้ว

      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)

  • @onyilimba
    @onyilimba 8 หลายเดือนก่อน

    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  8 หลายเดือนก่อน +1

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

  • @rrsrjspa
    @rrsrjspa ปีที่แล้ว

    I Love your videos

  • @Bruno-rm9er
    @Bruno-rm9er 8 หลายเดือนก่อน

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

    • @Socratica
      @Socratica  8 หลายเดือนก่อน +1

      Weird and Understandable is us exactly thank youuuu 💜🦉

  • @JorgeEscobarMX
    @JorgeEscobarMX ปีที่แล้ว

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

  • @zarakikenpachi011
    @zarakikenpachi011 ปีที่แล้ว

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

  • @krzysztoflechowski5745
    @krzysztoflechowski5745 ปีที่แล้ว

    Thanks!

  • @happyspaceinvader508
    @happyspaceinvader508 ปีที่แล้ว

    It would be awesome if Socratica did NodeJS and Golang.

  • @MrEarbuckets
    @MrEarbuckets ปีที่แล้ว

    JS is respectable....FINALLY! Wheeee!

  • @benjamindover4337
    @benjamindover4337 ปีที่แล้ว

    Now you're speaking my language.

  • @murphygreen8484
    @murphygreen8484 4 หลายเดือนก่อน

    Refresh with a video on DuckDB?

  • @anterprites
    @anterprites ปีที่แล้ว +1

    6:09 Flashbang harder than Filian

  • @Tubemanjac
    @Tubemanjac 8 หลายเดือนก่อน

    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 7 หลายเดือนก่อน

      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.

  • @yash1152
    @yash1152 ปีที่แล้ว

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

  • @zoltanposfai3451
    @zoltanposfai3451 ปีที่แล้ว

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

  • @furqanehsan8338
    @furqanehsan8338 ปีที่แล้ว

    Love from Pakistan ❤

  • @cmugy
    @cmugy ปีที่แล้ว

    ❤❤

  • @hammer86_
    @hammer86_ ปีที่แล้ว

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

  • @arulananthams2540
    @arulananthams2540 ปีที่แล้ว

    We need how to use chatgpt in terminal

  • @TECHNOCANNON
    @TECHNOCANNON 28 วันที่ผ่านมา

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

  • @TheRealPyCodeSniffer
    @TheRealPyCodeSniffer ปีที่แล้ว

    how are you making this voice?

  • @xornand6833
    @xornand6833 ปีที่แล้ว

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

  • @kevon217
    @kevon217 ปีที่แล้ว

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

  • @forgottenvy
    @forgottenvy ปีที่แล้ว +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

    • @thatotherguy4245
      @thatotherguy4245 ปีที่แล้ว +3

      It's AI...you can see the pixels

    • @emman100
      @emman100 ปีที่แล้ว +1

      @@thatotherguy4245 🤣🤣🤣

  • @amateurwizard
    @amateurwizard ปีที่แล้ว +1

    Everywhere I go I overload SQLite Databases 😢

  • @orionNsirius
    @orionNsirius 2 หลายเดือนก่อน

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

  • @BijouBakson
    @BijouBakson 8 หลายเดือนก่อน

    A robot? :)

  • @dixztube
    @dixztube ปีที่แล้ว

    whoa js is respectable now!? how about that!

  • @thatomofolo452
    @thatomofolo452 ปีที่แล้ว +1

    Fr Fr Fr 🎯🎯🎯💯

  • @Alchemist10241
    @Alchemist10241 8 หลายเดือนก่อน

    everything is big now 🤣

  • @ArsParfenov
    @ArsParfenov ปีที่แล้ว

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

  • @faisalali5025
    @faisalali5025 2 หลายเดือนก่อน

    Whopping zero bytes🤣

  • @TheSpacecraftX
    @TheSpacecraftX ปีที่แล้ว +6

    Implying Java is not a respectable programming language haha.

    • @el_witcher
      @el_witcher 4 หลายเดือนก่อน

      Not even C++ got a taste of respect haha

    • @justintodd5145
      @justintodd5145 หลายเดือนก่อน

      Java is a great language.

    • @WoWUndad
      @WoWUndad 28 วันที่ผ่านมา

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

  • @andromilk2634
    @andromilk2634 หลายเดือนก่อน

    Why is this video talking like a robot?

  • @xucaen
    @xucaen ปีที่แล้ว

    I wish you wouldn't use ChatGPT.

    • @stultuses
      @stultuses ปีที่แล้ว +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  ปีที่แล้ว +1

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

  • @MehediHasan-sz5xf
    @MehediHasan-sz5xf 10 หลายเดือนก่อน +1

    ridiculous

  • @GrypV
    @GrypV ปีที่แล้ว

    Thanks!

    • @Socratica
      @Socratica  ปีที่แล้ว

      Thank you for your kind support!!