Academic journal article Journal of Information Systems Education

Five Data Validation Cases

Academic journal article Journal of Information Systems Education

Five Data Validation Cases

Article excerpt

Data-validation routines enable computer applications to test data to ensure their accuracy, completeness, and

conformance to

industry or proprietary standards. This paper presents five programming cases that require students to validate five

different

types of data: (1) simple user data entries, (2) UPC codes, (3) passwords, (4) ISBN numbers, and (5) credit card

numbers.

Keywords: Data Validation, Computer Programming, Check Digits, ISBN Numbers , UPC Codes

1. INTRODUCTION

It is difficult to overstate the importance of creating data validation routines as an integral component of most application software. This observation applies to health care systems (Barlow, 2006), engineering systems (Butts, 2007; Griebenow and Caudill, 2005), airline baggage-handling systems (Bailey, 2007), and mortgage banking (2007), but is also a vital part of applications in sports, medicine, and academia.

As used here, the term "data validation" refers to methods for ensuring that the data entered into a computer system are complete, accurate, and reasonable. In many business settings, such validation also requires conformance to industry standards--for example, consistency with the 16-digit standard of consumer credit cards or the 10-digit ISBN numbers used by book publishers. In other cases, proprietary data formats are used, necessitating custom validation code to ensure their accuracy. In all cases, it is difficult to identify a business or government activity in which inaccurate data entry is even remotely acceptable.

Most computer programmers are well aware of the comparatively large amounts of code usually required to validate input data, but such programming burdens are typically unfamiliar to students in entry-level programming classes. A similar comment applies to the methodologies required to perform such data validations--for example, the computational methods for validating ISBN codes.

The techniques for data validation tasks vary with the application, but are usually essential to the development process. Typically, they require an understanding of string parsing, looping, and of course selection code for creating the requisite validation tests. Selection code is also required to decide whether or not the data pass such test procedures. Because data validation tasks require a wide array of programming skills, such problems are useful not only as examples of real-world programming tasks but also as integrative exercises that encourage students to draw upon the skills they've acquired from disparate chapters of standard programming texts.

The purpose of this paper is to outline the computational strategies required to validate user values in five, common data-entry applications. In order of presentation, they are cases requiring the validation of (1) simple data entry, (2) UPC codes, (3) passwords, (4) ISBN numbers, and (5) credit card numbers. Each case is independent of the others, and can therefore be assigned individually.

The paper presents these cases in approximate order of programming difficulty, although this is a somewhat subjective judgment. The author has used each of them successfully in at least five different Visual Basic programming classes, although the solutions to these cases can also be developed in such other procedural programming languages as C++ or Java.

2. CASE 1: VALIDATING SIMPLE USER ENTRIES

2.1 Description:

Many data entry screens allow users to enter name, address, or similar personal information. The screen in Figure 1 is an example. This interface allows users who have placed catalog orders to also purchase monogramming, gift wrapping, or even a singing telegram. The application also requires developers to validate the inputs from several types of input controls, including radio buttons, check boxes, and textboxes.

2.2 The Customize Order Screen

The application works as follows. …

Search by... Author
Show... All Results Primary Sources Peer-reviewed

Oops!

An unknown error has occurred. Please click the button below to reload the page. If the problem persists, please try again in a little while.