Databases – Lesson 1

Download Report

Transcript Databases – Lesson 1

DATABASES – LESSON 3
Key Stage 3 ICT
STARTER


Starter -Try and fling the teacher.
In Lesson 3 folder, run the file named “Starter –
Open and closed questions”
OBJECTIVES

Know about and be able to use data types correctly

Know about and be able use validation rules

Know about sorting records in queries.
OUTCOMES



All: Will have recorded the error messages for validation errors
Most: Will have customised validation error messages
Some: Will have created queries that sort the data.
HERE IS YOUR MISSION…

You need to find out about students favourite:
Fruit
 Drink
 Number


Vowel
 Colour
 Subject
 Secret Word

You must design a questionnaire, using a range of
open / closed questions.
TASK 1 – PART 1

Log into your email and create an email to send to 7
classmates. The email should ask them the following
questions.
 What is your favourite;

Fruit
Drink
Number
Vowel
Colour
Subject
And ask them for a secret security word

You MUST use a range of OPEN and CLOSED questions.

For closed questions, use square brackets for responses.


E.g. [ ] Cheese [ ] Bacon [ ] Eggs
For open questions, simply leave a gap.

E.g. Favourite Sweet:
TASK 1 – PART 2

Enter the usernames of five people in the class,
in the TO box, separated by a comma. (e.g.
13SmithR, 13JonesP, 13TothK)

Give your email a suitable subject.

Send your e-mail.

Tell the recipients, they have new e-mail!
TASK 1 – PART 3

Reply to any email messages you get by
completing their questionnaires and sending it
back to them.

CHANGE THE SUBJECT TO: QUESTIONNAIRE
COMPLETED.
TASK 1 – PART 4

Open the Favorites Database FROM
My documents  ICT  Year 7 
Databases  Lesson 3

Enter one of questionnaire results you get back
PLUS one record for yourself.
DATA TYPES - CONTAINERS
In your kitchen would you store flour in a bowl?
 How about tomato ketchup in a bag?
 How about pasta in a egg basket?


Each type of food has its own container….

Exactly the same for Databases
Demo this on the favourites database.
WHY DO WE USE VALIDATION. TASK 3A


In your booklets, write 2 reasons for using
validation.
Queries need exact matches
Get the students to list all the terms of boys –
Then explain how difficult it would be to write a query
to match.

Making sure we get sensible data – if we want
your age then only allow numbers.
TASK 1 – PART 5

Open the design view of
the table by right
clicking on the table
name and selecting
Design View.
DATA TYPES - CONTAINERS

We store numbers in

Open questions in
Such as Name
DATA TYPES - CONTAINERS
Closed questions in
Such a favourite Vowel
Choose “I will type values in.”
Enter the vowels and
click Finish
ADD VALIDATION AND ADD YOUR DATA –
TASK 3B

As you are adding your data from your surveys….
Try to store a numbers in the name field?
Try to store some text in the favourite number
Try and enter a consonant in the favourite vowel
Print screen the 3 error messages into your booklet.
CREATE A QUERY
1
2
3
4
Double
click the
fields
you
want in
your
query
5
Add your criteria,
and Click the
cross to save
your query –
don’t forget to
name it.
ADD SORT



Design a “All students”
query. Your can sort
the order of records in
your queries.
Select ascending and
see the effect. The
records should be
sorted from A to Z.
Print screen the results
of your query.
WRITE QUERIES TO SELECT . – TASK 3C. .

If you want to – look back at the queries you did in
the last lesson in your booklet.
1.
Select all records in your database. Hint. Do not
add any criteria. Sorted Alphabetically from A to Z.
Name it “All students”
2.
Select students that have the same favourite subject
as you, sorted by subject from Z down to A. Name it
“Favourite subject”. Hint use a wild character “*”.
3.
Use a parameter query to select Favourite Colours.
Name it “Favourite Colour” and sort the records by
favourite vowel.
PLENARY

(RANDOM)
Try the plenary quiz in your booklets.