Term: 1st Term
Week: 10
Class: Senior Secondary School 3
Age: 17 years
Duration: 40 minutes of 2 periods each
Date:
Subject: Computer studies and ICT
Topic:- Database Management III
SPECIFIC OBJECTIVES: At the end of the lesson, pupils should be able to
INSTRUCTIONAL TECHNIQUES: Identification, explanation, questions and answers, demonstration, videos from source
INSTRUCTIONAL MATERIALS: Videos, loud speaker, pictures, Data Processing for senior Secondary Education by Hiit Plc, WAPB Computer Studies for Senior Secondary III by Adekunle et al, On-line Materials.
INSTRUCTIONAL PROCEDURES
PERIOD 1-2
PRESENTATION |
TEACHER’S ACTIVITY |
STUDENT’S ACTIVITY |
STEP 1 INTRODUCTION |
The teacher reviews the previous lesson on Database management |
Students pay attention |
STEP 2 EXPLANATION |
He reviews the procedures in creating a database
|
Students pay attention and participates |
STEP 3 DEMONSTRATION |
He creates a database inclusive of tables and even queries the database
|
Students pay attention and participate |
STEP 4 NOTE TAKING |
The teacher writes a summarized note on the board |
The students copy the note in their books |
NOTE
DATABASE MANAGEMENT
Creating Table
After clicking the Create button, a new window shows up with a table already created with a default name Table1. This very window is called the Datasheet View.
If the Database is storing information about a school, then the entities in a school include Student, Teacher, and Subject etc. So if we are going to create a table that stores student information, then we list the attributes of a typical student such as StudentID, Firstname, Lastname, Gender, DOB, Address, Nationality etc
The above listed attributes are what make the fields (column name). To define the structure of the Student table, do the following:
The window that shows up is called the Design View, and has a part called Field Name and on the left the Data Type column. The Field name is the attribute of the student i.e. Lastname, StudentID etc. while the Data Type has to do with the type of data value each field takes. For example, if the field name is Lastname, then the appropriate data type is Text (since your name is a combination of alphabets). The following are the data types available in MS Access 2010.
DATA TYPE |
DESCRIPTION |
Text |
Accepts either alphabet or numbers including special characters with a maximum of 255 characters in length. It is called short text in version 2013 above |
Memo |
Similar to Text data type but can allow a maximum of 63,999 characters in length. It is called long text in version 2013 and above |
Number |
Only numeric value is allowed and can be used to perform calculations |
Date/Time |
Date and time values can be stored in this field |
Currency |
You can enter only currency values in this field |
AutoNumber |
You cannot enter or change the data in this field at any time. MS Access increments the value in this field whenever you add a new record to a table. |
Yes/No |
The field is depicted with a Check box that by default result to FALSE (No)and when checked becomes TRUE (Yes) |
Other data types are OLE Object, Hyperlink, Attachment and Lookup Wizard.
Now enter the following field names and select the appropriate data type as indicated in the table below:
Field Name |
Data Type |
StudentID |
Number |
Last Name |
Text |
First Name |
Text |
Gender |
Text |
DOB |
Date/Time |
Address |
Memo |
Phone |
Text |
Note that the field name can be up to 64 characters long. They can include combination of letters of the English alphabet, numbers, blank space and special characters except a period (.), an exclamation mark (!), and brackets ([]).
You must make sure that you set the primary key (PK) field. A primary key is any field that contains values that are unique for each record in the table. In the case of this, the PK field is StudentID, since no two students can have the same StudentID.
After typing as indicated in the table above, Save it, then click View to return to Datasheet View. You can start filling the table with data values that form records.
QUERYING THE DATABASE
Querying the database means asking the database to extract a subset of the information saved in it based on the criteria you are giving it.
CLASS ACTIVITY: Create a database for learners in SS1 using the below appropriate field names
Field Name |
Data Type |
StudentID |
Number |
Last Name |
Text |
First Name |
Text |
Gender |
Text |
DOB |
Date/Time |
Address |
Memo |
Phone |
Text |
EVALUATION: 1. How can you query the database?
CLASSWORK: As in evaluation
CONCLUSION: The teacher commends the students positively