Skip to content
Computer Science · Grade 11

Active learning ideas

Relational Databases: Introduction to SQL

Active learning works for this topic because students must visualize and manipulate data structures in real time to grasp abstract concepts like relationships and queries. Hands-on activities turn schema design and SQL commands from theoretical ideas into concrete, memorable experiences.

Ontario Curriculum ExpectationsCS.HS.D.5CS.HS.S.1
25–45 minPairs → Whole Class4 activities

Activity 01

Case Study Analysis30 min · Pairs

Pairs: ER Diagram Sketching

Pairs draw entity-relationship diagrams for a library system with books, authors, and borrowers. Identify entities, attributes, and relationships, then add primary keys. Share and refine with class feedback.

How does a relational database ensure data consistency across multiple tables?

Facilitation TipFor the ER Diagram Sketching activity, provide large chart paper and colored markers so pairs can clearly label entities, attributes, and relationship lines before sharing with the class.

What to look forPresent students with a simple scenario, such as a small bookstore with books and authors. Ask them to identify the entities, list key attributes for each, and draw a basic ERD showing the relationship between books and authors. Review their diagrams for correct identification of entities and relationships.

AnalyzeEvaluateCreateDecision-MakingSelf-Management
Generate Complete Lesson

Activity 02

Case Study Analysis45 min · Small Groups

Small Groups: SQL Query Relay

Groups receive a multi-table database on school events. Each member writes one SQL query (SELECT with JOIN, WHERE clause) to answer a prompt, then passes to the next. Test queries live and discuss results.

What are the ethical concerns regarding the centralized storage of personal data?

Facilitation TipDuring the SQL Query Relay, assign each group a unique starting query so their solutions differ, encouraging peer review and discussion of varied approaches.

What to look forProvide students with a table of student data (e.g., student ID, name, course ID, grade). Ask them to write a SQL query to select the names of all students who achieved a grade above 80%. Collect their queries to check for correct SELECT, FROM, and WHERE clause syntax.

AnalyzeEvaluateCreateDecision-MakingSelf-Management
Generate Complete Lesson

Activity 03

Case Study Analysis35 min · Whole Class

Whole Class: Schema Normalization Challenge

Project a sample unnormalized dataset on screen. Class votes on normalization steps to 3NF, then volunteers update a shared digital schema. Compare before-and-after redundancy.

How do we design a database schema that minimizes redundancy?

Facilitation TipFor the Schema Normalization Challenge, prepare three versions of the same schema (un-normalized, 2NF, 3NF) so students can compare storage efficiency and query speed side by side.

What to look forFacilitate a class discussion using the prompt: 'Imagine a social media platform stores all user data in one large database. What are the potential privacy risks? How could a well-designed database schema, with proper access controls and encryption, help mitigate these risks?' Guide students to consider data breaches, unauthorized access, and the importance of data minimization.

AnalyzeEvaluateCreateDecision-MakingSelf-Management
Generate Complete Lesson

Activity 04

Case Study Analysis25 min · Individual

Individual: Personal Data Query

Students create a simple SQLite database of their hobbies and friends. Write 3-5 SQL queries to filter and join data. Submit queries with screenshots of results.

How does a relational database ensure data consistency across multiple tables?

What to look forPresent students with a simple scenario, such as a small bookstore with books and authors. Ask them to identify the entities, list key attributes for each, and draw a basic ERD showing the relationship between books and authors. Review their diagrams for correct identification of entities and relationships.

AnalyzeEvaluateCreateDecision-MakingSelf-Management
Generate Complete Lesson

A few notes on teaching this unit

Teachers should start with concrete examples students recognize, like school rosters or social media friendships, before abstracting to ER diagrams. Avoid diving straight into complex joins; instead, scaffold from single-table queries to multi-table ones. Research shows students learn SQL best when they write queries to solve real problems, not just practice syntax in isolation.

Successful learning looks like students confidently modeling relationships between entities, writing accurate SQL queries with proper clauses, and justifying normalization choices with evidence from their work. They should explain why keys connect tables and how queries filter results precisely.


Watch Out for These Misconceptions

  • During the ER Diagram Sketching activity, watch for students who draw separate tables without connecting them with lines or keys.

    Circulate and ask each pair to explain how their entities relate, prompting them to add primary and foreign keys to show the connections clearly.

  • During the SQL Query Relay, watch for students who write queries that select all columns or all rows without using WHERE or JOIN clauses.

    Have groups test their queries on sample data and revise until they produce only the required results, using the relay format to encourage iterative improvement.

  • During the Schema Normalization Challenge, watch for students who insist that fully normalized schemas always perform better than denormalized ones.

    Guide the class to test both schemas with sample queries, timing the results and discussing trade-offs in storage versus speed for their specific use case.


Methods used in this brief