levo

Data, Information and Data Representation

Validation: range, type, length and presence checks

  • 3 things to know
  • AS Unit 2

Overview

Data validation, range check and type check.

What you need to know

Answer each one before you reveal it.

Your recallNot started
Key term

Define data validation.

Key term

Why can validation not guarantee that data is correct?

Key term

What is a range check?

Questions from this subtopic

Each one with the model answer underneath.

  1. 1

    Define data validation.

    Model answer

    Data validation is an automatic check carried out by a program on data as it is entered, confirming that the data is sensible and obeys the rules set for that field.

  2. 2

    Why can validation not guarantee that data is correct?

    Model answer

    Validation tests only whether a value is allowable, so a wrong value that happens to obey the rules, such as an incorrect date of birth within the permitted range, is accepted without question.

  3. 3

    What is a range check?

    Model answer

    A range check confirms that a numeric or date value falls between a stated lower limit and a stated upper limit.

  4. 4

    Which range check suits a field holding the month of a date as a number?

    Model answer

    A month number should be checked to be no less than 1 and no greater than 12.

  5. 5

    Which range check suits a field holding an examination mark expressed as a percentage?

    Model answer

    A percentage mark should be checked to lie between 0 and 100 inclusive.

  6. 6

    A range check on a customer's age accepts any value from 0 to 120. Explain the weakness of this check.

    Model answer

    An age of 7 typed for a customer who is really 70 falls inside the permitted range and is accepted, so the check catches only impossible ages and not mistaken ones.

Other ways to work this

The same content, four other ways.

What is inside Levo

Six ways to work the same material.

1Closed book
2Open book
3Closed book

The 3-step method, run for you

Answer cold, learn it, then prove it stuck. Levo tracks the jump between your first attempt and your last.

Systems Analysis and Development Approaches
Design, Development and Testing
Implementation and System Security
Programming

Cram a whole paper in one sitting

Sort every topic into what you know and what you do not, then drill only the weak ones.

A check requires a value.
presencerangeformat

Blank Blitz makes facts automatic

Rapid timed gap-fills on the terms and numbers you need to recall without thinking.

ANormal data is 12, which should be accepted.
BBoundary data is 1 and 50, which should be accepted.
C0 and 51, just outside the limits, should be rejected.

Build It gets the exam shape right

Assemble a full-mark answer from its marking points, in the order an examiner wants them.

One byte is made up of 8 bits.
TrueFalse

Test It catches misconceptions

Spot the fault in a statement. The traps are the mistakes students actually make.

721941163128510

Brain Breaks between sessions

Short focus games to reset attention, so the next set lands better than the last.

Every question in Data, Information and Data Representation, on a schedule.

Attempt a question from memory, write the correct version, then attempt it again. Levo records the jump between your first attempt and your last, and brings each question back on the day you are due to forget it.

Or £46 a year, about £3.83 a month. Cancel anytime.