Lesson Plan

Lesson Plan
Grade: Date: 17/01/2026
Subject: Computer Science
Lesson Topic: Show understanding of methods of file access
Learning Objective/s:
  • Describe sequential, direct, and indexed file access methods.
  • Compare the time‑complexity and storage overhead of each method.
  • Apply selection criteria to choose an appropriate access method for a given scenario.
  • Calculate the byte address of a fixed‑length record for direct access.
  • Outline the steps of an index lookup and its maintenance.
Materials Needed:
  • Projector and screen
  • Whiteboard and markers
  • Laptop with IDE (e.g., Python) for live demo
  • Handout summarising the three access methods and comparison table
  • Sample fixed‑length data file and a simple index file
  • Worksheet with scenario‑analysis tasks
Introduction:

Begin with a quick question: “How do you think a computer finds a specific record in a huge file?” Connect this to students’ prior experience with searching lists in code. Explain that today they will explore three systematic ways files are accessed and identify when each is most efficient.

Lesson Structure:
  1. Do‑now (5'): Short quiz on basic file concepts to activate prior knowledge.
  2. Mini‑lecture (10'): Introduce sequential, direct, and indexed access with the provided flowchart diagram.
  3. Guided demo (15'): Live coding – calculate a direct‑access address and read a sequential file in Python.
  4. Group activity (10'): Teams design a simple index for a sample dataset and map key → address.
  5. Whole‑class discussion (5'): Compare the three methods using the criteria list (query type, record size, file size, update frequency, storage).
  6. Check for understanding (5'): Exit‑ticket question – “Which access method would you choose for a payroll file and why?”
Conclusion:

Recap the key differences between sequential, direct, and indexed access, emphasizing their ideal use‑cases. Collect exit tickets to gauge understanding and assign a homework task: students must write a short program that implements direct access for a fixed‑length record file.