This is a program that reads CSV files and interprets them in SQL, that is, from the CSV file it creates a database that can be manipulated with SQLite commands.
- Install Python 3.x
- Install the Python csv module
- Have SQLite3 installed
To run the program in Python and see the entire database, just run it in the terminal
python3 script.py
To execute in SQLite and be able to handle it and have more visualization options, execute it in the terminal
sqlite3 social.db
sqlite> .import filename.csv tablename
In our case we will put
sqlite> .import social.csv social
To see the contents of the table, run
sqlite> .shema
Repeat this process for each of the three CSV files. You will then be able to view the created tables with the following command:
sqlite> SELECT * FROM table_name;