video

Lesson video

In progress...

Loading...

Hello and welcome to lesson four in our Flat-file databases unit.

I'm Andy, and in this lesson, we're going to be using search tools in a Flat-file database.

For this lesson, you'll need a computer and access to the internet.

You'll also need something to write on and something to write with.

Other than that, please clear away any distractions.

And then we can start.

In this lesson you'll be able to explain that tools can be used to select specific data.

You'll choose fields and values to answer given questions.

You'll be able to outline how AND and OR can be used to refine data selection.

And you'll also choose multiple criteria to answer given questions.

So let's just think back to record cards we've been using.

We made some in the first lesson and used them again in the last lesson.

And we've also used them online in the database we've been using.

So this is a record card.

Can you see the fields on that record card? I'll give you a moment to remind yourself.

And for each of the fields we have values.

All those values are data and they can be different types of data.

So what data types can you see? And there's a hint and the hint is that 'Text' is a data type.

So you can see some text.

So these are the fields, Country Name, Area, Population and so on.

And these are the values in each of those fields.

So we're just going to think now about what type of data that is.

Okay.

So that is text.

It's text data.

This next one is numbers is numeric data.

So this one, that's also numbers.

That's numeric data.

This one is text.

The next one is slightly more unusual.

That's an image.

Our data is an image.

And then the last one the Currency, that's text.

So in our record card we have text data, number numeric data and we have images as data.

So we're going to think about meeting given criteria.

So listen carefully to the statements I read out.

And if a statement applies to you, put your thumb up and when I stop after it, before the next one, put your thumb down and listen again.

Okay.

So the first statement, thumb up if you're a boy.

Okay.

Thumbs down.

The next one, thumb up if your hair is tied back.

Okay.

Hands down.

Thumb up if you have brown eyes.

Okay.

Hands down.

And the last one, thumb up if you ate toast for breakfast.

Okay, thumbs down.

So we're now going to search a database and do a similar thing.

We are going to look for things that apply.

So what we're going to search for is how many 16 year olds were on the Titanic.

Okay.

So here's our database and we want to search and we're searching for 16 year old people onboard the Titanic.

So I can click search here and I need to go and choose age.

And the value is 16.

Okay, 16 year olds and straight off it's told me there's 22.

I can see the age down here, 16 and I can turn through them and see.

I can also just go to the table view and actually see now I have a list of people who were 16 years old, who were on board the Titanic.

Okay.

So you can do your own searching now.

And so you're searching to meet given criteria and you need to find out how many people were in Third class, on board the Titanic.

And sadly the Titanic was a passenger ship that sank.

And you need to look for how many people survived after it sank.

So, two things to look for, how many people were in Third class? How many people survived? Okay, so that's your task.

The link is in the worksheet.

Pause the video now.

Okay.

So let's look at those together then.

So the first question was, how many people were in third class on board? So we need to go to the search tool and we choose class and we need to go and set the value.

And it even tells us their look, Third class 709 but just choose it.

We can also see it's here.

So 709 third class passengers.

How many people survived? So I'm going to clear my search and I'm going to do a new search and it's got survivor or victim.

So I'm going to choose this one.

And there's only two choices and we've got V for victim, S for survivor.

And again the answer is shown, but I'll select that.

And we can see it was 484 people survived the sinking of the Titanic.

Okay.

So we're going to do another thumbs up.

So if these things apply to you, put your thumb up and you need to listen carefully because both parts of the statements apply to you and you put your hands down in between.

So the first one is, thumbs up if you're a girl and you have brown hair.

Okay, hands down.

The next one is thumbs up if you have brown eyes and you ate toast for breakfast.

Can these be both? Next one.

Thumb up if your hair is tied back and you have a jumper on.

Okay, hands down.

And the last one is thumbs up if you have laces on your shoes and blue eyes.

So I can do that one.

Okay.

Hands down.

So that was two different criteria.

And you had to meet both of them to put your thumb up.

And we can do that with the database.

So now we're actually going to search for, here's an example, 16 year olds who got onto the Titanic at Southampton.

Okay, so there's two things there it's they were 16 and they got on at Southampton.

Okay.

So let's have a look at that then.

So we're looking for how many 16 year olds got on the Titanic at Southampton.

So we need to search for the 16 year olds first, that's age.

And I'm just going to key in the value, rather than pick it from a list.

So 22, 16 year olds on the Titanic, and then something we've not used before is this box.

And you can choose AND.

So we can add another criteria and we need to add Boarded, and I'm going to choose from here Southampton.

So it's come up with 12.

So it's showing us 16 year olds who got on the Titanic at Southampton and there's 12 of them.

So there's two criteria.

And this has pulled out the people that met both of those.

So it's 12 people who were 16 years old and got onto the Titanic at Southampton.

Okay.

So your next task is to go and try some AND searches.

So there's some questions on the worksheet.

It's still the Titanic database and you're all looking for two criteria.

Okay.

So using the AND option to put those two criteria and pause the video now.

Okay.

So let's go through those together then.

So the first one was, how many males were in First class? So I used just clearly searches and then I need to go and choose gender.

And we're looking for male and we are looking for the class and it was First class.

So 118.

So of the First class passengers, 180 were male.

I will just clear that search.

The next one is how many females died.

So I need to go and click on that, choose gender.

And we were looking for females and then we need to come onto this and choose AND.

And we're looking for victim or survivor well sadly there were victims. They died as the ship sank.

And there we have it, 143 of the people who died were women.

The next one is how many women, how many females boarded in Belfast? So we're clear those.

So I'm going for gender and we're looking for female and boarded in Belfast.

So I'm just going to choose AND.

Let me click on this Boarded.

I'm looking for Belfast.

Okay.

So gender is female boarded in Belfast, none.

Okay.

So no women got onto the Titanic at Belfast.

I want to just clear that one.

And it says how many males under 10 were on board? So we're looking for gender and we're looking for male and we look at the age.

So I need to go AND.

Age is 10.

So there's a big long list here.

Or we can just type in so I'm going to type in because it's quicker.

Three, so there were three 10-year-old boys on board.

Okay.

So we've got some more thumbs up statements.

And this time we're using a different phrase, this is OR.

So we've been using AND.

So both parts had to be true.

And now we're using OR, which means either parts can be true.

So of these statements, if either piece that is true, put your thumb up.

So the first one, thumb up if you're a girl or you have brown hair.

Well, my hair is colour brown so that's a thumbs up from me.

The next one we've got is thumb up if you have brown eyes or you had toast for breakfast.

Okay.

Neither of those are me, hands down.

The next one is thumb up if your hair is tied back or you have a jumper on.

Okay.

Neither of those for me.

Hand down.

And then the last one is if you got laces in your shoes or blue eyes.

Well, I've got blue eyes, so that's me.

Okay.

Hands down.

So each of these it's either parts can be true.

And again when we were using the database, there is an OR tool which lets us search.

And so we're going to look for examples, how many people were in First or Second class? Okay.

So before we search, do you think the answer is going to be more or less than the people in First class only? Can I give you a way to think about that? So if we search for first or second, will that give us a bigger number than if we search for first? Okay.

And if you've decided what you think, think why.

Why do you think that? Okay.

So all look and see.

Okay.

So let's try that out.

So our question is, how many people were in First or Second? So we go into our search and we were looking for Class and the value is First class.

Okay.

So that's 324 and we need to add our second criteria.

And it's OR.

Okay.

We've been using AND.

This is OR.

So First class or Second class 608.

So it's more, okay.

Because it's two criteria and it could be either of them.

So it's likely to bring up more results.

So First or Second class, 608 passengers.

Okay.

So your task now is to go and do some OR searches off the Titanic database.

Okay.

The questions are on the worksheet.

Pause the video now.

Okay.

So let's look at each of those together.

So the first question is, how many people boarded at Belfast or Queenstown? So these are both boarded.

So it's boarded at Belfast OR Boarded again.

at Queenstown.

Okay.

So boarded at Belfast or boarded at Queenstown.

It's 133.

So I'll clear my search.

Clear those.

How many passengers were under 18 or over 70? Looks quite slightly tricky that one.

So the age I'm looking for, under 18.

So this is less than, I need to key this in.

It's quicker.

Less than 18 OR over 70.

So another age one and it's the greater than symbol.

And we key in 70.

Okay.

So under 18 or over 70, 188 people.

We can just check it's right because if we look down the list, you can see that the people over 70 or under 18.

Okay.

I clear that one.

Who was the oldest person in First or Second class? So I need to pull out the people of the class.

So it needs to be first and we need to add another one or Class is Second.

Okay.

So this is the First or Second class passengers.

And I need to know who was the oldest person.

So what I can do now is I can actually sort, if I click on age, as you've done before.

This is the youngest click again.

And we've got the oldest person who boarded, so the oldest person who's first or second class is a 70 year old, 71 year old.

In fact, there's three 71 year olds.

We'll just clear that one.

And then who is the oldest person out of the people who boarded out Southampton or Cherbourg.

So we need to get where they got on.

And that was Southampton.

Let me just check or Cherbourg.

So boarded at Southampton or boarded at Cherbourg.

And actually mine is still sorted.

Who's the oldest.

So the youngest click again.

The oldest person that boarded at Southampton or Cherbourg is 74 year old Mr. Johan Svensson.

There we go.

So we've been using OR searches and then we've even been sorting out data afterwards to find out something more specific.

Okay.

So before we finish, let's just have a think about AND and OR in real life.

So think about a TV-streaming service where you can pick and choose programmes you want to watch.

What kind of fields might the company use to organise all of their Fitbit TV programmes, their data by.

I'll give you a moment to think.

Okay.

They might organise it by how long it is, what it's called, who it's suitable for.

Okay.

So it might have an age range.

My other type.

Is it comedy or is it music? So have a think now about how you might search that database using AND, we'll go with AND first.

So try and think of, we've got down here, we've got name, length, type, age range.

Try to think of an AND search that you might be able to use on that TV streaming database.

I'll give you a moment to think.

Okay.

So it might be, we are searching for something which is 30 minutes long or up to 30 minutes long and it's comedy.

So try and think of an OR search.

I'll give you a moment to think.

So it might be something suitable for children under five or it's music.

It might be that it is a particular name.

So say it's Batman or it's and it might be Spiderman.

We might have two names that we search for.

Okay.

So in this lesson that you've used database tools to help you search and you used AND and OR within your searching.

You also chose the correct search tools to help you answer questions about data.

So if you'd like to share your work with Oak, please do, you can ask your parent or carer to share your work and they can share on Instagram, Facebook, or Twitter and tag it with @OakNational and #LearnwithOak.

See you next time.