Python SQLite Tutorial: Build a Python project with a SQLite database

  Рет қаралды 54,641

teclado

teclado

Күн бұрын

Learn how SQL works from the ground up and how to use SQLite from your Python apps in this complete Python SQLite Tutorial!
In this video, we build a Python project that uses a SQLite database to store data. We also look at how SQL simplifies inserting, retrieving, and searching for data.
0:00 - Video Introduction / What to Expect
0:30 - Overview of SQLite & Databases
1:10 - A database for a Coffee Preparation App
2:05 - A Table's Composition
2:48 - How to create a table in SQL
4:48 - Inserting data into the database
5:52 - Selecting data from the database
7:47 - Filtering your data
8:19 - Sample Query
9:16 - Group by Clause
10:50 - Accessing data in Aggregate
12:55 - Coffee App Introduction
13:14 - PROJECT START - Preparing the app's database
16:31 - Coding the app
36:05 - Conclusion
Next video - drawing graphs and charts with matplotlib: • Learn to draw graphs w...
-- Links --
✅ Subscribe to the channel: kzbin.info?s...
✅ The Discord server: / discord
✅ Twitter: / tecladocode
✅ Instagram: / tecladocode
✅ Facebook: / tecladocode

Пікірлер: 102
@erkayberkant1828
@erkayberkant1828 3 ай бұрын
I watched many tutorials about Sqlite, but the way you teach this, is really the best.
@tecladocode
@tecladocode 3 ай бұрын
Thank you very much! Glad you liked it 😁
@augurelite
@augurelite 2 жыл бұрын
What a fantastic tutorial! Worth every minute. As a mostly self-taught beginner programmer, I feel like I learned some really good coding practices too! Thank you so much
@aurontz
@aurontz 4 жыл бұрын
I've view many many tutorials on sqlite3 with python. None of them compare to this. Thank you so much. Subbed!
@tecladocode
@tecladocode 4 жыл бұрын
Thank you Dane! For both the comment and the sub!
@moeezabdul2000
@moeezabdul2000 3 жыл бұрын
Totally Agree! 100%100!
@jawadmansoor6064
@jawadmansoor6064 Жыл бұрын
After seeing a tons of videos on SQL I say this is the BEST tutorial of all times about SQL. Subscribed and liked.
@2kpresident363
@2kpresident363 3 жыл бұрын
Great video! One of the best about python and sqlite!Thank you so much!
@leonardofreitas8900
@leonardofreitas8900 2 жыл бұрын
This video is excellent! All very well explained. Thanks for sharing!
@notsaeed
@notsaeed 3 жыл бұрын
Thank you so much. This was the only helpful resource I could find.
@meylyssa3666
@meylyssa3666 3 жыл бұрын
Thanks for clear and understandable explanations!
@moeezabdul2000
@moeezabdul2000 3 жыл бұрын
Absolutely, a Beauty of a Video Honestly! Really Appreciated Your Knowledge & Support on this! Liked & Subscribed!
@zukofire6424
@zukofire6424 2 жыл бұрын
thanks for this Teclado, very helpful in the context of my internship at a start up!
@roybarretto9552
@roybarretto9552 2 жыл бұрын
This is an awesome video lesson (not coffee bean). Brief and simple but clear and easy to understand. Thanks. Will put this code into GUI as a tkinter project. Gracias.
@AlexanderColaneri
@AlexanderColaneri 3 жыл бұрын
Very good, thank you for your content! I had to put the video speed to 0.75 while working on my project, to clearly understand everything, and it worked out.
@tecladocode
@tecladocode 3 жыл бұрын
That's awesome to hear, Alexander! Glad the video was helpful!
@esspi9
@esspi9 3 жыл бұрын
This was awesome! Thanks a lot! Subbed!
@sobiralimov7777
@sobiralimov7777 2 жыл бұрын
Wooooww. It's amazing course for me. I enjoyed and learned much. Thanks for all!
@foucault9978
@foucault9978 2 жыл бұрын
Excellent video. Muchisimas gracias José!
@beybey444
@beybey444 Жыл бұрын
As a coffee and coding lover, i had the BEST 37 minutes for today
@hardstylefreakzz
@hardstylefreakzz 3 жыл бұрын
Solid work, thanks!
@nachiketasharma5791
@nachiketasharma5791 2 жыл бұрын
Perfectly explained!!!
@FunDumb
@FunDumb 6 ай бұрын
Very well thought out. 👏
@naveenkumarthangavelu4220
@naveenkumarthangavelu4220 3 жыл бұрын
Thank you so much for this course. Apart from SQLITE. I also learnt more about how to call the function and arguments. It was so crisp and easy to understand . Thank you much for this video
@harshtomar1475
@harshtomar1475 Жыл бұрын
hello sir, i am an student , i want to ask one question
@enescelebi2411
@enescelebi2411 Жыл бұрын
@@harshtomar1475 what's your question?
@thegreatgaespi
@thegreatgaespi 3 жыл бұрын
Thank you for awesome video clip
@NormannCfC
@NormannCfC 7 ай бұрын
That was great! THX
@mayeeshamasud5527
@mayeeshamasud5527 3 жыл бұрын
Thank you so much! :)
@namwanzaronald9436
@namwanzaronald9436 2 жыл бұрын
Great tutorial !!.
@novicetech1
@novicetech1 7 ай бұрын
I'm a latecomer to the party, but this was a very good tutorial. I learned a lot. I will review this code carefully and try to implement this approach any time I need a database. Excellent stuff. Thanks.
@bosworthjb
@bosworthjb 3 жыл бұрын
Nice!
@stevemorse5052
@stevemorse5052 3 жыл бұрын
Thanks for a great tutorial. The only problems I had was the interface device between the chair I was sitting on and the computer keyboard. I do not think the 3 beers and a large vodka tonic had anything to do with it!. I got the whole thing done in less than 2 hours, including my errors. Thanks again.
@dogarayunanagani6986
@dogarayunanagani6986 2 жыл бұрын
wow you are just so amazing! You explain so well and make your code very readable. you do have great coding practices I hope to pick up. Just one question though, I noticed you did not use the "cursor" is that something that is optional? some other tutorials I watched used cursor.connection and at the end cursor.close, connection.close. I would love if you can explain a bit about these use cases.
@cheesefries6616
@cheesefries6616 Жыл бұрын
Hi! I'm just a beginner and just asking why you didn't use the commit() and the cursor in this program?
@sandeepsinghnegi9220
@sandeepsinghnegi9220 4 жыл бұрын
Thanks!!!
@tecladocode
@tecladocode 4 жыл бұрын
No problem!
@dhanushsivajaya1356
@dhanushsivajaya1356 3 жыл бұрын
Thankyou sir
@suhanoves
@suhanoves 3 жыл бұрын
Hey, Jose! It's awesome video, but how about database and OOP classes? Did you think to create new video how to modify your program for getting data from database and recreating class?
@pythonenthusiast9292
@pythonenthusiast9292 4 жыл бұрын
Your teaching is awesome by the way, please make a course on complete DSA with python !!
@pythonenthusiast9292
@pythonenthusiast9292 4 жыл бұрын
or maybe just make a course on problem solving based on different topics and data structures like array , linkedlist , and greedy maybe. I think people will be interested in watching it . I'll buy for sure
@Motivation_into_coding
@Motivation_into_coding 11 ай бұрын
Thanks my brother man, I have a task to submit for bookstore which will allow to update delete search an add using sqlite3 with menu to display with the input using function, u help me a lot by following this video
@tecladocode
@tecladocode 11 ай бұрын
Glad it helped. Thanks for the comment and the kind words!
@johannesklug8006
@johannesklug8006 Жыл бұрын
Great tutorial. I got a question on the data model: shouldn't the name of the table (that is of the entity-type) be something like "coffee experiments"? Than the ill-named column "name" would be "bean". After all, we can imagine using "awesome arabica" once with a perlocator und once with the espresso method.
@SatishKumar-mn6bi
@SatishKumar-mn6bi 3 жыл бұрын
Can we see multi line text (text box widget) in such program with sqlite 3.
@thoughtslibrary
@thoughtslibrary 4 жыл бұрын
Bro, i become fan to your videos
@tecladocode
@tecladocode 4 жыл бұрын
Thank you so much 😀 Glad you're enjoying the videos!
@utm13n
@utm13n Жыл бұрын
Great video! Is the example code available online?
@georgeseese
@georgeseese Жыл бұрын
Thanks. SQliteStudio also provides access to the database.
@jusdzakybungasmuhammad2951
@jusdzakybungasmuhammad2951 3 жыл бұрын
is there a way to update the record using user input??? ive been trying to find the answer for hours but i still havent found the solution anyhelp???
@acbattery
@acbattery 4 жыл бұрын
Thx for this great tutorial. At 23:54 "...fetchone()", Would fetchall() instead work as well because the SQL command (LIMIT1) already limited the result to 1? just wondering
@tecladocode
@tecladocode 4 жыл бұрын
It would, but you’d get a Cursor of one element instead of just the element directly.
@aabhaskrjha
@aabhaskrjha 4 жыл бұрын
Both on udemy and KZbin you're a rockstar.
@tecladocode
@tecladocode 4 жыл бұрын
You’re the rock star Abhas Jha! 🔥
@reghaabraham
@reghaabraham 4 жыл бұрын
He sincerely is. The mode of presentation and above all, he always answers when you call with your challenge.
@prakashkombala
@prakashkombala 3 жыл бұрын
very good tutorial I can get PowerPoint presentation file
@sirius_school
@sirius_school 2 жыл бұрын
I have an error in the (user_input := input(MENU_PROMPT)) 25:40 help me please!
@mrozyyev2853
@mrozyyev2853 Жыл бұрын
Great video! Liked & Subbed. But can't find the code/project link.
@orlandoortega4504
@orlandoortega4504 2 жыл бұрын
got stuck in minute 26 my terminal says File "/Users/orlandoortega/Desktop/datasbases/app.py", line 22, in
@irishronan5159
@irishronan5159 4 жыл бұрын
Would there be a way to set up a function that edits the method or the rating of a bean? If so what would it look like
@tecladocode
@tecladocode 4 жыл бұрын
Sure thing ! You can use the SQL UPDATE statement to do that. For example: UPDATE beans SET method = "Filter" WHERE name = "My Bean"; Just don't forget the WHERE, as if you do you'll change every bean in your table. More info: pysql.tecladocode.com/section04/lectures/06_updating_data/
@kinjalvora256
@kinjalvora256 3 жыл бұрын
Hi I have a quick question...what about cursor in sql? don't we need it?
@arctitan7076
@arctitan7076 3 жыл бұрын
I had the same question and found the answer in the Python sqlite documentation. It is explained in the section Using sqlite3 efficiently
@leonardkabasa1902
@leonardkabasa1902 2 жыл бұрын
Halo are you available to help someone struggling with tkinter n sqlite
@akhilamadhu7069
@akhilamadhu7069 3 жыл бұрын
For me the line while(user_input := input(MENU_PROMPT)) is giving syntax error. Can u tell y
@saeedpourjafar261
@saeedpourjafar261 3 жыл бұрын
Walrus operator (:=) is the feature that was added in the Python 3.8 You've raised error because probably your python version is below 3.8. Update your python version will fix it.
@aabhaskrjha
@aabhaskrjha 4 жыл бұрын
Hey Jose, please do make a video on python flask /django app deployment
@tecladocode
@tecladocode 4 жыл бұрын
Hey Abhas, we've got the Microblog video which uses Flask. Check out our channel! We're thinking about Django content, but we don't use it, so it's a bit tricker...
@aabhaskrjha
@aabhaskrjha 4 жыл бұрын
@@tecladocode Ah thanks It's fine with flask I work with flask too
@ronelframos
@ronelframos 2 жыл бұрын
I'm getting a "TypeError: "NoneType" object is not iterable", how can I fix this?
@Anonymous-my5ud
@Anonymous-my5ud 3 жыл бұрын
AttributeError: __enter__ I'm getting this error while running def create_table(connection): with connection: Any Idea?
@herono-4292
@herono-4292 3 жыл бұрын
you need to add this at the end connection.execute(CREATE_BEANS_TABLE )
@marisabeltrejo4081
@marisabeltrejo4081 Жыл бұрын
I am unable to "import database" Is there a download I am missing?
@ananicolel.ramilo2472
@ananicolel.ramilo2472 2 жыл бұрын
Hi can you please show us how to do the insert query in this data base hope you'll notice me 🙏🥺
@oogiemcguire8578
@oogiemcguire8578 4 жыл бұрын
Is the final code any place we can download it and run it?
@stevemorse5052
@stevemorse5052 3 жыл бұрын
Hi Oogie I understand that you posted this 9 months ago, but may I suggest that you copy the code from the screen. That is how I do it (see my post above). I am able to remember more of the code that way. Try it, and if that does not work for you, let me know and I will get the code to you somehow. Later mate
@WCdesign999
@WCdesign999 4 жыл бұрын
hi, "import database" actually doesn't work for me any ideas?
@mini_mouseinthehouse
@mini_mouseinthehouse 3 жыл бұрын
I am also having this problem!
@BM-vq5rp
@BM-vq5rp 2 жыл бұрын
I wonder if replying 1 year later is late, but... if u are literally typing "import database", its wrong, u r meant to import the name of your database file.
@joshuaarguelles6969
@joshuaarguelles6969 2 жыл бұрын
@@BM-vq5rp how??
@ralucaifrim461
@ralucaifrim461 3 жыл бұрын
I am stuck with a coursework question and wasted 4 hours to solve it..if anyone could help me i would be very grateful.. so i got a list with composer names, place of publication, year etc and the question asks to
@dansundell1663
@dansundell1663 Жыл бұрын
any chans to get your code?
@pythonenthusiast9292
@pythonenthusiast9292 4 жыл бұрын
what if we didnt use sqlite3 module? we can still store the details in lets say dictionary and still access all the queries right? what is advantage of using SQL here ?
@tecladocode
@tecladocode 4 жыл бұрын
Using SQLite will let you store the data permanently, whereas leaving it in a dictionary means the data will be lost when the application ends. Also, the SQL language is very powerful and lets you query the data in ways that a normal dictionary doesn't (not as easily, at least).
@pythonenthusiast9292
@pythonenthusiast9292 4 жыл бұрын
@@tecladocode thanks!
@dianamulaikhanova
@dianamulaikhanova 10 ай бұрын
OK, how we can run it, how we can see the result, interesting
@MrPennywise1540
@MrPennywise1540 Жыл бұрын
You have to divide your class in parts, with it's own introduction. Just to be more organized and understandable. Even thou, good video.
@jasonmartin3147
@jasonmartin3147 3 жыл бұрын
When I run app.py I get an error sating No module named 'database'. Anyone have any ideas?
@jasonmartin3147
@jasonmartin3147 3 жыл бұрын
Figured it out
@joshuaarguelles6969
@joshuaarguelles6969 2 жыл бұрын
how?
@SatishKumar-mn6bi
@SatishKumar-mn6bi 3 жыл бұрын
Sir your speed is fast again screen is dark so we could not see list of beans, for query 2 and 3 it shows null. I could not hear and video does not show code
@carloseduardogomezlozano491
@carloseduardogomezlozano491 Жыл бұрын
elif user_input == '5': connection.close() print('Tanks for use this system') break
@dumpling3309
@dumpling3309 Жыл бұрын
I wanted to make a comment section for a ratings website.
@hellobytes1348
@hellobytes1348 Жыл бұрын
Code?
@riyabhati7416
@riyabhati7416 3 жыл бұрын
hi need you urgent help
@SA-oj3bo
@SA-oj3bo 2 жыл бұрын
You talk and type very quick, hard to follow you sometimes, and then you even paste a lot of code .. at the end you said not to worry because the code would be available, but where to find the code?
@riyabhati7416
@riyabhati7416 3 жыл бұрын
need internship
@ogunkayodeoluwaseun9348
@ogunkayodeoluwaseun9348 3 жыл бұрын
Tbh he sounds like the male version of sypha from CastleVania
@danielsiddiqui5903
@danielsiddiqui5903 4 ай бұрын
Terrible why where you speeing through it like someone put you in fast mode
How to create Databases in Python with SQLite
1:02:49
Kevin McAleer
Рет қаралды 10 М.
A little girl was shy at her first ballet lesson #shorts
00:35
Fabiosa Animated
Рет қаралды 17 МЛН
Can A Seed Grow In Your Nose? 🤔
00:33
Zack D. Films
Рет қаралды 30 МЛН
لقد سرقت حلوى القطن بشكل خفي لأصنع مصاصة🤫😎
00:33
Cool Tool SHORTS Arabic
Рет қаралды 29 МЛН
Mama vs Son vs Daddy 😭🤣
00:13
DADDYSON SHOW
Рет қаралды 51 МЛН
Databases + Python with SQLite3 - Part 2 - Foreign Keys
10:36
The CS Classroom
Рет қаралды 13 М.
Create a GUI app with Tkinter - Step by Step Tutorial
23:56
Python Simplified
Рет қаралды 611 М.
SQLite Databases With Python - Full Course
1:29:37
freeCodeCamp.org
Рет қаралды 661 М.
This SQLite Database Model is Easy and Ready for your Python Projects!
11:16
SQLite as an easy introduction to the topic of databases
9:57
The Morpheus Tutorials
Рет қаралды 15 М.
SQLite Backend for Beginners - Create Quick Databases with Python and SQL
13:32
How to store data with Python and SQLite3
9:15
John Watson Rooney
Рет қаралды 43 М.
I've been using Redis wrong this whole time...
20:53
Dreams of Code
Рет қаралды 348 М.
Это - iPhone 16!
16:29
Rozetked
Рет қаралды 453 М.
Todos os modelos de smartphone
0:20
Spider Slack
Рет қаралды 66 МЛН
Частая ошибка геймеров? 😐 Dareu A710X
1:00
Вэйми
Рет қаралды 5 МЛН