Category: 

What Is Data Validation?

Article Details
  • Written By: Alex Newth
  • Edited By: Angela B.
  • Last Modified Date: 15 October 2014
  • Copyright Protected:
    2003-2014
    Conjecture Corporation
  • Print this Article
Free Widgets for your Site/Blog
The CDC reported that eight foods, including peanuts and milk, account for 90% of food allergies.  more...

October 25 ,  1971 :  The United Nations expelled Taiwan and admitted China.  more...

Data validation is the process of checking a program or database to ensure the information is standard and clean. There are different standards, based on the programming language used or the type of information collected and stored in the database. The process can be simple or very complex. A variety of tests can be used to ensure validation. If data are not regularly validated, then this can lead to security problems, because hackers will have less trouble sneaking into unorganized and non-standard coding.

There is no universal standard for data validation; rather, the standard depends on what information is being validated. For example, some programming languages allow underscore marks to be used in lieu of spaces to connect several words, while other programming languages do not allow underscore marks. These kinds of differences mean all data validation must be specific to the data; otherwise, it can cause problems and inconsistencies with the data’s standards.

Performing data validation can be simple or complex. A simple validation procedure would be checking a database of phone numbers and ensuring that letters and non-standard symbols — such as the percentage symbol or a dollar sign — are not included. More complex validation procedures check to ensure that programs reference the correct files and that there is no corrupted code in the program.

Ad

To ensure data validation, there are many tests that can be used, most of which are handled by a validation program. For example, a consistency check will ensure that all records are consistent; if a record is supposed to have a name followed by a phone number, then a consistency check will ensure all records follow this order. Limit and range checks will look through numbers in the program or database and ensure the numbers are not too high or out of range. For databases and programs that cannot have redundant data, a uniqueness check will make sure that each record is unique.

Aside from making data work better and ensuring standard coding or inputs, data validation also helps protect against hackers. When data is disorganized, or non-standard, it has a high potential of being corrupted and working poorly. This means a hacker can sneak into the system easier than if all the data were valid. For example, when the code becomes corrupt, it will be prone to changes; this means a hacker can infiltrate the system and change coding to open holes or steal information without being easily detected.

Ad

More from Wisegeek

You might also Like

Discuss this Article

David09
Post 3

@MrMoody - Whatever language you use, I think the use of underscore marks for database field names is most likely the safest convention – even if your language allows you to use spaces.

Spaces are a big no-no in Microsoft Access. I work for a software company that uses Access and sometimes our customers will create spaces in their field names.

All I can tell you is that creates a host of problems. In my opinion, you can’t go wrong with underscore characters.

MrMoody
Post 2

@miriam98 - I think that bounds checking in data validation is the easiest kind to perform. Bounds checking means that you make sure that the numbers are within a certain range.

What’s neat is that you don’t have to write code to accomplish this as well. You can apply certain constraints when you build the database, so that if someone enters numbers that are out of bounds, the program will flag an error.

In Microsoft Access it’s called a Validation Rule and you can set it when you build a table. The rules are applied against the individual fields in the design view. There is absolutely no code needed.

miriam98
Post 1

In computer programming we use a technology called expression matching to perform some of the data validation described in the article.

We define search patterns and the data is validated against those patterns. If, for example, we want to make sure that all phone numbers are separated by dashes and have area codes set off by parentheses, we define a search pattern containing this particular format, and the program whips through the database and makes sure that all the phone numbers match up.

If they don’t, those records get flagged for further analysis and cleanup. Search patterns are awesome; they simplify a process which would otherwise have to be done by writing chunks of code logic to accomplish the same results.

Post your comments

Post Anonymously

Login

username
password
forgot password?

Register

username
password
confirm
email