OST Lesson Plan
OST Lesson Plan
Open Source, open source vs commercial software, what is Linux, Free Software, Where I can use
Linux, Linux kernel, Linux distributions.
Unit II - Linux commands and Unix (6 Hrs)
Introduction - Linux Essential Commands, File System concept, Standard Files, The Linux Security
Model, Introduction to Unix, Unix Components Unix Files, File Attributes and Permission,
Standard I/O, Redirection, Pipes and Filters, Grep and Stream Editor.
Unit III – Apache (6 Hrs)
Introduction - Apache Explained, Starting, Stopping and Restarting Apache, Modifying the
Default configuration, Securing Apache, Set user and Group.
Unit IV- My SQL (6 Hrs)
Introduction to My SQL- The show databases and table, The USE command,Create Database
and Tables, Describe Table, Select, Insert, Update and Delete statement database.
Unit V – PHP (6 Hrs)
Introduction, PHP Form processing, Database Access with PHP, My SQL, My SQL Functions,
Inserting Records, Selecting Records, Deleting Records, Update Records.
Sl. Duration
No. Topics Covered (Hours)
Introduction to MySQL & The SHOW DATABASES and SHOW TABLES
1 commands 1
2 The USE command & CREATE DATABASE 1
3 CREATE TABLE 1
4 DESCRIBE TABLE & SELECT Statement (Basics) 1
5 INSERT Statement 1
6 UPDATE and DELETE Statements 1
Section Details
Lesson Objectives 1. Define open source and its key characteristics.
2. Compare open source and proprietary software.
3. Identify widely used open source software.
4. Explain the advantages and challenges of open source
development.
Section Details
5. Discuss the community's role in open source
contribution.
After completion of the lesson, students will be able to:
✔ Define "open source"
✔ Name three open source software applications
Lesson Outcomes ✔ Explain the difference between open and closed source
software
✔ Describe benefits like cost-saving and flexibility
✔ Evaluate its relevance in modern development
✔ Interactive Lecture
✔ Visual Aids and Live Demo
Methods of Pedagogy
✔ Peer Discussion
✔ Think-Pair-Share activity
✔ PowerPoint Presentation
✔ Board/Markers
Teaching Tools
✔ Video clips on open source
✔ Web demo of GitHub or Moodle
Begin with a short quiz: “Which browser do you use?”
(Chrome, Firefox, Safari?)
Motivation/Introducing the topic (5
Then pose: “Do you know some of them are open
mins)
source?”
Introduce how open source affects our daily digital life.
✔ What is Open Source?
✔ Origin and development of the concept
✔ Open Source vs Proprietary Software
✔ Open source licenses (e.g., MIT, GPL)
✔ Key examples: Linux, Firefox, LibreOffice, Python
Content Presentation – Key Points
✔ Benefits: Free to use, Customizable, Secure,
(40 mins)
Community-driven
✔ Limitations: Less support, Compatibility issues,
Learning curve
✔ Case Study: GitHub and Moodle as educational open
source platforms
1. What does “open source” mean?
✅ D. Expensive C. Licensed only B. Source code
is accessible A. Free to useAnswer: B (Remembering)
Section Details
1. Understand the concept and philosophy of Free Software.
2. Differentiate between Free Software and Open Source
Software.
Lesson Objectives
3. Identify examples of Free Software.
4. Explain the Four Essential Freedoms of Free Software.
5. Appreciate the role of the Free Software Foundation (FSF).
After the lesson, students will be able to:
✔ Define “Free Software” in their own words
✔ List and explain the four freedoms
Lesson Outcomes ✔ Compare Free Software and proprietary software
✔ Mention key Free Software examples
✔ Discuss the impact of Free Software on society and
education
✔ Direct Instruction
✔ Video Presentation
Methods of Pedagogy
✔ Group Comparison Activity
✔ Case-based Discussion
✔ PPT Slides
✔ Short video on Richard Stallman and FSF
Teaching Tools
✔ Whiteboard for comparing terms
✔ Internet-connected PC for real-time examples
Ask students: “Would you like to share or modify the
software you use?”
Motivation/Introducing the topic
Introduce how Free Software grants this freedom.
(5 mins)
Show logos of popular Free Software (e.g., GNU, VLC) to
spark interest.
✔ Definition of Free Software (freedom, not price)
✔ The Four Essential Freedoms:
1. Use
2. Study
3. Modify
Content Presentation – Key
4. Share
Points (40 mins)
✔ History and vision of Richard Stallman and FSF
✔ Free Software vs Proprietary Software
✔ Free Software vs Open Source Software
✔ Common examples: GNU/Linux, GIMP, VLC
✔ Importance in education, transparency, and innovation
Assessment (5 mins) 1. What is Free Software mainly about?
Multiple Choice Questions with ✅ D. Free to use only C. Free to uninstall B. Free to
Answers (Bloom’s Taxonomy) share A. Free of costAnswer: B (Understanding)
Section Details
1. Define open source and commercial software.
2. Identify the key differences between open source and
commercial software.
Lesson Objectives 3. Compare the advantages and disadvantages of both.
4. Explain usage scenarios where each is preferable.
5. Encourage critical thinking on software choice in real-
world applications.
After the lesson, students will be able to:
✔ Define and differentiate between open source and
commercial software
Lesson Outcomes ✔ List examples of both types
✔ Explain the licensing, cost, and support aspects
✔ Analyze situations to choose suitable software
✔ Debate the value of openness versus proprietary control
✔ Lecture with visual aids
✔ Venn diagram comparison
Methods of Pedagogy
✔ Think-Pair-Share Activity
✔ Group Discussion with Case Studies
✔ PPT with comparison chart
✔ Whiteboard and markers
Teaching Tools
✔ Internet demo of GitHub and Microsoft software
✔ Short video or infographic
Motivation/Introducing the topic Ask: “Have you ever used VLC Media Player or MS
(5 mins) Office?”
Section Details
Lead into: “One is open source, one is commercial. Let’s
find out the difference.”
Show icons/logos for instant recognition.
✔ Definitions:
• Open Source: Source code is freely available
• Commercial: Developed for sale/profit
✔ Licensing: Free licenses vs. paid/proprietary
✔ Examples:
• Open Source: Linux, VLC, LibreOffice
Content Presentation – Key Points
• Commercial: Windows, MS Office, Adobe Photoshop
(40 mins)
✔ Cost: Free vs Paid
✔ Flexibility: Modifiable vs Restricted
✔ Support: Community-based vs Vendor-based
✔ Security and Updates
✔ Use Cases: Personal, educational, business, enterprise
✔ Debate: Which is better? Why?
1. What is a key feature of open source software?
✅ D. No user guide C. Source code available B.
Expensive A. Limited useAnswer: C (Understanding)
Section Details
Lesson Objectives 1. Introduce the concept of the Linux operating system.
2. Explain the history and evolution of Linux.
3. Identify the features and advantages of Linux.
4. Compare Linux with other operating systems like
Section Details
Windows and macOS.
5. Explore common Linux distributions.
After the lesson, students will be able to:
✔ Define Linux and its purpose
✔ Describe its history and founder
Lesson Outcomes ✔ List key features and benefits
✔ Compare Linux with proprietary OS
✔ Identify popular Linux distributions (Ubuntu, Fedora,
Debian, etc.)
✔ Lecture and Demonstration
✔ Q&A and discussion
Methods of Pedagogy
✔ Real-time Linux interface demo
✔ Visual aids like OS comparison charts
✔ PPT with diagrams and screenshots
✔ Demo using a live Linux distribution (Ubuntu via
Teaching Tools USB or VirtualBox)
✔ Internet access for showing Linux interface
✔ Short introductory video on Linux
Ask: “Have you ever heard of Linux? Have you used
Android or smart TVs?”
Motivation/Introducing the topic (5 Explain: “Linux powers many devices you use every
mins) day!”
Show Linux mascot (Tux) and briefly share its free,
open-source nature.
✔ Definition of Linux: Free and open-source OS
✔ History: Created by Linus Torvalds in 1991
✔ Features:
• Stability
• Security
Content Presentation – Key Points
• Customizability
(40 mins)
✔ Differences from Windows/macOS
✔ Use Cases: Servers, desktops, IoT, embedded devices
✔ Common distributions (Ubuntu, Debian, Fedora, Mint)
✔ Linux file system basics (optional intro)
✔ Real-life demo (login, interface, basic commands)
1. What is Linux?
✅ D. A database C. An operating system B. A
type of virus A. A programming languageAnswer: C
(Remembering)
Section Details
1. Understand what a kernel is and its role in an operating
system.
2. Define the Linux kernel and explain its functions.
3. Explore the architecture and components of the Linux
Lesson Objectives kernel.
4. Identify the difference between kernel and operating
system.
5. Discuss real-world applications and importance of the
Linux kernel.
After the lesson, students will be able to:
✔ Define the term “kernel”
✔ Explain the functions of the Linux kernel
Lesson Outcomes ✔ Differentiate between Linux and Linux kernel
✔ Identify the components of the Linux kernel
✔ Discuss why the kernel is crucial for system
performance and security
✔ Lecture
✔ Diagram-based explanation
Methods of Pedagogy
✔ Use of animations or short videos
✔ Group discussion and quiz
✔ PowerPoint with kernel architecture diagrams
✔ Short video on how the kernel works
Teaching Tools ✔ Whiteboard for step-by-step explanation
✔ Demo showing system process with terminal
commands (uname, top, etc.)
Ask: “What happens when you press a key or open a file
on your computer?”
Motivation/Introducing the topic (5
Then say: “There’s a program inside your OS that
mins)
manages all this — it’s called the kernel.”
Show visual: Application → OS → Kernel → Hardware
✔ What is a kernel?
✔ Linux kernel: Developed by Linus Torvalds (1991)
✔ Role: Bridge between hardware and software
✔ Functions:
• Process management
• Memory management
Content Presentation – Key Points • Device management
(40 mins) • System calls
✔ Components:
• Monolithic kernel (used in Linux)
• Kernel modules
✔ Linux vs Linux Kernel (Distinction)
✔ Real-world devices using Linux kernel: Android,
routers, servers
Section Details
1. What is the Linux kernel?
✅ D. A game engine C. The core part of the OS B.
A word processor A. A desktop environmentAnswer: C
(Remembering)
Section Details
1. Understand what a Linux distribution is.
2. Identify major Linux distributions and their purposes.
3. Learn how different distributions are customized for
users and tasks.
Lesson Objectives
4. Explore various fields and platforms where Linux is
used.
5. Encourage students to explore a Linux distribution
suitable for their needs.
After the lesson, students will be able to:
✔ Define a Linux distribution
✔ Name common Linux distributions and their uses
✔ Understand differences between Ubuntu, Fedora,
Lesson Outcomes Debian, etc.
✔ Describe where Linux is used: servers, desktops,
mobiles, etc.
✔ Match distributions to use-cases (education, enterprise,
security, etc.)
Methods of Pedagogy ✔ Direct Instruction
Section Details
✔ Distribution comparison chart
✔ Interactive Q&A
✔ Real-world examples and demos
✔ PPT with icons/logos
✔ Internet access to explore distro websites (e.g.,
ubuntu.com)
Teaching Tools
✔ YouTube video showing Linux in different
environments
✔ Live demo of any Linux distribution
Ask: “Do all Android phones, smart TVs, and servers use
the same Linux?”
Motivation/Introducing the topic (5
Say: “No — they use different versions of Linux, called
mins)
distributions.”
Show logos like Ubuntu, Kali, Red Hat to spark curiosity.
✔ What is a Linux Distribution?
✔ Why there are many distributions?
✔ Components included: Kernel + software + package
manager
✔ Major Distributions:
• Ubuntu – user-friendly, desktop use
• Debian – stable base for other distros
• Fedora – cutting-edge features
Content Presentation – Key Points • CentOS/Red Hat – enterprise use
(40 mins) • Kali Linux – cybersecurity
• Linux Mint – for Windows users
✔ Where is Linux used?
• Desktops and laptops
• Web servers (Apache, Nginx)
• Android phones
• IoT devices
• Supercomputers
• Education and government sectors
1. What is a Linux distribution?
✅ D. An internet protocol C. A version of Linux OS
with added features B. A game software A. A hardware
deviceAnswer: C (Understanding)
Section Details
1. Understand the purpose and syntax of basic Linux
commands.
2. Learn how to navigate the Linux file system using the
Lesson Objectives
command line.
3. Practice frequently used commands for files and
directories.
After the lesson, students will be able to:
✔ Use the terminal to navigate directories
Lesson Outcomes
✔ Execute basic file operations (create, move, delete)
✔ Access command help using man and --help
✔ Hands-on demonstration in terminal
✔ Guided practice with step-by-step tasks
Methods of Pedagogy
✔ Visual explanation and discussion
✔ Real-time system navigation
✔ Linux terminal (live system or virtual machine)
✔ Command cheatsheet handout
Teaching Tools
✔ Projector for demo
✔ Whiteboard for command structure
Ask: “Can we use a computer without a mouse?”
Motivation/Introducing the Topic Demonstrate typing ls, cd, and pwd live.
(5 mins) Explain how command-line skills are essential for system
administration, scripting, and automation.
✔ What is the command line/terminal?
✔ Command format: command [options] [arguments]
✔ Basic navigation commands:
• pwd – Print working directory
• ls – List files
• cd – Change directory
Content Presentation – Key Points
✔ File/directory commands:
(40 mins)
• mkdir, rmdir – Create/remove directories
• cp, mv, rm, touch – File operations
✔ Help commands:
• man, --help
✔ Useful extras:
• clear, whoami, date, cal, tab completion
Assessment (5 mins) 1. Which command shows your current directory?
MCQs with Answers A. cdB. lsC. pwdD. mkdir✅C (Remembering)
2. What does mkdir do?
✅C (Understanding) D. Shows the date C. Makes a
directory B. Lists a file A. Deletes a file
3. What is the purpose of man?
Section Details
✅B (Understanding) D. Creates users C. Moves a
file B. Views manual pages A. Opens games
4. How to delete a file in Linux?
A. mvB. rmC. touchD. ls✅B (Applying)
5. Which command lists files in a directory?
A. lsB. pwdC. echoD. whoami✅A
(Remembering)
✔ Recap of command usage with live Q&A
✔ Ask students to try a short command sequence (e.g.,
Summing Up (5 mins)
create a folder, move a file)
✔ Reinforce man and --help for self-learning
🔹 Slow Learners:
✔ Share video tutorials and command list
✔ Practice with simple command exercises
✔ Use flowcharts for command structure
Follow-up Work (5 mins)
🔹 Advanced Learners:
✔ Explore file search (find, locate)
✔ Chain commands using &&
✔ Try command combinations to automate file operations
Section Details
1. Understand the structure and organization of the Linux file
system.
2. Learn the purpose of standard directories like /home, /etc,
Lesson Objectives /bin, etc.
3. Differentiate between absolute and relative paths.
4. Use basic commands to navigate and inspect the file
system.
After the lesson, students will be able to:
✔ Explain Linux directory structure
Lesson Outcomes ✔ Identify and describe the use of standard files/directories
✔ Use absolute and relative paths to access files
✔ List contents and navigate directories using commands
✔ Chalk & talk with visual directory tree
✔ Hands-on navigation in terminal
Methods of Pedagogy
✔ Peer quiz and discussion
✔ Real system exploration
✔ Whiteboard (for directory tree drawing)
✔ Linux terminal
Teaching Tools
✔ Slides showing directory hierarchy
✔ Directory visualization tool (optional)
Ask: “Where do you store your documents or downloads in
Windows?”
Motivation/Introducing the Topic
Then show how Linux also has folders – but with different
(5 mins)
names and purposes.
Display a diagram of the root (/) and its subfolders.
Content Presentation – Key ✔ Linux follows a hierarchical file system
Points (40 mins) ✔ All files/directories start from root /
✔ Common directories:
• /bin – essential binaries
• /home – user folders
• /etc – configuration files
• /var – variable data (logs, mail)
• /tmp – temporary files
• /dev, /proc – virtual file systems
Section Details
✔ File and directory navigation:
• cd, ls, pwd
✔ Path types:
• Absolute (starts from /)
• Relative (based on current location)
1. What is the top-most directory in Linux?
A. /etcB. /homeC. /D. /root✅C
(Remembering)
2. Which directory stores user home folders?
A. /varB. /binC. /etcD. /home✅D
(Understanding)
Assessment (5 mins) 3. What does /etc contain?
MCQs with Answers ✅C (Understanding) D. Games C. Configuration
files B. User files A. Executable files
4. Which command shows the current path?
A. cdB. lsC. pwdD. mv✅C (Remembering)
5. Which of the following is an absolute path?
A. Documents/test.txtB. ./home/userC.
/home/user/test.txtD. ../bin✅C (Applying)
✔ Summarize directory names and purposes
Summing Up (5 mins) ✔ Highlight importance of organized file system
✔ Ask a student to draw a sample directory tree on the board
🔹 Slow Learners:
✔ Share printed directory chart
✔ Use file explorer-style apps (like Nautilus) for visual
understanding
✔ Practice cd and ls with guidance
Follow-up Work (5 mins)
🔹 Advanced Learners:
✔ Explore /proc and /dev virtual files
✔ Use tree command to print file structure
✔ Create their own nested directories using mkdir -p
Section Details
1. Understand how security is implemented in the Linux
environment.
Lesson Objectives 2. Learn about users, groups, and file permissions.
3. Explore the role of the root user and restricted access.
4. Introduce the concept of sudo and privilege escalation.
After the lesson, students will be able to:
✔ Explain how user and group-based security works in Linux
✔ Identify the need for file permissions and access control
Lesson Outcomes ✔ Use commands to view and change permissions (chmod,
chown)
✔ Understand the concept of administrative privileges (root,
sudo)
✔ Explanation using examples
✔ Hands-on file permission changes
Methods of Pedagogy
✔ Role-play: regular user vs root
✔ Interactive Q&A
✔ Linux system (live or VM)
✔ Slides on permission structure
Teaching Tools
✔ Whiteboard for rwx permission explanation
✔ Terminal emulator
Motivation/Introducing the Ask: “Can everyone on your system read your files?”
Topic (5 mins) Lead into: “Linux has a model to make sure that doesn't
Section Details
happen.”
Demonstrate real-time how a user can be denied access
without permission.
✔ Linux is multi-user and secure by design
✔ Concepts:
• Users and Groups
• File ownership
Content Presentation – Key • Permissions (r, w, x) – read, write, execute
Points (40 mins) ✔ Viewing permissions: ls -l
✔ Changing permissions: chmod, chown, chgrp
✔ Special permissions (intro only): SUID, GUID, sticky bit
✔ The root user – superuser
✔ Using sudo safely – delegated admin access
1. What does ‘rwx’ stand for in file permissions?
✅A (Remembering) D. None C. Run, Work, Exit B.
Root, Write, Exit A. Read, Write, Execute
2. Which command changes file permissions?
A. chmodB. chownC. lsD. pwd✅A
(Understanding)
3. Who is the superuser in Linux?
Assessment (5 mins)
✅C (Remembering) D. Sudo C. Root B. User A.
MCQs with Answers
Admin
4. What does sudo allow a user to do?
✅C (Applying) D. Share password C. Perform admin
tasks temporarily B. Browse files A. Shutdown only
5. Which command shows file ownership?
A. whoamiB. ls -lC. pwdD. echo✅B
(Understanding)
✔ Recap:
– Permissions protect files
– Users and groups control access
Summing Up (5 mins)
– root and sudo offer higher privileges
✔ Quiz students: “How would you prevent someone from
deleting your file?”
🔹 Slow Learners:
✔ Use color-coded permission charts
✔ Repeat command exercises with help
✔ Watch animated explainer videos
Follow-up Work (5 mins)
🔹 Advanced Learners:
✔ Explore /etc/passwd, /etc/group files
✔ Practice permission masking with umask
✔ Try using sudo with apt commands for installations
Section Details
1. Understand what Unix is and its historical background.
2. Identify the major components of the Unix operating
system.
Lesson Objectives
3. Explain how Unix influenced modern operating systems
including Linux.
4. Recognize the key philosophies behind Unix design.
Lesson Outcomes After the lesson, students will be able to:
✔ Define Unix and describe its evolution
✔ Identify major components like kernel, shell, and file
system
✔ Compare Unix and Linux in terms of structure
✔ Appreciate Unix principles: simplicity, modularity, and
Section Details
reusability
✔ Lecture with visual timelines
✔ Chalkboard explanation of architecture
Methods of Pedagogy
✔ Case discussion: Unix’s influence on Linux and macOS
✔ Group quiz and interaction
✔ PPT slides with Unix timeline and structure diagram
✔ Videos on Unix history (e.g., AT&T Bell Labs)
Teaching Tools
✔ Whiteboard drawing of Unix architecture
✔ Unix-based system demo (if available)
Ask: “Do you know what came before Linux?”
Motivation/Introducing the Topic
Show logos of Linux and macOS – both Unix-based.
(5 mins)
Prompt: “Let’s learn about the father of Linux – Unix.”
✔ What is Unix?
✔ Developed in 1969 at Bell Labs by Ken Thompson &
Dennis Ritchie
✔ Written in C for portability
✔ Components of Unix:
• Kernel – core management
Content Presentation – Key
• Shell – command interpreter
Points (40 mins)
• File System – hierarchical structure
✔ Unix Philosophy:
• “Do one thing and do it well”
• Small tools, pipelines
✔ Influence on Linux, BSD, and macOS
✔ Unix vs Linux (ownership, licensing, community)
1. Who developed Unix?
C. Dennis Ritchie B. Bill Gates A. Linus Torvalds & ✅C
(Remembering) D. Steve Jobs Ken Thompson
2. Which language was Unix rewritten in for portability?
✅D (Remembering) D. C C. Assembly B. Python
A. Java
3. Which is a component of Unix OS?
Assessment (5 mins)
✅B (Understanding) D. Photoshop C. Excel B.
MCQs with Answers
Shell A. Browser
4. What does the Unix philosophy suggest?
✅C (Analyzing) D. Use GUI only C. Do one thing
well B. Avoid scripting A. Build one big tool
5. Which OS was inspired by Unix?
✅C (Understanding) D. Android C. Linux B. MS-
DOS A. Windows
✔ Recap:
– Unix laid the foundation for modern OS
– Modular design, powerful shell, portability
Summing Up (5 mins)
– Linux is Unix-like and carries its design
✔ Ask: “Which Unix principle is visible in Linux
commands?”
🔹 Slow Learners:
✔ Use simple comparison charts (Unix vs Linux)
✔ Share timeline handouts
✔ Provide glossary of terms like “kernel”, “shell”
Follow-up Work (5 mins)
🔹 Advanced Learners:
✔ Read Unix manual pages (man) for classic tools
✔ Explore BSD systems or macOS terminal
✔ Research Unix directory hierarchy (/etc, /usr, etc.)
🔹 Advanced Learners:
✔ Practice with special permissions (SUID, SGID)
✔ Explore default permissions using umask
✔ Try scripting permission checks using find and stat
Lesson Plan – Topic 6: Standard I/O, Redirection, Pipes, Filters, Grep, and
Stream Editor
Section Details
1. Understand standard input/output and error streams in
Linux.
Lesson Objectives 2. Learn how to redirect output/input using symbols like
>, >>, <, and 2>.
3. Use pipes (`
After the lesson, students will be able to:
✔ Describe standard I/O, output redirection, and error
handling
Lesson Outcomes ✔ Combine commands using pipes
✔ Filter text using basic Linux tools
✔ Use grep to search text
✔ Use sed to edit streams of data
✔ Demonstration with examples
✔ Guided lab practice
Methods of Pedagogy
✔ Real-time use cases
✔ Explain via input-output flow diagrams
✔ Linux terminal
✔ Projector with live command output
Teaching Tools
✔ Pre-prepared text files for filtering/search
✔ PPT with I/O flow diagrams
Ask: “How would you find a word in hundreds of lines
of text?”
Motivation/Introducing the Topic (5
Show how grep can instantly highlight it.
mins)
Prompt: “Linux has tools to process data quickly and
efficiently.”
✔ What are standard input (stdin), output (stdout),
and error (stderr)?
✔ Redirection symbols:
Content Presentation – Key Points (40 • > overwrite output
mins) • >> append output
• < input redirection
• 2> redirect error
✔ Pipes (`
1. What symbol is used for output redirection in
Assessment (5 mins)
Linux?
MCQs with Answers
A. <B. `
✔ Recap:
– Use of I/O redirection (>, <, 2>, etc.)
Summing Up (5 mins) – Filters help manipulate text output
– grep and sed are powerful tools for automation
✔ Demonstrate a complete pipe-filter example live
Follow-up Work (5 mins) 🔹 Slow Learners:
✔ Use visuals to show I/O flow
✔ Break down command parts with explanation
✔ Provide basic practice worksheet
🔹 Advanced Learners:
Section Details
✔ Explore regular expressions in grep and sed
✔ Create pipelines for log file analysis
✔ Automate filters using shell scripts
Section Details
1. Understand what Apache HTTP Server is and its role in
web hosting.
2. Learn about the history, purpose, and key features of
Lesson Objectives
Apache.
3. Recognize Apache’s importance in the LAMP stack and
open-source web infrastructure.
After the lesson, students will be able to:
✔ Define Apache and describe its function in a web
environment
Lesson Outcomes
✔ Explain how Apache serves web content over
HTTP/HTTPS
✔ Identify where Apache is used and why it's popular
✔ Lecture with visual support
Methods of Pedagogy ✔ Interactive discussion
✔ Demonstration via browser/server example
✔ PPT on Apache overview
Teaching Tools ✔ Linux machine or VM with Apache installed
✔ Web browser for testing server response
Ask: “How does your browser load a webpage?”
Explain: “There’s a web server like Apache working in the
Motivation/Introducing the Topic
background.”
(5 mins)
Briefly show http://localhost to demonstrate Apache is
working.
✔ What is a web server?
✔ Apache HTTP Server – developed by the Apache
Software Foundation
Content Presentation – Key Points ✔ Free and open-source
(40 mins) ✔ Supports static and dynamic web content
✔ Apache’s architecture and process-based model
✔ Use cases in real-world web hosting
✔ Role in the LAMP stack (Linux, Apache, MySQL, PHP)
1. What is Apache?
✅B (Remembering) D. An OS C. A browser B. A
web server A. A database
2. Which organization maintains Apache?
✅C (Understanding) D. Mozilla C. Apache Software
Foundation B. Microsoft A. Google
Assessment (5 mins) 3. Apache mainly serves what content?
MCQs with Answers ✅C (Applying) D. Databases C. Web pages B.
Files A. Videos
4. In which stack is Apache commonly found?
✅C (Remembering) D. XAMP C. LAMP B.
MEAN A. WAMP
5. Which port is used by default for HTTP in Apache?
✅C (Understanding) D. 443 C. 80 B. 25 A. 22
✔ Summarize what Apache does
Summing Up (5 mins) ✔ Revisit: Apache serves websites over HTTP
✔ Encourage students to explore their local Apache setup
Follow-up Work (5 mins) 🔹 Slow Learners:
✔ Provide a flowchart of how HTTP requests are processed
✔ Share video explaining Apache basics
✔ Let them access a sample static HTML page on localhost
Section Details
🔹 Advanced Learners:
✔ Research major websites using Apache
✔ Explore alternatives: Nginx, LiteSpeed
✔ Study Apache’s modular structure (optional intro)
Section Details
1. Understand the control mechanism for managing Apache
server processes.
2. Learn how to start, stop, and restart the Apache service.
Lesson Objectives
3. Explore system service management using systemctl or
service commands.
4. Check the status of Apache after command execution.
After the lesson, students will be able to:
✔ Use terminal commands to control the Apache service
Lesson Outcomes
✔ Check the active status and error logs
✔ Troubleshoot common service start/stop issues
✔ Demonstration with command-line interface
✔ Practice-based learning
Methods of Pedagogy
✔ Real-time debugging scenario
✔ Pair-based terminal tasks
✔ Linux VM or system with Apache installed
✔ Terminal access
Teaching Tools
✔ PPT with command explanation and screenshots
✔ systemctl or service commands
Ask: “What if your website doesn’t load?”
Motivation/Introducing the
Discuss how web servers need to be actively running.
Topic (5 mins)
Explain: “Let’s learn how to manage Apache as a service.”
✔ Understanding system services in Linux
✔ Starting Apache:
• sudo systemctl start apache2 or sudo service
apache2 start
✔ Stopping Apache:
• sudo systemctl stop apache2
Content Presentation – Key ✔ Restarting Apache:
Points (40 mins) • sudo systemctl restart apache2
✔ Checking status:
• sudo systemctl status apache2
✔ Reload vs restart (intro): reload reloads config without
disconnecting users
✔ Viewing Apache logs for errors:
/var/log/apache2/error.log
Assessment (5 mins) 1. Which command starts the Apache service?
MCQs with Answers A. start apacheB. apache2 runC. sudo systemctl
start apache2D. launch apache✅C (Remembering)
2. What does sudo systemctl restart apache2 do?
✅C (Understanding) D. Kills all user sessions C. Restarts
Apache service B. Closes the browser A. Reloads Apache
3. Which command checks if Apache is running?
A. ls apache2B. sudo apache statusC. sudo
systemctl status apache2D. ping apache✅C
(Applying)
4. What does sudo systemctl stop apache2 do?
✅B (Remembering) D. Opens index.html C. Configures
server B. Stops the server A. Starts the Apache server
5. Where can you find Apache error logs?
A. /home/logB. /etc/apache2/conf.dC.
Section Details
/var/log/apache2/error.logD. /usr/bin/apache✅C
(Analyzing)
✔ Recap commands: start, stop, restart, status
✔ Reemphasize: controlling the Apache process is essential for
Summing Up (5 mins)
server stability
✔ Let students practice on a test server
🔹 Slow Learners:
✔ Step-by-step command handout
✔ Use screenshots with before/after results
✔ Repeat using service-based syntax (service apache2
start)
Follow-up Work (5 mins)
🔹 Advanced Learners:
✔ Automate restart with a shell script
✔ Use watch to monitor Apache status
✔ Explore service dependencies using systemctl list-
dependencies apache2
Section Details
1. Understand the location and structure of Apache
configuration files.
2. Learn how to safely edit the main configuration file
Lesson Objectives
(apache2.conf) and default site file (000-default.conf).
3. Modify key directives like DocumentRoot, ServerName, and
Directory.
After the lesson, students will be able to:
✔ Locate and open Apache config files
Lesson Outcomes ✔ Understand the purpose of key configuration directives
✔ Modify basic configurations and restart Apache to apply
changes
✔ Live editing demo
✔ Command line practice
Methods of Pedagogy
✔ Guided config walkthrough with discussion
✔ Use of sample configuration cases
✔ Linux machine with Apache
✔ Text editor: nano, vim, or gedit
Teaching Tools
✔ Visual guide (slides or whiteboard) of file structure
✔ Backup copies of config files
Ask: “Where is your website stored?”
Motivation/Introducing the Demonstrate how Apache reads settings from config files.
Topic (5 mins) Prompt: “Let’s learn how to change where Apache looks and
what it displays.”
✔ Apache config file structure:
• Main config: /etc/apache2/apache2.conf
• Site config: /etc/apache2/sites-available/000-
default.conf
✔ Important directives:
Content Presentation – Key • DocumentRoot – folder for website files
Points (40 mins) • ServerName – domain or hostname
• <Directory> block – control access
✔ Safely editing configs:
• Backing up before editing
• Syntax check with apachectl configtest
✔ Restarting or reloading Apache to apply changes
Assessment (5 mins) 1. Which file is Apache’s main configuration file?
MCQs with Answers A. httpd.confB. apache2.confC. index.htmlD.
config.txt✅B (Remembering)
Section Details
2. What does the DocumentRoot directive specify?
✅C (Understanding) D. Apache port C. Web content
folder B. Log folder A. Admin password
3. Which command checks Apache config syntax?
A. apache2 -runB. nano apache.confC. apachectl
configtestD. ls -l /etc/apache2✅C (Applying)
4. What should you do before editing a config file?
✅B (Understanding) D. Rename Apache C. Restart PC
B. Backup the file A. Delete it
5. What is the effect of editing 000-default.conf?
✅C (Analyzing) D. Disables Apache C. Updates default
site settings B. Changes global rules A. Changes log
location
✔ Recap:
– Apache uses .conf files to control its behavior
Summing Up (5 mins) – DocumentRoot tells Apache where to find your website
✔ Encourage students to make one small config change and test
it
🔹 Slow Learners:
✔ Provide annotated sample config file
✔ Use GUI editors for visibility
✔ Repeat simple modifications
Follow-up Work (5 mins)
🔹 Advanced Learners:
✔ Add a new <Directory> block with custom options
✔ Modify ServerName and use /etc/hosts for local testing
✔ Enable and test multiple site configs using a2ensite
Section Details
1. Explore advanced Apache configuration options.
2. Learn to set up custom error pages and directory listing
behavior.
Lesson Objectives
3. Understand and modify the AllowOverride, Options, and
IndexOptions directives.
4. Enable configuration changes through .htaccess.
After the lesson, students will be able to:
✔ Customize user experience with error documents
Lesson Outcomes ✔ Control directory browsing and listing
✔ Enable or disable overrides using .htaccess
✔ Apply changes through site-specific configuration
✔ Advanced walkthrough with real-time file edits
✔ Error simulation (404, 403, etc.)
Methods of Pedagogy
✔ Small group config labs
✔ Instructor-led testing of browser behavior
✔ Apache server with sample site
✔ Text editor (nano, vim)
Teaching Tools
✔ Sample HTML error pages
✔ PPT with directive breakdown
Ask: “What do you see when a page isn’t found on a website?”
Motivation/Introducing the Show default vs. custom 404 page.
Topic (5 mins) Prompt: “Let’s learn how to give users a better experience
when errors happen.”
Content Presentation – Key ✔ Setting up custom error pages:
Points (40 mins) • Example: ErrorDocument 404 /errors/404.html
✔ Directory listing control:
• Options Indexes, Options -Indexes
Section Details
✔ Fine-tuning with IndexOptions
✔ Controlling override permissions:
• AllowOverride None / All for .htaccess
✔ Using .htaccess:
• Creating and placing .htaccess
• Enabling override in site config
✔ Testing and reloading Apache to apply changes
1. Which directive is used to allow use of .htaccess files?
A. OptionsB. IndexOptionsC. AllowOverrideD.
Redirect✅C (Understanding)
2. What does Options -Indexes do?
✅B (Analyzing) D. Enables custom URLs C. Changes
server port B. Prevents directory listing A. Enables CGI
scripts
3. What is the purpose of ErrorDocument 404 /404.html?
Assessment (5 mins)
✅C (Applying) D. Set permissions C. Display a custom
MCQs with Answers
404 error page B. Disable Apache A. Show homepage
4. What file is used for per-directory configuration?
A. config.txtB. default.confC. .htaccessD.
server.sh✅C (Remembering)
5. What must be enabled in Apache config to use
.htaccess?
A. EnableLocalhostB. AllowOverride AllC.
StartHtaccessD. AuthConfig On✅B (Applying)
✔ Recap:
– Apache allows customization of behavior through config
files
Summing Up (5 mins)
– .htaccess lets you apply changes per directory
– Custom error pages improve user experience
✔ Encourage hands-on testing with browser
🔹 Slow Learners:
✔ Use step-by-step screenshots
✔ Provide sample .htaccess files to copy and try
✔ Simplify exercises (404 page only)
Follow-up Work (5 mins)
🔹 Advanced Learners:
✔ Create custom error pages for 403, 500
✔ Test .htaccess for redirects and security
✔ Explore mod_rewrite with .htaccess (optional preview)
Section Details
1. Understand common Apache vulnerabilities and security
risks.
2. Learn to implement basic security configurations to protect
Lesson Objectives
Apache servers.
3. Disable unnecessary modules and directory browsing.
4. Configure basic access restrictions.
After the lesson, students will be able to:
✔ Identify common threats to Apache servers
✔ Disable directory listing and unused modules
Lesson Outcomes
✔ Set up access control with .htaccess or config files
✔ Understand the importance of server tokens and software
version masking
✔ Security-first walkthrough
✔ Demonstration with real Apache settings
Methods of Pedagogy
✔ Case-based discussion on real-world attacks
✔ Hands-on: editing config to restrict access
Section Details
✔ Apache with vulnerable/default setup (in lab)
✔ Terminal with sudo access
Teaching Tools
✔ PPT listing best security practices
✔ Sample .htaccess and config snippets
Ask: “Would you want attackers to know your Apache
Motivation/Introducing the version?”
Topic (5 mins) Show how a browser or scan can reveal unnecessary details.
Lead into: “Let’s lock it down and protect the server.”
✔ Risks: Information leakage, directory listing, outdated
modules
✔ Disable directory browsing: Options -Indexes
✔ Hide version info:
• ServerTokens Prod
Content Presentation – Key • ServerSignature Off
Points (40 mins) ✔ Disable unused modules: a2dismod
✔ Restrict access:
• <Directory> with Require all denied
• .htaccess with IP or user-based control
✔ Use of strong permissions on web folders
✔ Regular updates and use of firewalls (brief mention)
1. Which directive hides Apache version details?
A. ServerVersionB. ServerTokens ProdC.
SecureInfoD. ApacheMask✅B (Remembering)
2. What does Options -Indexes do?
✅B (Understanding) D. Displays file sizes C. Changes
document root B. Prevents directory browsing A. Blocks
server access
Assessment (5 mins) 3. Which command disables an Apache module?
MCQs with Answers A. a2enableB. mod-unloadC. a2dismodD.
disablemod✅C (Applying)
4. What is .htaccess used for?
✅C (Analyzing) D. Backup files C. Directory-level
security and settings B. Web design A. Server start
5. What should you do before applying security changes?
✅C (Evaluating) D. Run all modules C. Backup
configuration files B. Restart PC A. Ignore errors
✔ Recap key security settings:
– Disable browsing, hide version, limit access
Summing Up (5 mins)
✔ Discuss importance of patching and secure defaults
✔ Demonstrate secure vs insecure output in browser
🔹 Slow Learners:
✔ Use a checklist of security best practices
✔ Guide step-by-step through editing config
✔ Visualize threats and protection actions
Follow-up Work (5 mins)
🔹 Advanced Learners:
✔ Apply IP restriction using .htaccess
✔ Set file-level access control
✔ Explore mod_security (briefly) for advanced protection
Section Details
Lesson Objectives 1. Understand the purpose of setting the correct user and
group in Apache.
2. Learn how Apache runs under specific user/group for
access control and security.
3. Modify the User and Group directives in Apache
configuration.
Section Details
4. Apply ownership and permission best practices for web
directories.
After the lesson, students will be able to:
✔ Identify the user and group under which Apache runs
Lesson Outcomes ✔ Modify Apache config to change these values
✔ Set file ownership to match the Apache user
✔ Prevent permission issues with web content access
✔ Concept explanation using system process inspection
✔ Terminal-based demonstration
Methods of Pedagogy
✔ Discussion on security implications
✔ Guided config editing and file setup
✔ Linux system with Apache installed
✔ Text editor and terminal
Teaching Tools
✔ PPT with permission diagrams
✔ ps, ls, chown, and chmod command demos
Ask: “Who controls your website files – you or the web
Motivation/Introducing the server?”
Topic (5 mins) Show how Apache runs under a separate user like www-data.
Explain: “This is to keep your system secure and organized.”
✔ Default user/group for Apache:
• Usually www-data (Debian/Ubuntu), apache
Content Presentation – Key
(CentOS/Red Hat)
Points (40 mins)
✔ Checking current Apache user:
• `ps aux
1. What is the default Apache user on Ubuntu?
A. apacheB. rootC. www-dataD. httpd✅C
(Remembering)
2. Where are the User and Group directives found?
A. /etc/passwdC. B. Apache config file /var/www✅B
(Understanding) D. Terminal only
3. Why should the Apache user own the web files?
Assessment (5 mins)
✅C (Applying) D. To compress images C. To prevent
MCQs with Answers
access errors B. For branding A. For performance
4. Which command changes file ownership?
A. chmodB. lsC. chownD. mkdir✅C
(Remembering)
5. Which permission is ideal for directories used by
Apache?
✅C (Evaluating) D. 444 C. 755 B. 777 A. 700
✔ Recap:
– Apache runs under a specific user and group
Summing Up (5 mins)
– Ownership and permissions must align for proper access
– Misconfiguration can cause 403/permission denied errors
🔹 Slow Learners:
✔ Use visual examples of users, files, and permissions
✔ Practice chown and chmod on sample folders
✔ Explain the consequences of incorrect ownership
Follow-up Work (5 mins)
🔹 Advanced Learners:
✔ Create a new user/group and assign it to Apache
✔ Explore user isolation for virtual hosts
✔ Configure SELinux contexts (optional extension)
Lesson Plan – Topic 1: Introduction to MySQL & The SHOW DATABASES and
SHOW TABLES Commands
Section Details
Lesson Objectives 1. Introduce relational databases and MySQL as a DBMS.
Section Details
2. Understand the MySQL environment and client interface.
3. Learn how to view available databases and tables using
SQL commands.
After the lesson, students will be able to:
✔ Define MySQL and its purpose
Lesson Outcomes ✔ Open MySQL shell and connect to the server
✔ Use SHOW DATABASES and SHOW TABLES to explore
structure
✔ Explanation with real-time MySQL interaction
✔ Hands-on practice
Methods of Pedagogy
✔ Q&A and command interpretation
✔ Demo on local system or XAMPP/MAMP
✔ MySQL server (installed or via XAMPP)
✔ MySQL Workbench or CLI
Teaching Tools
✔ Slides with syntax examples
✔ Sample schema for practice
Ask: “Where do websites store user info or product lists?”
Motivation/Introducing the Topic Show: MySQL is a popular database behind many
(5 mins) applications like WordPress, Moodle.
Display a list of familiar apps that use MySQL.
✔ What is MySQL?
✔ Importance of relational databases
✔ Logging into MySQL using terminal: mysql -u root -p
Content Presentation – Key
✔ Viewing all databases: SHOW DATABASES;
Points (40 mins)
✔ Selecting a database: USE databasename;
✔ Viewing all tables: SHOW TABLES;
✔ Case-sensitivity and semicolon usage
1. Which command lists all databases in MySQL?
A. LIST DATABASESB. SHOW DATABASESC. GET
DATABASESD. FIND DATABASES✅B (Remembering)
2. Which command is used to select a specific database?
A. CHOOSEB. SETC. USED. SELECT✅C
(Understanding)
3. What does SHOW TABLES; do?
Assessment (5 mins)
✅C (Applying) D. Opens table data C. Lists all tables
MCQs with Answers
in current DB B. Deletes tables A. Creates a table
4. What is MySQL primarily used for?
✅C (Understanding) D. File compression C. Managing
relational data B. Data analysis A. Web design
5. Which of the following is a required symbol in MySQL
commands?
A. :B. .C. ;D. !✅C (Remembering)
✔ Recap:
– MySQL is a database engine
Summing Up (5 mins) – SHOW DATABASES and SHOW TABLES help us explore
structure
– USE is the first step before working with tables
🔹 Slow Learners:
✔ Provide syntax cards
✔ Share videos explaining basic SQL
✔ Repetition drills with common commands
Follow-up Work (5 mins)
🔹 Advanced Learners:
✔ Practice accessing remote MySQL via command line
✔ Research other SQL DBs like PostgreSQL for comparison
✔ Try using MySQL Workbench for GUI-based interaction
🔹 Advanced Learners:
✔ Try CREATE DATABASE IF NOT EXISTS clause
✔ Experiment with creating multiple DBs and switching
Section Details
between them
✔ Introduce concepts of user-based access to specific
databases
Section Details
1. Understand the purpose of tables in a relational database.
2. Learn how to create a table using the CREATE TABLE
Lesson Objectives
statement.
3. Explore column data types and constraints.
After the lesson, students will be able to:
✔ Write CREATE TABLE statements with multiple columns
Lesson Outcomes
✔ Choose correct data types (INT, VARCHAR, DATE, etc.)
✔ Apply basic constraints like PRIMARY KEY and NOT NULL
✔ Instructor demo and guided SQL writing
✔ Peer-based table creation activity
Methods of Pedagogy
✔ Data type explanation with real-life examples
✔ Diagram-based table structure explanation
✔ MySQL CLI or GUI (e.g., MySQL Workbench)
✔ Schema templates
Teaching Tools
✔ PPT slides with syntax examples
✔ Whiteboard for column mapping
Ask: “How do we store student records or product details in a
database?”
Motivation/Introducing the
Explain that tables are like digital spreadsheets where each row
Topic (5 mins)
is a record.
Show how a table holds structured information.
✔ Table basics:
• Rows = records, Columns = fields
✔ Syntax: CREATE TABLE tablename (column1 datatype,
column2 datatype, ...);
✔ Column names: no spaces, meaningful, lowercase preferred
Content Presentation – Key ✔ Data types:
Points (40 mins) • INT, VARCHAR(n), DATE, FLOAT, etc.
✔ Constraints:
• PRIMARY KEY, NOT NULL, UNIQUE, AUTO_INCREMENT
✔ Example: CREATE TABLE students (id INT PRIMARY
KEY, name VARCHAR(50), dob DATE);
✔ Verifying table creation: SHOW TABLES;
Assessment (5 mins) 1. What is the purpose of CREATE TABLE?
MCQs with Answers ✅C (Understanding) D. Show existing tables C. Define a
new table structure B. Insert records A. Create a database
2. Which of the following is a valid data type in MySQL?
A. STRINGB. NUMBERC. VARCHARD. BOOLEAN✅C
(Remembering)
3. Which constraint ensures no duplicate values in a
column?
A. NOT NULLB. AUTO_INCREMENTC. UNIQUED.
DEFAULT✅C (Analyzing)
4. What is the correct syntax to create a table named
products?
A. CREATE DATABASE products;B. ADD TABLE
products;C. CREATE TABLE products (...);D.
products = TABLE();✅C (Applying)
Section Details
5. Which command shows all tables in a database?
A. SHOW TABLES;B. DESCRIBE;C. SELECT ALL;D.
TABLES();✅A (Remembering)
✔ Recap:
– Tables are the backbone of any MySQL database
Summing Up (5 mins)
– CREATE TABLE helps define structure
– Choose correct data types and apply constraints carefully
🔹 Slow Learners:
✔ Provide a simple schema with sample CREATE TABLE
commands
✔ Offer fill-in-the-blank table templates
✔ Allow repetition with error correction
Follow-up Work (5 mins)
🔹 Advanced Learners:
✔ Create related tables using foreign keys
✔ Use IF NOT EXISTS for safer creation
✔ Test edge cases with constraints like CHECK (if supported)
Section Details
1. Learn how to view the structure of a table using the
DESCRIBE command.
Lesson Objectives 2. Understand the purpose of the SELECT statement.
3. Practice retrieving data from one or more columns of a
table.
After the lesson, students will be able to:
✔ Use DESCRIBE tablename; to view column definitions
Lesson Outcomes ✔ Retrieve specific data using SELECT column FROM
tablename;
✔ Retrieve all data using SELECT * FROM tablename;
✔ Demonstration via live query execution
✔ Instructor-guided SQL writing
Methods of Pedagogy
✔ Practice using sample data
✔ Interactive questioning with output prediction
✔ MySQL CLI or GUI (Workbench, phpMyAdmin)
✔ Pre-created sample table (e.g., students)
Teaching Tools
✔ Visual aid for SELECT statement format
✔ Whiteboard for query building
Ask: “How do you get student marks from a database?”
Explain that the SELECT command is the gateway to
Motivation/Introducing the Topic
querying data.
(5 mins)
Demonstrate a real SELECT * FROM students; command
to show live output.
Content Presentation – Key Points ✔ Using DESCRIBE tablename; to view:
(40 mins) • Column name
• Data type
• Nullability
• Key constraints
✔ Syntax for SELECT:
• SELECT * FROM tablename;
• SELECT column1, column2 FROM tablename;
✔ Query rules:
• Case-insensitive
• Must end with ;
✔ Aliasing columns using AS
✔ Real-world example: fetch names and DOBs from
students table
1. What does the DESCRIBE command show?
✅B (Understanding) D. Query result C. Database
list B. Table structure A. Table content
2. Which keyword is used to retrieve data?
A. GETB. READC. SELECTD. SHOW✅C
(Remembering)
Assessment (5 mins)
3. Which of these shows all columns of a table?
MCQs with Answers
A. SELECT ALLB. SELECT FROM table;C. SELECT *
FROM table;D. SHOW *;✅C (Applying)
4. Which symbol is used to end a MySQL query?
A. :B. ;C. ,D. .✅B (Remembering)
5. Which clause lets you rename a column in the result?
A. ASB. INC. USED. SHOW✅A (Analyzing)
✔ Recap:
– DESCRIBE helps view table design
Summing Up (5 mins) – SELECT is used to read data
– SELECT * fetches everything, but specific columns
improve performance
🔹 Slow Learners:
✔ Practice writing SELECT queries on basic tables
✔ Provide a table and ask them to list columns with
DESCRIBE
✔ Offer visual SELECT syntax flowcharts
Follow-up Work (5 mins)
🔹 Advanced Learners:
✔ Use SELECT with expressions and aliases
✔ Combine SELECT with WHERE for filtering (intro)
✔ Query multiple tables using basic joins (teaser only)
Section Details
1. Understand how to insert new records into a table using SQL.
Lesson Objectives 2. Learn the syntax and formats of the INSERT INTO statement.
3. Practice inserting complete and partial row values.
After the lesson, students will be able to:
✔ Use INSERT INTO to add data to tables
Lesson Outcomes
✔ Insert data into all or selected columns
✔ Understand and handle syntax errors and data type mismatches
✔ Live SQL demonstration
✔ Step-by-step guided practice
Methods of Pedagogy
✔ Group task: create and populate sample records
✔ Show-before-and-after table views
✔ MySQL CLI or GUI tool
✔ Sample tables (e.g., students, products)
Teaching Tools
✔ Visual aid of syntax breakdown
✔ Error-handling examples
Ask: “If a student joins a course, how do you record that in the
system?”
Motivation/Introducing the
Demonstrate adding a record live using INSERT and show how it
Topic (5 mins)
reflects with SELECT.
Connect to real-world use in e-commerce, education, banking, etc.
Content Presentation – Key ✔ Basic syntax:
Points (40 mins) • INSERT INTO tablename VALUES (value1,
value2, ...);
✔ Column-specified format:
• INSERT INTO tablename (col1, col2) VALUES (val1,
val2);
✔ Inserting multiple rows at once (intro):
Section Details
• INSERT INTO tablename VALUES (...), (...);
✔ Data type handling:
• Strings in quotes, numbers plain, dates in YYYY-MM-DD
✔ Verifying with SELECT * FROM tablename;
✔ Common mistakes: column count mismatch, type mismatch
1. Which SQL keyword is used to add a new row of data?
A. ADDB. SELECTC. INSERTD. NEW✅C (Remembering)
2. What symbol is used for string values in INSERT?
A. ()B. ''C. <>D. ##✅B (Understanding)
3. What happens if column names are not specified in INSERT?
✅C (Analyzing) D. Only numeric fields are accepted C. All
columns must match the order in table B. An error occurs A.
Assessment (5 mins) SQL selects default fields
MCQs with Answers 4. Which command shows if data was successfully inserted?
A. SELECT * FROM tablename;B. SHOW INSERTS;C. LIST
ALL;D. DESCRIBE tablename;✅A (Applying)
5. Which of the following is correct syntax?
A. INSERT students (id, name) VALUES (1, 'John');B.
INSERT INTO students VALUES 1, 'John';C. INSERT INTO
students (id, name) VALUES (1, 'John');D. INSERT
students VALUES (1, 'John');✅C (Evaluating)
✔ Recap:
– INSERT INTO is used to add new records
Summing Up (5 mins)
– Match values to columns and use proper syntax
– View the result with SELECT
🔹 Slow Learners:
✔ Offer templated INSERT tasks with blanks
✔ Practice inserting records step-by-step
✔ Use error prompts to correct mistakes
Follow-up Work (5 mins)
🔹 Advanced Learners:
✔ Try inserting multiple rows
✔ Combine INSERT with functions like NOW()
✔ Introduce INSERT INTO ... SELECT ... (optional)
Section Details
1. Understand how to update and delete records in a table.
2. Learn the syntax of UPDATE and DELETE statements.
Lesson Objectives
3. Use WHERE clause to target specific rows and avoid affecting
all records.
After the lesson, students will be able to:
✔ Use UPDATE to modify existing data
Lesson Outcomes
✔ Use DELETE to remove specific records
✔ Apply WHERE conditions correctly to avoid data loss
✔ Live demonstration
✔ Real-time correction and deletion scenarios
Methods of Pedagogy
✔ Paired practice: modify and delete sample records
✔ Warnings and safety tips for using WHERE clause
✔ MySQL CLI or GUI (Workbench/phpMyAdmin)
✔ Pre-filled sample tables (e.g., students, orders)
Teaching Tools
✔ Projected examples with explanations
✔ Backup strategy demonstration
Ask: “What if a student updates their phone number, or a
Motivation/Introducing the customer cancels an order?”
Topic (5 mins) Explain how UPDATE and DELETE handle such cases.
Show risks of missing WHERE clause by example.
Section Details
✔ UPDATE syntax:
• UPDATE tablename SET column=value WHERE
condition;
✔ Multiple column update:
• SET col1=val1, col2=val2
Content Presentation – Key ✔ DELETE syntax:
Points (40 mins) • DELETE FROM tablename WHERE condition;
✔ Importance of WHERE clause
✔ Viewing affected rows: SELECT before and after
✔ Safeguards:
• Always preview with SELECT before running DELETE
1. Which command is used to change existing data?
A. SELECTB. CHANGEC. UPDATED. ALTER✅C
(Remembering)
2. What happens if WHERE is missing in an UPDATE?
✅C (Understanding) D. Error is shown C. All rows
update B. Only one row updates A. Nothing changes
3. Which of the following removes records?
Assessment (5 mins) A. INSERTB. TRUNCATEC. REMOVED. DELETE✅D
MCQs with Answers (Remembering)
4. What is the role of the WHERE clause?
✅C (Analyzing) D. Hide columns C. Specify target rows
B. Set column types A. Change table structure
5. What is the correct format to delete one student with id 3?
A. DELETE student WHERE id = 3;B. DELETE FROM
students WHERE id = 3;C. REMOVE id=3 FROM
students;D. DELETE id 3;✅B (Applying)
✔ Recap:
– UPDATE modifies data, DELETE removes data
Summing Up (5 mins)
– Always use WHERE to target specific rows
– Verify results with SELECT before final changes
🔹 Slow Learners:
✔ Provide fill-in-the-blank command sheets
✔ Reinforce WHERE usage with examples
✔ Repeat with safety checks
Follow-up Work (5 mins)
🔹 Advanced Learners:
✔ Use UPDATE with expressions and NOW()
✔ Perform conditional deletes
✔ Explore DELETE with LIMIT and ORDER BY (intro)
Lesson Plan – Topic 1: Introduction to PHP & PHP Form Processing (Part 1)
Section Details
1. Understand what PHP is and how it integrates with HTML.
2. Set up a basic PHP development environment.
Lesson Objectives
3. Learn how to capture form data using the GET and POST
methods in PHP.
After the lesson, students will be able to:
✔ Explain the purpose of PHP in web development
Lesson Outcomes
✔ Create a simple PHP file and run it on a server
✔ Collect and display form data using GET and POST
✔ Demonstration with browser and editor
✔ Hands-on lab (writing a form + processing it)
Methods of Pedagogy
✔ Concept breakdown: request methods and server response
✔ Peer review of form outputs
Teaching Tools ✔ XAMPP/WAMP server setup
✔ Code editor (VS Code, Sublime Text)
✔ Browser and localhost server
Section Details
✔ Sample HTML+PHP form templates
Ask: “What happens when you click 'Submit' on a form?”
Motivation/Introducing the
Show the flow of form submission to the PHP processor.
Topic (5 mins)
Explain how PHP handles that input behind the scenes.
✔ What is PHP? (Hypertext Preprocessor)
✔ Server-side scripting vs client-side
✔ PHP syntax: <?php echo "Hello"; ?>
✔ Creating a form in HTML
Content Presentation – Key
✔ Using method="GET" and method="POST"
Points (40 mins)
✔ Capturing input:
• $_GET['name'], $_POST['email']
✔ Displaying submitted data with echo
✔ Basic error checking
1. What is PHP primarily used for?
✅C (Remembering) D. Making videos C. Server-side
scripting B. Designing images A. Styling pages
2. Which PHP superglobal is used for form data sent with
GET?
A. $_POSTB. $_DATAC. $_FORMD. $_GET✅D
(Understanding)
3. What tag is used to write PHP code?
Assessment (5 mins)
A. <php>B. <?php ... ?>C. [php] ... [/php]D.
MCQs with Answers
<!-- php -->✅B (Remembering)
4. What is the purpose of echo in PHP?
✅C (Applying) D. Connect database C. Display
output B. Read files A. Stop code
5. What does method="POST" do in a form?
✅B (Analyzing) D. Prevents data from saving C.
Downloads form B. Sends data in request body A. Displays
result in URL
✔ Recap:
– PHP processes data on the server
Summing Up (5 mins)
– Forms use GET and POST methods
– Use $_GET or $_POST to access submitted values
🔹 Slow Learners:
✔ Share working code samples
✔ Use printed walkthroughs for form handling
✔ Break down form + PHP files side by side
Follow-up Work (5 mins)
🔹 Advanced Learners:
✔ Validate form inputs
✔ Use conditional statements to handle multiple inputs
✔ Integrate HTML form with dynamic output (e.g., welcome
message)
Section Details
1. Review PHP form submission using GET and POST methods.
2. Learn how to validate and sanitize form data in PHP.
Lesson Objectives
3. Understand basic security measures in form processing (e.g.,
XSS prevention).
After the lesson, students will be able to:
✔ Validate form fields using PHP (e.g., required, email format)
Lesson Outcomes
✔ Sanitize input to avoid HTML/JS injection
✔ Write cleaner and safer form-handling scripts
Methods of Pedagogy ✔ Code review and live debugging
✔ Group coding tasks
✔ Roleplay of “attacker vs server” to understand XSS
Section Details
✔ Discussion-based learning with examples
✔ PHP-enabled server (XAMPP/WAMP)
✔ Code editor
Teaching Tools
✔ Browser for testing validation
✔ Slides showing unsafe vs secure code
Ask: “Can someone harm a website using form input?”
Motivation/Introducing the
Demonstrate a basic script where a form allows script injection.
Topic (5 mins)
Show how validation and sanitization protect against this.
✔ Validation examples:
• empty($_POST['name'])
• filter_var($_POST['email'],
FILTER_VALIDATE_EMAIL)
Content Presentation – Key ✔ Sanitization examples:
Points (40 mins) • htmlspecialchars(), trim(), stripslashes()
✔ Form error feedback to users
✔ Required fields, default values
✔ Creating user-friendly error messages
✔ Best practices: always validate on server-side
1. Which function is used to remove unnecessary spaces from
input?
A. trim()B. clear()C. remove_space()D. cut()✅A
(Remembering)
2. Which function converts special characters to HTML
entities?
A. specialchars()B. htmlspecialchars()C.
html_entities()D. safe_html()✅B (Understanding)
Assessment (5 mins) 3. Which filter is used to validate an email address?
MCQs with Answers A. FILTER_VALIDATE_INTB. FILTER_VALIDATE_EMAILC.
EMAIL_VALIDD. EMAIL_CHECK✅B (Applying)
4. What does empty($_POST['name']) check?
✅B (Analyzing) D. Password match C. Data type B. If
name field is filled A. File upload
5. Why is validation important in PHP forms?
✅C (Evaluating) D. To generate income C. To prevent
errors and security risks B. For page styling A. To make the
site look good
✔ Recap:
– Validate: check if input meets rules
Summing Up (5 mins) – Sanitize: clean up input
– PHP should always verify user input before storing or
displaying
🔹 Slow Learners:
✔ Provide fill-in-the-blank validation examples
✔ Use visual explanation of XSS
✔ Practice trim() and htmlspecialchars() usage
Follow-up Work (5 mins)
🔹 Advanced Learners:
✔ Create a contact form with multiple validation rules
✔ Use custom error messages with if-else logic
✔ Explore FILTER_SANITIZE_STRING,
FILTER_SANITIZE_EMAIL, etc.
Lesson Plan – Topic 3: Database Access with PHP (Connection & Basics)
Section Details
1. Understand how PHP connects to a MySQL database.
Lesson Objectives 2. Learn the syntax for establishing a connection using mysqli.
3. Practice basic database connection error handling.
Lesson Outcomes After the lesson, students will be able to:
Section Details
✔ Connect to a MySQL database using PHP
✔ Handle connection success and failure
✔ Understand server, username, password, and database
parameters
✔ Hands-on demonstration
✔ Code walkthrough and explanation
Methods of Pedagogy
✔ Debugging real connection errors
✔ Pair-based lab activity
✔ PHP server (XAMPP/WAMP)
✔ MySQL running locally
Teaching Tools
✔ Code editor
✔ Slides explaining connection logic
Ask: “How does your PHP form save data?”
Explain: “To store data, PHP must first connect to the MySQL
Motivation/Introducing the
database.”
Topic (5 mins)
Live demo of failed connection with wrong credentials to
introduce concept.
✔ Database parameters:
• host, username, password, database
✔ Using mysqli_connect():
• mysqli_connect("localhost", "root", "",
"testdb");
Content Presentation – Key
✔ Checking connection success:
Points (40 mins)
• if (!$conn) { die("Connection failed: " .
mysqli_connect_error()); }
✔ Success message with echo
✔ Closing connection using mysqli_close($conn);
✔ Optional intro to PDO (for advanced learners)
1. Which PHP function connects to MySQL?
A. connect_db()B. mysqli_connect()C.
db_connect()D. mysql()✅B (Remembering)
2. Which of these is required to connect to a database?
✅D (Understanding) D. All of the above C. Database
name B. Server name A. User password
3. What does mysqli_connect_error() return?
Assessment (5 mins) ✅B (Applying) D. Table names C. Row count B. Error
MCQs with Answers message A. Connection success
4. Which line ends the connection?
A. close();B. stop();C. mysqli_close($conn);D.
exit();✅C (Remembering)
5. What does localhost refer to?
✅C (Analyzing) D. An email host C. The local
computer/server B. Server on the internet A. External
website
✔ Recap:
– PHP uses mysqli_connect() to link with MySQL
Summing Up (5 mins)
– Always check the connection before executing queries
– Use mysqli_close() when done
🔹 Slow Learners:
✔ Share templated connection script
✔ Label connection parameters visually
✔ Walk through a full working example step-by-step
Follow-up Work (5 mins)
🔹 Advanced Learners:
✔ Explore PDO as an alternative
✔ Create functions to reuse connection code
✔ Try connecting to remote databases (with credentials)
🔹 Advanced Learners:
✔ Use mysqli_fetch_array() and compare with
fetch_assoc()
✔ Create a function to display any table
✔ Chain SQL functions into form-processing workflow
Section Details
1. Learn how to insert form data into a MySQL database using
PHP.
Lesson Objectives 2. Understand the process of capturing input from HTML forms.
3. Execute INSERT INTO queries from PHP and handle success or
error messages.
After the lesson, students will be able to:
✔ Create a form that sends data to PHP
Lesson Outcomes
✔ Write PHP scripts to insert form data into a MySQL table
✔ Handle insertion success/failure using mysqli_query()
✔ Demonstration of complete form-to-database workflow
✔ Hands-on exercise for inserting student data
Methods of Pedagogy
✔ Code correction activity
✔ Role-based pair programming
✔ PHP + MySQL server (XAMPP/WAMP)
✔ HTML form templates
Teaching Tools
✔ PHP insertion script examples
✔ Test database with write permission
Ask: “What happens when someone registers on a website?”
Motivation/Introducing the Show a registration form and explain how PHP inserts the data
Topic (5 mins) into a database.
Give a quick real-world example of user registration.
✔ HTML form with POST method
✔ Capturing input with $_POST
✔ Writing an INSERT query:
• INSERT INTO students (name, email) VALUES
Content Presentation – Key ('$name', '$email');
Points (40 mins) ✔ Connecting and executing query with mysqli_query()
✔ Using if to check insertion:
• if (mysqli_query($conn, $sql)) { echo "Success"; }
✔ Displaying confirmation or error message
✔ Handling empty fields and SQL errors
1. Which SQL statement is used to insert data?
A. INSERT INTOB. ADD TOC. PUT INTOD. APPEND✅A
(Remembering)
2. Which PHP variable holds form data sent by POST?
A. $_GETB. $_FORMC. $_POSTD. $_SEND✅C
(Understanding)
3. What does mysqli_query() return on success?
Assessment (5 mins) B. Boolean A. Data rows true✅B (Applying) D. JSON
MCQs with Answers C. Error object
4. Which of the following is a valid PHP insertion query?
A. INSERT INTO users name, email VALUES ...B. INSERT
name INTO usersC. INSERT INTO users (name, email)
VALUES (...)D. ADD (name, email)✅C (Analyzing)
5. Why is it important to validate data before inserting?
✅B (Evaluating) D. To log out users C. To resize tables
B. To avoid errors and protect database A. To make it colorful
Summing Up (5 mins) ✔ Recap:
Section Details
– Form data is captured with $_POST
– Inserted using INSERT INTO SQL from PHP
– Always check for success and validate data before inserting
🔹 Slow Learners:
✔ Provide complete working script to trace
✔ Use labeled form fields and values
✔ Highlight common mistakes and offer fixes
Follow-up Work (5 mins)
🔹 Advanced Learners:
✔ Combine validation and insertion
✔ Use prepared statements to prevent SQL injection
✔ Try inserting multiple rows or dynamic values from loops
Lesson Plan – Topic 6: Selecting, Updating, and Deleting Records with PHP
Section Details
1. Learn how to retrieve data from a database using PHP and
SELECT queries.
Lesson Objectives 2. Understand how to update and delete specific records using
UPDATE and DELETE SQL statements through PHP.
3. Handle success/failure messages for each operation.
After the lesson, students will be able to:
✔ Use PHP to execute SELECT, UPDATE, and DELETE queries
Lesson Outcomes ✔ Display data dynamically using PHP
✔ Update and remove records using form inputs or ID-based
queries
✔ Live code demo
✔ Guided mini-project (update student record)
Methods of Pedagogy
✔ Output-based debugging practice
✔ Query review sessions
✔ PHP + MySQL environment
✔ Tables with sample data
Teaching Tools
✔ Form templates for edit/delete operations
✔ Slides showing query syntax and execution flow
Ask: “How do websites allow you to change or remove your
Motivation/Introducing the profile details?”
Topic (5 mins) Show examples like updating user info or deleting messages.
Explain: “These actions rely on dynamic SQL commands.”
✔ Selecting records:
• SELECT * FROM tablename
• Use of mysqli_fetch_assoc() in a while loop
✔ Updating records:
• UPDATE tablename SET column=value WHERE id=...
Content Presentation – Key
• Update through forms
Points (40 mins)
✔ Deleting records:
• DELETE FROM tablename WHERE id=...
✔ Form-based update/delete
✔ Checking query success with mysqli_query()
✔ Always use WHERE to avoid mass updates/deletes
Assessment (5 mins) 1. Which PHP function is used to retrieve rows from a query
MCQs with Answers result?
A. mysqli_query()B. mysqli_fetch_assoc()C.
mysqli_run()D. fetch_data()✅B (Remembering)
2. Which SQL statement is used to change existing data?
A. CHANGEB. UPDATEC. ALTERD. REPLACE✅B
(Understanding)
3. Why should we always use WHERE in UPDATE/DELETE?
✅C (Analyzing) D. To create new tables C. To target
Section Details
specific rows B. To change the host A. To change the table
name
4. Which of the following correctly deletes a row?
A. REMOVE FROM table;B. DELETE * FROM table;C.
DELETE FROM table WHERE id = 5;D. DROP ROW FROM
table;✅C (Applying)
5. Which loop is best for displaying multiple rows?
A. forB. while with mysqli_fetch_assoc()C. do-
whileD. switch✅B (Evaluating)
✔ Recap:
– SELECT displays data
Summing Up (5 mins) – UPDATE modifies existing rows
– DELETE removes data
– Use mysqli_query() for all with proper condition checks
🔹 Slow Learners:
✔ Visual aids to explain each operation
✔ Use a guided worksheet for SELECT → UPDATE →
DELETE
✔ Label forms clearly for ID targeting
Follow-up Work (5 mins)
🔹 Advanced Learners:
✔ Build an editable HTML table with PHP
✔ Add confirmation steps before deletion
✔ Try combining all operations in a CRUD interface