The Mid Year ITGS examination had a number of questions on Databases and DBMS. Its an interesting section and one that the students find challenging. Teaching databases can be done by a theory session – this tends to be dry or by practical activities.
My students have been constructing a multi table relation database using Open Office Base as the tool. Its free product and uses SQL to develop queries.
The students constructed 2 tables, the first is a contact database and the second is the 2010 sales figures. The students set up a relationship between the primary key in the customer contact table and the primary key in the second table. They then went manually through the process of entering data into the fields (columns).
The next stage was writing queries. The students quickly got bored with data entry in columns, but once the tables where completed and they started write the queries they became keener and keener – The logical flow of SQL and the easy success as they experienced made the process fun.
The next stage for the students is to create a form for data entry and then to develop reports to produce and outcome in a usable texted based format.
To help the students, we read out the SQL text to explain the task that they are undertaking:
SELECT Customername, Address, July_Sales, AUgust_Sales
FROM CustomerDetails, Sales
WHERE Country = ‘Germany’
So this section would be Show in the report (SELECT) the following fields customers name, their address, and the sales for July and August FROM tables CustomerDetails and Sales for all customers who are in germany.
Getting the students to read out what the query means is a great way of insuring they understand the process.
All in all the Logical structure of SQL, linked with the practical nature of the task makes this a fun way for the students to learn about:
- SQL structured queries language