| Lesson Plan |
| Grade: |
Date: 01/12/2025 |
| Subject: Information Communication Technology ICT |
| Lesson Topic: Be able to create and edit primary and foreign keys |
Learning Objective/s:
- Define primary and foreign keys and explain their roles in relational databases.
- Demonstrate how to create and edit primary keys using database design tools.
- Demonstrate how to create and edit foreign‑key relationships and enforce referential integrity.
- Identify and correct common key‑related errors such as duplicates, NULL values, and datatype mismatches.
- Apply knowledge by designing a simple two‑table database with correct key constraints.
|
Materials Needed:
- Computer lab with database software (e.g., MySQL Workbench or Access)
- Projector and screen
- Sample database files (Students & Enrollments tables)
- Worksheet with key‑creation tasks
- Whiteboard and markers
|
Introduction:
Begin with a quick poll: “What makes a record unique in a table?” Connect to prior lessons on tables and data types. Explain that today’s success criteria are to create and edit both primary and foreign keys correctly.
|
Lesson Structure:
- Do‑now (5') – Students answer three revision questions on primary/foreign keys displayed on the board.
- Mini‑lecture (10') – Concise explanation of key concepts, uniqueness rules, and referential integrity.
- Guided demonstration (15') – Teacher shows step‑by‑step creation of a primary key in the sample table, then edits it to a composite key.
- Paired activity (15') – Learners create a foreign key linking the Enrollments table to Students, then modify the foreign‑key constraint.
- Check for understanding (5') – Quick Kahoot quiz covering common errors and how to fix them.
- Summary & troubleshooting (5') – Review the key rules table and discuss typical mistakes.
|
Conclusion:
Recap the steps for creating and editing primary and foreign keys and highlight the importance of maintaining integrity. Students complete an exit ticket stating one error they might encounter and how to resolve it. For homework, they are to design a three‑table database with appropriate key constraints and document the steps.
|