Understanding databases

Databases - Lesson 1

Objectives

  • To understand and explain what a database is
  • To explain why databases are useful
  • To use a branching database

Lesson Resources

 

Introduction - What is a database?

Begin by asking What is a database? Ask the students to discuss with a partner first, and try to give real life examples or an educated guess if they haven't heard of the term before.

 

“A database is a system that makes it easy to search, select and store information."

(BBC Bitesize: https://www.bbc.co.uk/bitesize/topics/zf2f9j6/articles/z8yk87h#z996tfr(opens in new tab))

 

Information can be stored in lots of different ways, historically on paper but mainly digitally these days. 

 

An address book is a paper-based database, would this be useful? How is it organised? Are there difficulties in using a paper-based system? - Slower to search and organise, perhaps more easily damaged/lost etc, limited space sometimes.

 

 

Where do most people keep their telephone numbers and address now? What advantages do electronic systems have? - Faster to search, often accessible to many people at once, from more than one location. 

 

Explain that we often need to search through lots of information to find something. Databases can help us do this quickly and easily.

 

Searching data

Next we will introduce the concept of branching databases and how they can be used to identify a mystery item from a collection by essentially filtering and separating the contents of the data bases with yes/no questions. Each question should eliminate some of the contents of the database until each unique item in the database can be identified.

For example, imagine we wanted to identify a mystery animal from this collection. We could ask questions to work it out.

Can it fly? - No

 

Next we could ask:  Does it have four legs? - Yes

 

Next we could ask:  Does it have fur? - No

 

It was the elephantAsking the right questions meant this was the only possible answer.

 

Guess Who

Try the same concept with the class. Tell them that you are going to choose one child from the class, but keep it secret. They have to work out who you are thinking of by asking questions. You can only answer yes and no to their questions. The fewer questions they ask the better.

When they have had a go, ask what are the best kinds of questions in this game? 

 

Databases

When we search in this way, it’s like searching a databaseWe are considering information about the animals or people and filtering some information in or out based on the answers. But this only works if know the answers! For example:

Animals

  • Habitat
  • Size
  • Colour
  • Number of legs
  • How it moves
  • Skin type

 

People

  • Gender
  • Age
  • Height
  • Eye colour
  • Hair colour
  • Hair length

 

When we shop online we search a database of products on the websiteImagine you were searching for some new trainers. You could browse hundreds of pairs which could take a long time.

 

 

Or you could filter the database to narrow it down.

 

These filters are like our questions in the game:

  • Are they available in a size 5?
  • Are they blue?
  • Are they under £50.00

 

 

Branching databases

This kind of database is called a branching database.

 

Open 2Question in Purple Mash. Select Examples > Sorted database examples > Minibeasts.

This database is complete, with questions already devised to sort down to each minibeast. Demonstrate how to use. Ask a child to choose a minibeast from the screen (you may need to scroll down to see them all) but to keep it secret. Then click 'I'm ready to sort'. 

 

 

Then press the Play button twice and ask each question to the helper, clicking Yes or No each time. If they answer correctly, it will lead you to the minibeast they had chosen. Repeat with another child.

 

 

Ask the children to have a go experimenting with a branching database themselves. They should open the Sports database from the sorted database examples and try it out a few times.

 

 

Sorting a branching database

Next, the class can have a go at adding their own questions to a branching database. Ask them to select the Unsorted database examples and choosing one of the five topics.

 

 

When the database opens, they should delete some of the items until they have eight left. Click on the items you wish to remove and click Delete record.

Switch to Edit tree and click in the red box to start adding questions.

 

 

Add a question to divide the contents. Select each item and put it into the Yes or No sections.

 

 

When you have sorted the items, click Save.

 

 

Repeat the process with each set of items, everywhere you see the red boxes, until they are all sorted.

 

 

 

 

Finish by doing a sort to test out the tree.

 

Databases in the real world around us

A database is a system that makes it easy to store, search and find information.

Every business or organisation uses some kind of database to help keep organised and run smoothly. Everything from the products or services they sell to employee and customer data.

In pairs, ask the children to choose one of three examples shown in the lesson slides:

  • Supermarket
  • School
  • Library

Ask them to think about and list the information that their chosen service would have in their databases.

Review each example with the class. Answers may very but could include:

 

Supermarkets - items in the shop

  • Where they go in the shop
  • How many on the shelf
  • How many in the storeroom
  • How often something is sold
  • Prices of everything
  • Expiry dates
  • Most popular items
  • Special offers

Plus, customer and employee data.

 

Schools - Pupil information

  • Name
  • Age
  • Class
  • Address
  • Family
  • Parent/carer contact details
  • Medical information
  • Attendance
  • Achievements and progress

 

Libraries - The books

  • Title
  • Topic
  • Author
  • Illustrator
  • Age group
  • Language
  • Library section
  • Number of copies in
  • Number of copies on loan
  • Borrow date
  • Return date
  • Number of times loaned

 

To finish

Ask the class to discuss with a partner before taking some answers:

Discuss with your partner

  • What is a database?
  • Why are databases useful?
  • Who might use a database?

 

Next Lesson >