Technique – Database Machine
Summary of Technique
This technique uses the kinaesthetic learning approach. By manipulating the records of a paper database machine, pupils can gain an understanding of how SQL queries are executed.
This technique serves as an introduction to the SQL clauses that are generated by database management systems that provide a graphical interface for the generation of queries.
Exercise(s) for Teachers
Links to exercises will go here
Ways of Using the Technique in the Classroom
A class set of paper database machine is required – for a class with 20 learners, 10 database machines would be needed, with learners working in pairs. A number of suggested queries for demonstration purposes has been provided. The teacher should describe the purpose of an individual query before showing the SQL query on the board. Learners would then work in pairs to execute the SQL query using the database machine, first applying the WHERE clause, next applying any ORDER BY clause and finally, applying the SELECT clause.
Benefits for Learners
Learners gain an understanding of how SQL are executed. In particular, they learn that queries generate answer tables that are temporary and have no effect on the underlying base table. At N5 level, the technique is extremely useful for showing learners how complex sorts are applied to answer tables; at Higher level, the technique is useful for showing learners how aggregate functions are applied and for demonstrating the need for sub-queries.
Tips for Creating New Exercises
It should be straight forward for teachers to create additional queries based on the COMPUTER table, the ATHLETE table or the COUNTRY table provided in the resources. Alternatively, teachers could create additional tables of data and simple queries based on those tables.