Adding data to SqlLite3 database with Python

After reading the database to python from the previous post here, it is time to do the ADD data to the database. Our database is created like this:

The database has autoincremented primary key, thus we do not need to add to it. With the help of InsertMany (a.k.a. bulk insert), one may loop through the tuples in an array and put everything to the database at once.

The final version of the database looks like this:

Tagged with: , , , ,