Exercise: Read CSV File, Write into Sqlite3 Database¶
Requirement¶
Based on the outcome from Exercise: Read CSV File, write two programs to manipulate a Sqlite3 database.
A program that creates a database schema. We need this as a separate program because we want to create the database once, and insert into it the contents of potentially many CSV files.
$ python create-schema.py /tmp/mydb.sqlite
Another program that inserts the contents of a CSV file into that database.
$ python stock-to-db.py stock.csv /tmp/mydb.sqlite