Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
55 views5 pages

Draw Arrows To Match The Definitions

Validation in databases looks for mistakes in entered data. If data is invalid, an error message appears. Validation does not prevent all mistakes but finds some. The document discusses different types of validation rules including format checks, presence checks, range checks, lookup checks, and size checks. It provides examples of applying these validation rules to fields in a database table for storing student information.

Uploaded by

Michael
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
55 views5 pages

Draw Arrows To Match The Definitions

Validation in databases looks for mistakes in entered data. If data is invalid, an error message appears. Validation does not prevent all mistakes but finds some. The document discusses different types of validation rules including format checks, presence checks, range checks, lookup checks, and size checks. It provides examples of applying these validation rules to fields in a database table for storing student information.

Uploaded by

Michael
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 5

NAME: Michael Oladipo_______________________________ DATE: ________

A. Fill in the gaps


prevent mistakes error validation

1. Validation_____________ is where a database looks for


mistakes_____________ in data being entered.
2. If the data is not valid, an error______________ message appears.
3. Validation does not prevent_____________ all data entry mistakes, but finds
some.

B. TYPES OF VALIDATION RULES: Draw arrows to match the definitions

Format check
checking data is more or less than a minimum or maximum
number of characters.

Presence check e.g. 2 letters then 2 numbers – PR15 would be valid

Range check data is between certain numbers or letters, e.g. A–E

Lookup check checking that the field contains data.

Size check
only values from a set list can be entered, e.g. M or F.

1
C. Open your COLLEGE database and create a new Table called tblPeople.
Screenshot each of these validations on each field as suggested below to show
evidence. Upload it on Canvas.

Create a new database table like


this

This is a presence check on the


name field.
Change the required property to
‘Yes’. This means that when
records are added, the name HAS
to be entered.

Add some validation text too. This


comes up in a message if a name
is not entered.

This is a format check AND range


check all in one!

The input mask helps people to


enter data in the correct format. 0
means ANY number. (L means any
letter)

The rule makes sure that the birth


date is between 1/1/93 and
today… # tells the database that
it’s a date. NOW() is a function to
get the current time & date

2
This is a look-up check.

Gender has to be M or F.
“Quotation marks” always need to
be used when referring to text!

Another look-up check. You can


decide which colours to allow!

This is a range check.

>=1 means more than or equal to


1.
<=100 means less than or equal
to 100.

3
D.
Test it works!

DO validation rules capture all mistakes??? Circle the error!

E. Creating a drop-down box for colours…

Some Common Input Mask Characters

Character What it means...

0 A digit between 0 and 9 must be entered

# An entry is optional, but it must be a digit between 0 and 9

L A letter between a to z must be entered

? An entry is optional, but it must be a letter from a to z

A A letter or digit must be entered

a An entry is optional, but it must be a letter or digit

& Any character must be entered

4
\ This causes the character that follows to be displayed on screen

F.
Which TYPE of validation rule would you use? Fill in the gaps in the table. (format, range
or lookup?)

Field Name Data Type Validation Type Validation Rule

StudentId Autonumber n/a n/a

First Name Text Text only

Last Name Text Text only

Date of Birth Short date > 1920 and <


today’s date

Nunber of GCSE
Number 0 to 12
passes

% mark in a test Number 0 to 100

Gender Text M or F

You might also like