Python SQLite Tutorial: Complete Overview – Creating a Database, Table, and Running Queries




[ad_1]

In this Python SQLite tutorial, we will be going over a complete introduction to the sqlite3 built-in module within Python. SQLite allows us to quickly get up and running with databases, without spinning up larger databases like MySQL or Postgres. We will be creating a database, creating a table, insert, select, update, and delete data. Let’s get started…

The code from this video can be found at:
https://github.com/CoreyMSchafer/code_snippets/tree/master/Python-SQLite

✅ Support My Channel Through Patreon:
https://www.patreon.com/coreyms

✅ Become a Channel Member:
https://www.youtube.com/channel/UCCezIgC97PvUuR4_gbFUs5g/join

✅ One-Time Contribution Through PayPal:
https://goo.gl/649HFY

✅ Cryptocurrency Donations:
Bitcoin Wallet – 3MPH8oY2EAgbLVy7RBMinwcBntggi7qeG3
Ethereum Wallet – 0x151649418616068fB46C3598083817101d3bCD33
Litecoin Wallet – MPvEBY5fxGkmPQgocfJbxP6EmTo5UUXMot

✅ Corey’s Public Amazon Wishlist
http://a.co/inIyro1

✅ Equipment I Use and Books I Recommend:
https://www.amazon.com/shop/coreyschafer

▶️ You Can Find Me On:
My Website – http://coreyms.com/
My Second Channel – https://www.youtube.com/c/coreymschafer
Facebook – https://www.facebook.com/CoreyMSchafer
Twitter – https://twitter.com/CoreyMSchafer
Instagram – https://www.instagram.com/coreymschafer/

#Python

Source


[ad_2]

Comment List

  • Corey Schafer
    December 17, 2020

    I'm confused as to how can I view the DB, like is there a tool I can use to visualize the data?
    (without of course debugging via the terminal)

  • Corey Schafer
    December 17, 2020

    in get_emps_by_name func you forgot to commit() connection

  • Corey Schafer
    December 17, 2020

    Thats' awesome explanation, but how can I effectively design a database model class, if you already make video on it than plz share the link. Thanks in advance

  • Corey Schafer
    December 17, 2020

    I am studying computer science in a crazy school where they teach you a little bit of something and give you huge homeworks. You have helped me a lot with this video. Thank you so much!

  • Corey Schafer
    December 17, 2020

    This video is amazing, thank you a lot!!
    I'm a beginner, and I want to have the possibility to add, update and remove on the browser with my web, any idea of how to implement this on the front-end?

  • Corey Schafer
    December 17, 2020

    Hi Corey, Can you please show us how we can change a sqlite database to Postgresql for the flask app you created?

  • Corey Schafer
    December 17, 2020

    Corey, where can I find the video you talked at the end, about SQLite working with SQLAlchemy?,
    thank You!!!!!

  • Corey Schafer
    December 17, 2020

    About line 20, why is not necessary to use "with conn" in the function get_emps_by_name? Is a context manager needed only when you need to modify something?

  • Corey Schafer
    December 17, 2020

    not working for me for some reason 🙁

  • Corey Schafer
    December 17, 2020

    22:00 – you can also do """CREATE TABLE IF NOT EXISTS"""

  • Corey Schafer
    December 17, 2020

    You teach so many things in only 29 minutes, so clear. Voice, image, sound, simplicity, direct to matter. Great! ☑☑☑☑☑

  • Corey Schafer
    December 17, 2020

    When a function is defined, it is not executed in the act of defining it. When a variable is defined, it is also executed in the act of declaration. Why is that? I've tried to find more information on that behavior, but don't really know what to look for.

  • Corey Schafer
    December 17, 2020

    So great ! Thanks for the video !

  • Corey Schafer
    December 17, 2020

    Hi Corey, great video as always… Any chance you have a similar video series on PostgreSQL and python?

  • Corey Schafer
    December 17, 2020

    Hi. I have a question regarding my "select count (*) from table_name" statement. I'd like to retrieve just the number of records, 10 per se but instead it's returning (10,). It's includung both the parenthesis and comma. Can someone explain to me why is this?

    Thank you!

  • Corey Schafer
    December 17, 2020

    it is more confusing can programing get one rules to do it just one way???

  • Corey Schafer
    December 17, 2020

    What IDE is he using?

  • Corey Schafer
    December 17, 2020

    Thank you for this.

  • Corey Schafer
    December 17, 2020

    If I want to add many values into a table together, with """ + dictionary, it doesn't work.

  • Corey Schafer
    December 17, 2020

    I'd like to know how we can safely set the table name as a variable by using :tablename format? thanks alot

  • Corey Schafer
    December 17, 2020

    Best SQLite tutorial on the internet! I've been searching for days & finally understand it. Thank you

  • Corey Schafer
    December 17, 2020

    I had to pause this vid midway to watch your OOP Tutorials 1 and 2. Your videos are consistently well-made that I could bounce off different tutorials and easily integrate them with the current lesson. Kudos!

Write a comment