Students are given 5 minutes to create a superhero character using the online generator – a proviso is given that they must have at least one thing different from the person sitting next to them. Eg. No cape
These will be used later in the lesson.
Activity 1: Identifying Databases
Students are given 5 minutes to compile a list of all the different databases that they are aware of. After this, a class discussion can be used to compile a class list of different types of database and why they conform to the description of a database.
Teachers could highlight that databases can also be paper based, flat file, or can contain many tables of data.
Activity 2: Data Collection
Using their superheros as a basis, students collect information about 5 other student superheros. A short class Q&A allows students to identify their data collection as a flat file.
The collection slide indicates data types: teachers should draw attention to the different names of similar data types in a database vs programming language.
Activity 3: Physical Queries
Using the powerpoint slide, students are asked to stand up / sit down based on whether their superhero meets the design of the query. As the queries progress, these become more complex.
Teachers should highlight when AND and OR operators appear that these have moved into complex queries. Students should be given a chance to predict whether the data set returned will increase or decrease.
Activity 4: Database Creation
Students make use of example code to create their superhero database, add data, and run example queries.
*this activity may take place across several lessons to allow students sufficient time to practice their SQL – start students with example code, gradually removing the scaffolding to allow them to design their own queries.