The following python code is initially created to practice SQL queries on four tables: beers(name, manf) -- beer name and beer manufacturer sells(bar, beer, price) - bar sell beer at price frequents(drinker, bar) - drinker frequently goes to bar likes(drinker, beer) - drinker like beer ------------------------------------- Files: sql_README.txt: this file sql_init_tables.py: create initial tables and their conent sql_display_table.py: show the content of a table sql_list_tables.py: list all tables in the database sql_run_query.py: run an SQL query statement sql_run_modification.py: run an SQL database modification statement ( create table, insert, delete, update an item, etc) ------------------------------------- To run the system, first run sql_init_tables.py ('python3 sql_init_tables.py') After that you can see the content of tables using sql_display_table.py python3 sql_display_table.py beer python3 sql_display_table.py sells python3 sql_display_table.py frequents python3 sql_display_table.py likes List all tables in the database with 'python3 sql_list_tables.py'. You can then put your SQL query on the four tables in a file (e.g. myquery.txt), run the query and see the output with the following command: python3 sql_run_query.py myquery.txt You can put SQL database modification statement in a file (e.g. a.txt), and run the statement with python3 sql_run_modification a.txt