Joe Celko's Data and Databases: Concepts in Practice
By Joe Celko
Chapter 15: Check Digits
Chapter 15: Check Digits
Overview
Charles Babbage, the father of the computer, observed in the mid-1800s that an inseparable part of the cost of obtaining data is the cost of verifying its accuracy. He was concerned with errors because he conceived of his ?difference engine? as a way to calculate accurate mathematical tables for the British navy. The manual calculations done by clerks were filled with errors; no chart or table then in use was regarded as accurate when it was issued. Dionysus Lardner, a well-known popular science writer, wrote in 1834 that a random selection of 40 books of mathematical tables had a total of 3,700 known errata, some of which had their own errors.
The best situation is to exclude bad data on entry so that it is never in the system. If the data itself can contain its own verification, then we do not have to rely on another program or database to check what we are putting into the system. That is the idea of a check digit.
Just consider the problem of entering data at a supermarket checkout. The scanner reads the UCC (Universal Container Code) bar code (formerly called the UPC, for Universal Product Code) on the package, looks up the code in the database, displays the description on the cash register for the clerk, and prints the description and price on the receipt. But the scanner does not read the code correctly every time.
Statistics classifies errors as either Type I or...
Copyright Morgan Kauffmann Publishers 1999 under license agreement with Books24x7