A Python SQL database management system.
Created by Chris Hall
last edited Jan 30 2018 by Chris Hall
This is a text based menu driven database interface that handles the four SQL queries. I made this when developing resources for GCSE Computer Science both as a part of their general computational thinking and in preparation for the NEA. Please note this is NOT a solution - it provides the python and SQL skills necessary for students to start to create their own solutions, and stops short of the inner join.
The database is about items of food, but could be adapted for anything. When teaching this I spent some time on command line SQL first, up to and including the inner join, and then moved to making a text based menu in python. From here I used the worksheet (see ‘Using SQL in Python.pdf’) to help students make functions for each query.
I used the menu.py for demonstration and debugging purposes with the students. I provided them with the ‘create_table.py’ which they altered when moving on to create a relational database.