levo

Data, Information and Data Representation

Validation: range, type, length and presence checks

  • 3 things to know
  • AS Unit 2
Start revising · £5/month

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.

Everything in your subscription

Runs, plus a mode for every other kind of session.

1Flash
2Imposter
3Fade
4Brain dump

Learn every subtopic in runs of four questions

Facts flash and fade, a wrong word hides in some of them, and a brain dump decides which questions are locked in.

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

Cram the night before, weakest topic first

A quick scan finds your weakest topics. Recall each fact you missed three times in a row.

A check requires a value.
presencerangeformat

Blank Blitz consolidates the facts

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

✓What it iscovered
~Why it happenspartly there
How long it lastsnot there yet

Explain It tests your understanding

Explain a concept in your own words and see which of its points you covered.

One byte is made up of 8 bits.
TrueFalse

Test It catches misconceptions

Spot the fault in a statement. The faults are the mistakes students make most often.

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.

Learn it in runs of four questions, each ending on a brain dump against the clock. Every question you lock in comes back the next day, then at longer gaps, each time just before you would forget it.

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