Practical Database Management - SSS 1 Note
PRACTICAL DATABASE MANAGEMENT
Class: SSS 1
Term: Third Term
Week: 8
Duration: 80 Minutes (Double Period)
Topic: Practical Database Management
1. Learning Objectives
By the end of the lesson, students should be able to:
- Create simple databases.
- Create and manage tables.
- Run simple queries.
- Generate simple reports.
2. Introduction
In the previous lesson, we introduced databases and learned about important database terms such as database, Database Management System (DBMS), table, record and field.
A database becomes useful when we can actually create it, enter information, organise the information, search for particular records and produce useful reports from the stored data.
A DBMS such as Microsoft Access can be used to create and manage databases. Other database systems may have different interfaces, but the basic ideas of databases, tables, records, fields, queries and reports remain important.
3. Creating a Simple Database
A database should be designed according to the type of information that needs to be stored. For example, a school may need a database for storing information about students.
A simple student database may contain information such as:
| StudentID | FirstName | LastName | Class | Gender |
|---|---|---|---|---|
| ST001 | David | Okoro | SSS 1 | Male |
| ST002 | Mary | James | SSS 1 | Female |
| ST003 | Daniel | Peter | SSS 1 | Male |
Basic Steps for Creating a Database
- Open the database application.
- Choose the option to create a new database.
- Give the database an appropriate name.
- Choose where the database should be saved.
- Create the required table or tables.
- Define the fields needed to store the information.
- Save the database.
4. Creating and Managing Tables
A table is a database object used to store related information in rows and columns. Each table normally contains fields that describe the information and records that contain individual entries.
Example of a Student Table
| Field Name | Possible Data Type | Purpose |
|---|---|---|
| StudentID | Text / Number | Identifies the student. |
| FirstName | Text | Stores the student's first name. |
| LastName | Text | Stores the student's surname. |
| Class | Text | Stores the student's class. |
| Age | Number | Stores the student's age. |
Managing a Table
Managing a table may involve:
- Adding new fields.
- Entering new records.
- Editing existing records.
- Deleting incorrect or unnecessary records.
- Changing field properties where necessary.
- Saving changes made to the table.
5. Entering Records into a Table
A record is a complete set of related information about one item or person. For example, one student's name, class and age can form one record in a student table.
To enter records into a table:
- Open the database.
- Open the required table.
- Move to an empty row or record.
- Enter the appropriate information into each field.
- Check the information for errors.
- Save the changes.
6. Running Simple Queries
Queries are useful when a database contains many records and we need to find specific information without examining every record manually.
Examples of Simple Queries
Suppose a student database contains students from different classes. We could create queries such as:
- Show all students in SSS 1.
- Show all students whose gender is Female.
- Show students older than 15 years.
- Show students whose names begin with a particular letter.
Basic Steps for Creating a Simple Query
- Open the database application.
- Open the query section or query design tool.
- Select the table containing the required information.
- Select the fields to be displayed.
- Set a simple condition or criterion if necessary.
- Run the query.
- Examine the results.
- Save the query if it will be used again.
7. Generating Simple Reports
Reports make database information easier to read and present. A school, for example, may generate a report containing a list of students in a particular class.
Examples of Database Reports
- Class student list.
- List of students by gender.
- Students' examination results.
- List of registered students.
- Inventory or stock report.
Basic Steps for Generating a Simple Report
- Open the database.
- Select the table or query containing the required information.
- Open the report creation tool.
- Select the fields to include.
- Arrange the information appropriately.
- Preview the report.
- Save the report.
8. Relationship Between Tables, Queries and Reports
Tables, queries and reports perform different but related functions in a database.
| Database Object | Main Purpose | Example |
|---|---|---|
| Table | Stores organised data. | Student information table. |
| Query | Retrieves selected information from the database. | Students in SSS 1. |
| Report | Presents database information in a readable format. | Printed class student list. |
The basic workflow can therefore be represented as:
9. Practical Classroom Activity
Activity: Create a Simple Student Database
Using an available DBMS application, students should create a simple database for student information.
- Create a new database named SchoolStudents.
- Create a table named Students.
- Create fields such as StudentID, FirstName, LastName, Class and Age.
- Enter at least five sample student records.
- Save the table.
- Create a simple query to display students belonging to a particular class.
- Run the query and examine the results.
- Generate a simple report from the table or query.
- Preview and save the report.
10. Importance of Practical Database Management
- It helps users organise large amounts of information.
- It makes information easier to retrieve.
- Queries help users find specific information quickly.
- Reports make information easier to present and understand.
- It reduces the difficulty of managing information manually.
- It supports record keeping in schools, businesses and other organisations.
11. Summary
- A database is an organised collection of related information.
- A DBMS is software used to create and manage databases.
- Tables are used to store data in fields and records.
- Queries are used to retrieve information that meets specified conditions.
- Reports present database information in a readable format.
- Practical database management involves creating databases, managing tables, running queries and generating reports.
12. Evaluation Questions
- What is practical database management?
- List four steps involved in creating a simple database.
- What is a table in a database?
- State three activities involved in managing a table.
- What is a query?
- Give three examples of information that can be retrieved using simple queries.
- What is a database report?
- State four steps involved in generating a simple report.
- Differentiate between a table, a query and a report.
- State three benefits of practical database management.
13. Assignment
- Explain the difference between a database, table, record and field.
- Describe the steps involved in creating a simple student database.
- Explain what a query is and give two examples of simple queries that can be performed on a student database.
- Explain the purpose of a database report.
- Draw a simple student table containing five fields and five sample records.
14. Interactive Revision Quiz
Choose the best answer for each question, then click Submit Quiz to see your score.
CMPNOTE: Free Digital Technologies learning resources for Nigerian secondary school students and teachers.
Comments
Post a Comment