Easier to read with cream paper, a tint, more contrast or larger text? Choose your colours and text, once, for every page.

Preview

Unit 6 B1: Validation rules and the ERD

This is the first page of the lesson. Read it and have a go at the activities. The rest is in the full lesson.

50 minutes

A member who is 150 years old

Oakfield Youth Club is made up. Its members are aged 11 to 19. One morning the list shows a member aged 150 and another with no phone number.

Nobody meant to do it. A typing slip is enough. A good design stops bad data before it is saved, and shows how the tables link.

By the end of this lesson

Note

I can choose a validation (a test on entered data) for a field and show how tables link in a diagram.

Key words

WordWhat it means
Validationa check that data is sensible when it is entered
Presence checka check that a field is not left empty
Range checka check that a number is between two limits
Format checka check that data follows a set pattern
Entity relationship diagrama picture of the tables and how they link
One-to-manyone record in one table links to many in another

The cells students fill in are left blank in this preview.

Starter: what you already know

Have a go

Starter: what you already know

3 questions
Have a go: your answers are marked here and then forgotten. Sign in if you would like your score kept, and to pick up where you left off.Sign in to keep your score

Your answers are marked here and are not kept. A college account keeps every student’s marks.

Six checks keep data sensible

A list check accepts only values from a set. A rule check tests a rule, such as an end date after a start date. A text check tests the letters, such as a limit on length.

A presence check refuses an empty field. A range check sets limits. A format check tests a pattern, such as a phone number that starts 07.

Checks for the members table

FieldCheckWhat it refuses
last_namePresence checkA blank last name
ageRange check, 11 to 19Ages of 9 or 150
phoneFormat checkA number that is too short or does not start 07
weekdayList checkAny word that is not a day
first_nameText check, 30 charactersA name longer than 30 characters

The cells students fill in are left blank in this preview.

Check

Have a go

Check

3 questions
Have a go: your answers are marked here and then forgotten. Sign in if you would like your score kept, and to pick up where you left off.Sign in to keep your score

Your answers are marked here and are not kept. A college account keeps every student’s marks.

The lesson goes on

8 more parts of this lesson are in the full lesson, which colleges teach from the Library. A college account gives your students all of it.