|
As with type checks, most databases will automatically perform length checks on any entered data. The length check is a validation check which ensures that the data entered is no longer than a specified maximum number of characters. This is particularly important if a fixed length field is being used to store the data. If this is the case then any extra characters typed that made the data longer than the space available to store it would be lost. Here are some example field names and appropriate maximum lengths :
Field Name | Maximum Length | Valid Data | Invalid Data |
Title | 6 | mr, Mrs, George | The Duke Of, Sixteen |
Surname | 15 | Smith, Jones | Smethurst-Whately |
County | 15 | England, Car | The Former Yugoslav Republic of Macedonia |
Length checks are usually only performed on alphabetic or alphanumeric data.
GCSE ICT Companion 04 - (C) P Meakin 2004