wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Data Validation Quiz

Total questions: 40

Worksheet time: 20mins

Name
Class
Date
1.

What is the primary purpose of data validation in a database?

a)

To ensure only correct and meaningful data is entered

b)

To make data entry faster

c)

To prevent users from making any changes to the database

d)

To automatically fix errors in the data

2.

Why is an error message displayed when a validation rule is violated?

a)

To prevent users from entering data again

b)

To allow users to correct mistakes

c)

To delete the incorrect record

d)

To notify the database administrator

3.

Which validation rule ensures that no field is left empty?

a)

Type check

b)

Presence check

c)

Format check

d)

Length check

4.

A length check ensures that:

a)

Data fits within a specified range of values

b)

Data is entered in a correct pattern

c)

Data contains the required number of characters

d)

Data is unique

5.

Which validation rule ensures that a field contains data within a set limit, such as numbers between 1 and 100?

a)

Length check

b)

Presence check

c)

Range check

d)

Type check

6.

A format check ensures that:

a)

A number is not less than zero

b)

Data follows a specific structure or pattern

c)

The field is not left blank

d)

Only numbers are entered

7.

A type check is useful when:

a)

Verifying that only numbers are entered in a price field

b)

Checking if a password includes special characters

c)

Ensuring that a phone number is in a valid format

d)

Ensuring a name field contains at least five letters

8.

What happens when a validation rule is broken during data entry?

a)

The data is stored but marked as incorrect

b)

An error message is displayed

c)

The incorrect data is deleted automatically

d)

The data is corrected automatically

9.

Which validation rule would be used to prevent a student from entering an age of 200?

a)

Presence check

b)

Range check

c)

Format check

d)

Length check

10.

If a field is required to contain only numbers, which validation rule should be used?

a)

Presence check

b)

Type check

c)

Format check

d)

Range check

11.

A student ID must always be entered when registering a new student. What validation should be applied?

a)

Presence check

b)

Range check

c)

Length check

d)

Format check

12.

What is the purpose of a length check in a database?

a)

To ensure the field is not left empty

b)

To ensure the data has a specified number of characters

c)

To check if a value is within a certain range

d)

To compare two values

13.

A phone number field requires exactly 10 digits. Which validation rule should be applied?

a)

Presence check

b)

Length check

c)

Type check

d)

Range check

14.

What kind of validation would ensure that a student’s name only contains letters?

a)

Presence check

b)

Range check

c)

Format check

d)

Type check

15.

A type check ensures that:

a)

A field is not left blank

b)

A field contains only letters or numbers based on the required data type

c)

A field has a fixed number of characters

d)

A field follows a specific pattern

16.

If a database field for a student's grade only allows numbers from 1 to 12, which validation rule is applied?

a)

Range check

b)

Format check

c)

Presence check

d)

Type check

17.

A student's email address must contain "@" and end with ".com". Which validation rule should be used?

a)

Presence check

b)

Format check

c)

Length check

d)

Type check

18.

If an entry in a currency field must be in decimal format (e.g., 10.50), which validation rule should be applied?

a)

Type check

b)

Range check

c)

Presence check

d)

Length check

19.

What would happen if a student tries to enter a booking for a date in the past?

a)

An error message would appear due to a range check

b)

The booking would be saved

c)

The system would delete the incorrect entry

d)

The system would change the date to today’s date automatically

20.

If an Online/In-Person field should only accept "Online" or "InPerson", what validation rule should be applied?

a)

Type check

b)

Format check

c)

Presence check

d)

Range check

21.

What does a presence check prevent?

a)

Data from being entered twice

b)

Data from exceeding a specific length

c)

Leaving a required field empty

d)

Entering incorrect types of data

22.

A range check is used to:

a)

Ensure values fall within an upper and lower limit

b)

Ensure the field is not empty

c)

Check that text follows a pattern

d)

Ensure all characters are lowercase

23.

What validation would be best for a student’s exam score, which must be between 0 and 100?

a)

Presence check

b)

Length check

c)

Range check

d)

Type check

24.

If a booking date must always be today or in the future, what rule should be used?

a)

Format check

b)

Range check

c)

Presence check

d)

Length check

25.

If an input field should only contain numbers, what rule should be applied?

a)

Presence check

b)

Type check

c)

Length check

d)

Format check

26.

A student enters "ABC" instead of a number in an age field. Which validation rule detects this error?

a)

Presence check

b)

Type check

c)

Format check

d)

Range check

27.

Which validation rule would ensure that a password contains at least one uppercase letter, one number, and one special character?

a)

Presence check

b)

Format check

c)

Type check

d)

Range check

28.

A library system requires a book ID to be exactly 6 digits. Which validation rule is best suited?

a)

Length check

b)

Range check

c)

Presence check

d)

Type check

29.

A customer ID field must be unique for every record. What should be applied?

a)

Presence check

b)

Uniqueness check

c)

Format check

d)

Type check

30.

If a system requires a date of birth to be before today’s date, which validation rule should be used?

a)

Presence check

b)

Length check

c)

Range check

d)

Type check

31.

A validation rule ensures a username is between 5 and 15 characters. What type of check is this?

a)

Length check

b)

Range check

c)

Presence check

d)

Type check

32.

A school system requires student grades to be entered as A, B, C, D, or F. Which validation rule is best?

a)

Type check

b)

Format check

c)

Range check

d)

Presence check

33.

What is the main difference between a format check and a type check?

a)

Format check ensures the correct data type, type check ensures a specific pattern

b)

Format check ensures a specific pattern, type check ensures the correct data type

c)

There is no difference

d)

Type check is only used for numerical values

34.

A university ensures that student IDs start with "STU" followed by 4 digits (e.g., STU1234). Which validation rule is applied?

a)

Length check

b)

Format check

c)

Range check

d)

Presence check

35.

A person’s monthly salary must be greater than zero. Which validation rule is appropriate?

a)

Presence check

b)

Length check

c)

Range check

d)

Format check

36.

A user enters "ABCD123" instead of a valid email address. Which validation rule would detect this error?

a)

Length check

b)

Format check

c)

Type check

d)

Presence check

37.

A system rejects a passport number because it must contain exactly 9 digits. What validation rule caused this?

a)

Type check

b)

Length check

c)

Format check

d)

Range check

38.

A student leaves their phone number field blank, and an error appears. What rule is responsible?

a)

Presence check

b)

Format check

c)

Type check

d)

Length check

39.

A user tries to enter "Blue" in a gender selection field that only allows "Male" or "Female." Which validation rule prevents this?

a)

Type check

b)

Format check

c)

Length check

d)

Presence check

40.

A discount percentage must be between 0 and 50. What validation rule ensures this?

a)

Presence check

b)

Type check

c)

Range check

d)

Length check