CAS Community   >   Resources   >  

Python SQL - Database Management System

A Python SQL database management system.

Chris Hall

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 for demonstration and debugging purposes with the students. I provided them with the ‘’ which they altered when moving on to create a relational database.

Downloaded 1632 times.


This resource has attached files: to access these files, please tick the box below to assent to the license terms
License: The resources on CAS website are under Creative Commons Attribution-Share Alike 3.0 licence unless otherwise specified by the resource creators.

You must confirm that you have read and agree the licence's ToS before you can download the attachments of this resource.

I have read the licence agreement of this resource and agree to abide by its terms and conditions.

Feedback and Comments

Available when logged in (join via the front page, for free):
  • View 2 comments on this resource.
  • View resource history, links to related resources.
  • Leave feedback for the author(s), or help by editing the resource.