Тёмный

SQLite Backend for Beginners - Create Quick Databases with Python and SQL 

Python Simplified
Подписаться 230 тыс.
Просмотров 167 тыс.
50% 1

🛑 PLEASE NOTE 🛑 we need to add connection.commit() after each data insertion command!!!
This will store all the rows permanently inside "gta.db", otherwise you might have trouble selecting from external files!!
Find out exactly how to do it in my follow-up SQLite tutorial: • Web Scraping Databases...
Today we will talk about Sqlite, which is a library known for its quick and simple databases.
It is a database engine using the SQL language, which is probably even more intuitive and closer to plain English than Python (can you believe I'm saying that??? 😱😱😱)
With the help of Python, we will cover all the basics of creating databases, tables, inserting data into those tables, selecting and fetching database rows, searching data within the database and manipulating this data inside our code. All this - in less than 15 minutes!!! 🤩
(no wonder Sqlite is considered to be an incredibly easy library!)
If you're curious about my IDE - I'm using Wayscript which is now available for the wide public! you no longer need an invitation, you can simply sign up with the following link: app.wayscript.com
⭐ Clone the Complete Lesson Code ⭐
app.wayscript.com/lairs/536ee...
Learn more about my Wayscript X:
wsxdocs.wayscript.com/
Request an invitation to join Wayscript X:
wayscript.com/wsx
📝 Starter Code 📝
**************************
release_list = [
(1997, "Grand Theft Auto", "state of New Guernsey"),
(1999, "Grand Theft Auto 2", "Anywhere, USA"),
(2001, "Grand Theft Auto III", "Liberty City"),
(2002, "Grand Theft Auto: Vice City", "Vice City"),
(2004, "Grand Theft Auto: San Andreas", "state of San Andreas"),
(2008, "Grand Theft Auto IV", "Liberty City"),
(2013, "Grand Theft Auto V", "Los Santos")
]
⏰ TIMESTAMPS ⏰
**************************
00:00 - Intro
00:27 - Starter Code Overview
00:51 - Create Empty Sqlite Database with Python
02:37 - SQL Cursor Object
03:02 - Create Database Table
03:42 - Sqlite Data Types
04:14 - Insert Multiple Rows of Data Into a Table
06:03 - Select and Print All Database Rows
06:47 - Select Specific Rows with Specific Values
08:29 - Combine Multiple Database Tables
11:06 - Manipulate Data Fetched from Database
13:04 - Coming Soon and Thanks for Watching! :)
🔔 Important Links 🔔
**************************
🐱‍🏍 Complete Code on Github:
github.com/MariyaSha/sqliteBa...
🐱‍🏍 Sqlite3 Documentation:
docs.python.org/3/library/sql...
🐱‍🏍 Icons used in the video:
flaticon.com

Наука

Опубликовано:

 

2 июн 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 301   
@netol02
@netol02 Год назад
Straight to the point, clear, no fuzz. Stuck trying to figure out how to create a new sqlite db file and not even 5 minutes in and I'm already up and running! Thank you very much for your content and how detailed and clearly explained your tutorials are.
@novicetech1
@novicetech1 6 месяцев назад
Wow! This is the best SQLite tutorial I've ever seen. Clear, concise, and to the point. Thank you.
@toulasantha
@toulasantha Год назад
Your voice is tailored for teaching. Definitive and clear with authority. All the best.
@seraphweathers5808
@seraphweathers5808 2 года назад
BLESS YOU!!!! ILY!!! I had spent hours learning SQL just so that i wouldn't have to pull data from .txt files like a caveman, and i was getting a bit frustrated while trying to impliment it in Python. Ran into this tutorial and you taught me in less than 15 minutes... All those other sql tutorials were a waste of time for what I was trying to do! Yet you're straight to the point, BAM this is how its done, and I love it!! Thank you!!!
@veebxl
@veebxl 11 месяцев назад
where have you been all my life ? it is all so clear in my head when you explain ! 🌼thank you so much !
@arijanrahimic3210
@arijanrahimic3210 2 года назад
Perfectly explained as always! Can’t wait for the next step 🥇🙏✌️
@andrewmcbride88
@andrewmcbride88 Месяц назад
Wow, didn't expect this to be the most efficient tutorial ever. Thank you
@cajunstrat
@cajunstrat Год назад
That was fun...just created my first sqlite python script. You are a great teacher.
@danielschwan3298
@danielschwan3298 Год назад
You're helping me a lot with writing an Inventory and cash register system. This tutorial comes in very handy
@romanhar4151
@romanhar4151 2 года назад
Thank very much for this very structured, easy to understand and nice presented tutorial. 👍🙂🙂
@rajith_kumara_piyadasa
@rajith_kumara_piyadasa Год назад
Thanks & superb condensed explanation. Keep it up! 👏👏👏
@CurrentElectrical
@CurrentElectrical 2 года назад
My favourite tutorial so far, I was wanting to learn the basics of local sql, thank you Mariya. And hello from Ontario! Play safe.
@PythonSimplified
@PythonSimplified 2 года назад
Yeeeey! Super happy to hear! 😃😃😃 A new Sqlite tutorial is coming out in 2 days so stay tuned! (webscraping data directly into a database)
@paolotagliente5786
@paolotagliente5786 Год назад
amazing ....such a clear and perfect explanation of concepts.....love your videos!!!
@shiroiookami424
@shiroiookami424 11 месяцев назад
Thanks for the tutorial I really love using SQL and exploring data
@mtmanalyst
@mtmanalyst 10 месяцев назад
Great stuff, thank you. Your explanations are very very good
@halbodb
@halbodb 2 года назад
Thanks for your tutorials. You are truly a great teacher! Please keep on going with the Python stuff... ❤️ 🐍
@PythonSimplified
@PythonSimplified 2 года назад
Thank you so much!! 😃😃😃
@higiniofuentes2551
@higiniofuentes2551 6 месяцев назад
Thank you for this very useful video!
@ahmedutuber
@ahmedutuber 2 года назад
we need more explames like this ! Python and SQL
@behzodhoshimov3792
@behzodhoshimov3792 2 года назад
I really enjoyed from the tutorial because it was clear to understand. Thanks so much 😊.
@flowi84
@flowi84 Год назад
Your explanations are so good. Thank You
@zaanmorningstar
@zaanmorningstar 2 года назад
Solid video, thanks for the great detail!
@Jenko022
@Jenko022 2 месяца назад
This is excellent material and relatable data. Thanks 🎉🎉🎉
@mbtv942
@mbtv942 7 месяцев назад
Thanks for the wonderful explanation.
@Dylan_Miller
@Dylan_Miller 10 месяцев назад
Very helpful, thank you for taking the time to make this.
@davidgodinez7146
@davidgodinez7146 2 года назад
Really great video! I'm going through all of these and learning a ton! I think the only suggestion I would give is to include a line for `connection.commit()` to save the data in the database. This is helpful is you want to have another script or do more with the data and don't have to deal with running this script every single time. Great work!
@Headlikeanorange84
@Headlikeanorange84 Год назад
Thanks a bunch! I was wondering why I got an empty database message when doing the Basic Guide to Pandas (in which this database is loaded).
@sirnatre
@sirnatre 2 года назад
I loved it, excellent all very clear, so it makes you want to go to classes every day of the year. Gracias Totales XD
@historian2
@historian2 2 года назад
I liked the exotic pronunciation of the word "cursor"!
@dancomlex2012
@dancomlex2012 Год назад
Increible, nunca había visto una programadora tan hermosa.
@nikluz3807
@nikluz3807 2 года назад
you are very good at explaining the code simply. thanks!
@PythonSimplified
@PythonSimplified 2 года назад
Thank you so much! 😊
@nescorrosete4830
@nescorrosete4830 Год назад
good work king, love you
@siddharthadas5146
@siddharthadas5146 Год назад
This is amazing. Thank you for making the video!!
@PythonSimplified
@PythonSimplified Год назад
Thank you so much! Super happy you liked it! 😃 Did you notice my code correction in the description with connection.commit() ??? Please add it after your insert commands to update the database file... otherwise it won't be saved 🙃
@abdusamadabdullakhanov6732
@abdusamadabdullakhanov6732 2 года назад
you know what? my mind is focusing on your beauty!!!!!!!!! not to your lessons! no, i find your video is helpful so much!!
@groomy88
@groomy88 Год назад
Thanks so much. Really easy to follow!
@fabian_ftn6604
@fabian_ftn6604 2 года назад
Just Right in time, I'm learning Databases on college and I wanted to make a SQL database now I can thx!
@PythonSimplified
@PythonSimplified 2 года назад
Yeeeeeeey! what a perfect timing! I'm super happy I'm able to help!!! 😃 What DB management system are you learning about? (BTW, I'm also a student and I'm also taking databases in this semester hahahaha)
@fabian_ftn6604
@fabian_ftn6604 2 года назад
@@PythonSimplified We just started with databases and they are showing us the basics , I think we are going to use Microsoft Access at first and then move on to MySQL Lol. (Thank for your videos they are helpful keep it up!!!)
@kennethstephani692
@kennethstephani692 Год назад
Another great video!
@mauricealgorithm7320
@mauricealgorithm7320 2 года назад
The first beautiful programmer on RU-vid
@tigreonice2339
@tigreonice2339 Год назад
Thank you. I love your channel
@Tobs_
@Tobs_ 2 года назад
Thanks Python Lady, another great video 👍
@zxbbvnm
@zxbbvnm 2 года назад
thank you so much for this! I'm studying database this semester and this is very big help🤩
@PythonSimplified
@PythonSimplified 2 года назад
Thank you Lemuel! 😃 I'm super happy to help!!
@theblindprogrammer
@theblindprogrammer 2 года назад
Have you learned Core Data yet? that is the DB system Apple uses for their products. It is awesome if you want to save data in iphones/ipads
@thearchibaldtuttle
@thearchibaldtuttle 2 года назад
As a seasoned silverback gorilla in IT I love to listen to this enthusiastic and capable presenter!
@the-game
@the-game 2 года назад
Thank you for this tutorial 🤩
@ryuyasho4468
@ryuyasho4468 2 года назад
Gorgeous Mariya, good morning 😘 Just wanted to thank you for the Roadmap Learning video. After I watched it, couple of blocks I had got cleared out and now I can see better. I will follow that map to victory 💜
@PythonSimplified
@PythonSimplified 2 года назад
I'm so happy to hear that Ryuya! 😃 Everything is better with a game plan! 💪💪💪 Hopefully I'll be able to complete my Python for Beginners series soon, but in the meanwhile - I recommend checking out some introduction to Python courses on platforms like Udacity, Udemy, Coursera, Idx. They are always offering some beginners courses for free, so if you know what you want to learn - these online academies are a very valuable resource! 😊
@pip07200
@pip07200 2 года назад
Thank you for the clear explanation, as a total beginner.
@PythonSimplified
@PythonSimplified 2 года назад
You're welcome! I'm glad you liked my explanation! 😃
@PerseyNyasha
@PerseyNyasha 2 года назад
I love you, thank you for your content😜
@PythonSimplified
@PythonSimplified 2 года назад
Thank you so much for the lovely comment! 😃
@kamertonaudiophileplayer847
@kamertonaudiophileplayer847 2 года назад
Sqlite is my favorite database. Thank you to provide a description of it for Python.
@PythonSimplified
@PythonSimplified 2 года назад
You're absolutely welcome! 😁 I'm posting an additional Sqlite tutorial in a few days! (web scraping an entire database with mechanical soup and sqlite3) so stay tuned! 😉
@kamertonaudiophileplayer847
@kamertonaudiophileplayer847 2 года назад
@@PythonSimplified I bet you target data scientists as myself.
@lesteraxelballadareslopez5850
@lesteraxelballadareslopez5850 2 года назад
Excellent video "thumbs up"
@mr.goldenball333
@mr.goldenball333 2 года назад
Thank you, it helps a lot!
@MrTaquiones
@MrTaquiones 2 года назад
Excelente, you are my dreamed teacher saludos desde Latinoamerica
@Optimusjf
@Optimusjf 2 года назад
Thank you. This cristal clean.
@nashenas1950
@nashenas1950 9 месяцев назад
Thank you so much I understood it very easily because of your presentation.
@kamilaknapova8557
@kamilaknapova8557 11 месяцев назад
Simply irresistible tutorial, thnx*
@Re4perZer0
@Re4perZer0 Год назад
it boggles my mind how my professor couldn't explain this so simply as you did.
@ForTheForsaken
@ForTheForsaken 11 месяцев назад
The way you say cursor is just adorable.
@wexleyyt5931
@wexleyyt5931 2 года назад
noooooooo i went to bed right before the premiere! great video as always though!
@FritsvanDoorn
@FritsvanDoorn 2 года назад
Ok, that looked simple. Thank you.
@PythonSimplified
@PythonSimplified 2 года назад
That's awesome! I'm happy to hear! 😃
@Leonardo_A1
@Leonardo_A1 9 месяцев назад
Great introduction THANKs Leonardo
@minhnguyenhainhat234
@minhnguyenhainhat234 2 года назад
your voice is so great to understand
@adriannowik
@adriannowik 2 года назад
Impresionante Maryia !!!
@alexandermuir8160
@alexandermuir8160 2 года назад
Argh Mariya, you make everything look and sound so easy. 🦘👍😉
@PythonSimplified
@PythonSimplified 2 года назад
Thank you so much Alexander! 😃 That's why I'm here! 😉
@sofiene4622
@sofiene4622 2 года назад
Thank you very match. it's really so easy I mean we dont need any server to use a data base. (thanks again from Tunisia)
@noufalns8045
@noufalns8045 Год назад
Its very useful for my project well explained and easy code thanks mam❤️
@freezoulou
@freezoulou 2 года назад
ok lest try this :) is working you are the best ...now i have to try with flask
@DRAGON_FullPower
@DRAGON_FullPower 2 года назад
Beautifull and smart, you're the dream of any man
@edwinrosales6322
@edwinrosales6322 10 месяцев назад
Great video!
@wildgorilla1205
@wildgorilla1205 2 месяца назад
Cool, thanks!
@diwakar_tsn
@diwakar_tsn 2 года назад
Thanks for free course ❤️❤️🇳🇵
@PythonSimplified
@PythonSimplified 2 года назад
Thank you for the comment and the hearts! 😀
@ClayMurray8
@ClayMurray8 2 года назад
SQLite is one of my favorite things. The C API is so easy to use for it and makes it easy to embed into desktop applications. I use it for my game, level data, asset data, save data all SQLite databases. A huge advantage is: You can do migrations! So many games update and change their save format and now you can't open old saves in the new version of the game. Using SQLite as your save file it's not hard to write queries that will update and save file from the previous format.
@theblindprogrammer
@theblindprogrammer 2 года назад
SQLite is so great that they even convinced Apple to use for their DBs, Core Data uses SQLite
@ferrari748
@ferrari748 2 года назад
Great explanation!
@PythonSimplified
@PythonSimplified 2 года назад
Thank you! 😊
@ce6872
@ce6872 2 года назад
When I saw you I thought to myself "I'm in love" but I'm no simp...then I saw the GTA example,well I really am in love😂
@melchiah6603
@melchiah6603 2 года назад
SQLite is simple, easy, efficient and beautiful, widely used in embedded technologies, and currently on Android. Very good tutorial, thanks for the nice explanation.
@theblindprogrammer
@theblindprogrammer 2 года назад
Apple also uses for their Core Data DB
@melchiah6603
@melchiah6603 2 года назад
@@theblindprogrammer i did not know that Apple also uses it. Thanks for the information.
@PointEndClick
@PointEndClick 6 месяцев назад
This video is awesome.
@semtex2987
@semtex2987 2 года назад
nice introduction 👍 i used and use sqlite alot for quick & dirty stuff or simple demos. for anything else, tortoise orm is my way to go - once one worked with dataclasses it's hard to go back 😉 perhaps you do a video about that some time, could be an eye opener for a lot of people 😘
@theblindprogrammer
@theblindprogrammer 2 года назад
I never heard that, what is that? do you have vids about it?
@findthetruth3021
@findthetruth3021 2 года назад
It is really easy and loved the video, but I have the following questions. 1- how to upload data from CSV or Excel or Google sheets instead of the release list. 2- how to connect or import the created database with other platforms such us R language or Jupiter notebook. I will appreciate that if you can answer these questions above. Thanks in advance. 👏👏👏
@andrewthought3350
@andrewthought3350 2 года назад
I used to use PHP for creating websites for fun. You persuade me to try Python in order to learn this bright technology and learn some things on a different way.
@abdultheseekerofknowledge4453
I've used PHP and it is total trash if it wasn't for all the legacy systems no one would use it imho
@ricardomillan9095
@ricardomillan9095 2 года назад
Excelent ! All the time well-explained and didactically. Could you please add in your list API implementation.
@lycan2494
@lycan2494 2 года назад
Love the thumbnail 😘
@Lemmy13
@Lemmy13 2 месяца назад
some people doesn't think. Before they write. What is that video tutorial about? What people complain about are examples. It doesn't matter that examples are correct. It's about the code isn't it? thank you !. Python & sqllite basic understanding now checked.😊
@PedroGomes-sz5ot
@PedroGomes-sz5ot 2 года назад
Very Good, Pedro Gomes - São Paulo - Brasil
@MrPioneer7
@MrPioneer7 Год назад
Excellent 👑
@musicstore2405
@musicstore2405 2 года назад
❣ you are always helpfull
@PythonSimplified
@PythonSimplified 2 года назад
Thank you! I'm happy ro help! 😄😄😄
@chuckbecker4983
@chuckbecker4983 Год назад
Brilliant!
@youcefmerah5707
@youcefmerah5707 2 года назад
that what i called Python simplified ps : if you're new to python ! this channel will make your life a lot easier
@PythonSimplified
@PythonSimplified 2 года назад
Thank you so much for your lovely comment Youcef! 😃😃😃 I really appreciate your support! 😊
@9876rabi123456789
@9876rabi123456789 2 года назад
Dear madam, your Python OOP videos helped me soo much to understand the complex concept of OOP. Thank you madam for helping me. I have a request to you that if you could come with a complete Django course...
@PythonSimplified
@PythonSimplified 2 года назад
Hi Rabi Roy! 😃 Thank you so much for the lovely comment, I'm so happy I was able to help! 😊 Django is certainly on my "to do" list and a complete tutorial is coming soon! I'm running a bit behind schedule as I got a new exciting project in the making, but I'm aiming to post a Django video in the next few weeks... hopefully, it will help you with your project! 😁 In the meanwhile, you can check out a similar framework to Django (called Flask) in this tutorial of mine: ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-6plVs_ytIH8.html
@CaribouDataScience
@CaribouDataScience Год назад
Thanks that was helpful. What playlist is this video part of? Do you have a video using Pandas, data. frame and SQLite?
@TheHabibpk
@TheHabibpk 2 года назад
looks gorgeous
@jeffb4710
@jeffb4710 Год назад
Time to learn some SQL :)
@philtoa334
@philtoa334 2 года назад
Very Nice thank you.
@PythonSimplified
@PythonSimplified 2 года назад
You're absolutley welcome, Phil! Hope it helps! 😃
@warrenscorner
@warrenscorner 2 года назад
Fantastic tutorial! I was able to create my database and query the database without any problems. I’m gonna go off topic here and ask about I2c. I want to send my query tuple of four integers to an Arduino. I tried to use write_byte(address, myTuple) but I get an error saying that myTuple is not an int. I thought I could try to use write_block_data(address, myTuple) but now it’s saying that I need to pass 3 parameters. Maybe I’m missing char_cmd? I don’t understand what this third parameter is. What am I doing wrong? Thank you for any assistance you can give me.
@ahmedmyself1660
@ahmedmyself1660 Год назад
Hey sorry for being too late to the party :) just a quick question. On 12:26 you manually traced the indexes of where the fictional city is as to what real city it correspond to in the Db and you hardcoded the indexes for the condition. Just curious how can you dynamically have the condition check let's say all 4 fictional cities and their corresponding real cities? Assuming we populated all 4 cities in the new table. Instead of saying search_cities [0][1] if search_cities [0][0] I would like to do the evaluation using text. My brain stopped working, how would you approach that? I hope my question is clear.
@rogeliopanebarcomajr9115
@rogeliopanebarcomajr9115 2 года назад
Wow so beautiful ❤️
@trtlphnx
@trtlphnx 2 года назад
This Helps me On a Current Project SO MUCH ~ You Are As Resourceful As you Are Lovely, Sweetie ~
@PythonSimplified
@PythonSimplified 2 года назад
That's awesome trtlphnx! I'm super happy to help!! 😃 What kind of project are you working on??? something exciting?? 😊
@2Calam
@2Calam 2 года назад
Wow, this was so good! I have been working with a few sql databases that were created by my teachers and I was trying to learn how to create my own. Yours was about the 10th video I tried and you were the first one to actually explain what the commands meant. I had no idea why people were typing connection or cursor. Thankyou! When we ran our search command: cursor.execute("select * from gta where city = :c", {"c": "Anywhere, USA"}) Could you please explain what the syntax city = :c does? Thanks again!
@PythonSimplified
@PythonSimplified 2 года назад
Thank you so much! Super happy you found this tutorial helpful! 😃 With "city":c we assign a dictionary key named "c" to the column name "city". So "c" doesn't have to be "c" it could be anything you choose! It's best practice to avoid passing the actual values in an SQL query string (mostly for security reasons, from what I understand) So instead of passing the city name into the SQL command directly - we pass it as an attribute. So similar to where we used (?,?,?) As placeholders - "c" is also a placeholder for "liberty city". I hope it helps! 😊
@2Calam
@2Calam 2 года назад
@@PythonSimplified wonderful. Thankyou!
@marcusmorasalas5436
@marcusmorasalas5436 2 года назад
I love your tutorials. Do you have some video about using json in python?
@shanp05
@shanp05 2 года назад
Thank you for the quick tutorial. Is it possible to encrypt and decrypt the Sqlite db in Python?
@0x007A
@0x007A 2 года назад
The for-loop could be replaced by a INNER JOIN statement which might make it easier for beginners to understand. This is still a good introduction to basic SQL with Python. Hope your computer science studies are going well.
@johng5261
@johng5261 2 года назад
She needs a foreign key for that
@0x007A
@0x007A 2 года назад
@@johng5261 true which is another reason a JOIN should have been demonstrated.
@johng5261
@johng5261 2 года назад
@@0x007A yeah the second table didn't really add any value if it doesn't have a relation
@0x007A
@0x007A 2 года назад
@@johng5261 I presumed the foreign key requirement was implied in my original comment. I should have been explicit. :-)
@johng5261
@johng5261 2 года назад
@@0x007A explicit better than implicit
@shuxiaokai
@shuxiaokai 2 года назад
Good class
@marcus7387
@marcus7387 2 года назад
Great Video !! Thank you Mariya 🙏 Where are you from ?
@SanjeevKumar-nc2rt
@SanjeevKumar-nc2rt 2 года назад
I got the idea 🥰
@kirbyurner
@kirbyurner 2 года назад
If office folks were more familiar with sqlite3 they could pass around structured data more effectively than they do using spreadsheets. I’m a big fan of spreading sqlite3 as an everyday productivity format. Versus spreadsheets.
@hchattaway
@hchattaway 2 года назад
What monitor is that?! That looks awesome!
Далее
If __name__ == "__main__" for Python Developers
8:47
Просмотров 376 тыс.
Пробую торты
00:43
Просмотров 364 тыс.
МЯСНОЙ ЦЕХ - Страшилки Minecraft
37:24
SQLite Databases With Python - Full Course
1:29:37
Просмотров 646 тыс.
SQL Databases with Pandas and Python - A Complete Guide
16:59
3 PYTHON AUTOMATION PROJECTS FOR BEGINNERS
17:00
Просмотров 1,5 млн
SQLite is enough
5:58
Просмотров 7 тыс.
SQLAlchemy: The BEST SQL Database Library in Python
16:39
iphone fold ? #spongebob #spongebobsquarepants
0:15
Просмотров 257 тыс.
Не обзор DJI Osmo Pocket 3 Creator Combo
1:00
Просмотров 967 тыс.