Learn how to connect Python to a SQL database using the sqlite library.
I am planning on another one covering topics like data frame handling in SQL which I consider to be pretty important and I think ORM is also an interesting topic.
Forgot an important thing: Close the connection once you are done with your stuff:
connection.close()
If you have any questions please feel free to drop me comment.
Thank you very much for watching :-)
You can download the DB Browser here:
https://sqlitebrowser.org
Regarding bad practice:
There is a much better way to use OOP in connection with databases which is referred to as ORM (object-relational mapping). I will do a video on that in the future.
0:00 - 0:47 Brief Introductory Talk (skippable)
0:47 - 02:22 Connecting Python with a new database
02:22 - 03:25 Sqlite Datatypes
03:25 - 04:35 DB Browser (Database "Interface" - optional!)
04:35 - 06:40 Create Tables
06:40 - 08:30 Insert Values into a Table
08:30 - 09:35 Querying the Database (SELECT statement)
09:35 - 11:05 fetchall() and fetchone() / multiple rows
11:05 - 11:28 Iterating over the cursor
11:28 - 12:55 Inserting Python variables into a SQL table
12:55 - 13:58 Flexible inputs
13:58 - 15:40 Using a constructor (OOP) to fill tables (bad practice see description)
15:40 - 16:01 Up Next / Thanks for watching :-)
Auf dieser Seite können Sie das Online-Video How to connect Python with a SQL database [SQLITE] | perfect for beginners mit der Dauer stunde minuten sekunde in guter Qualität ansehen, das der Benutzer Algovibes 18 March 2021 hochgeladen hat, den Link mit Freunden und Bekannten teilen, dieses Video wurde auf Youtube bereits 24,709 Mal angesehen und es wurde von 535 den Zuschauern gefallen. Viel Spaß beim Betrachtenden Zuschauern gefallen!