CGI and Perl

Using DBI to Solve a Real World Problem

Thomas E. White, a computer systems analyst at Mississippi State University, put together a nice example using DBI to set up a WWW "browse and search" application. In this example, DBI is used with DBD::mSQL to maintain, view, browse, and search an A/V library database.

The following software was configured on a Sun server for this example: Solaris 2.5

MiniSQL version 1.0.16

Perl related software

Version 5.003

CGI.pm-2.21

DBI.pm-0.71

DBD-mSQL-0.60pl10 First, the following raw records were saved to a text file, as shown in Listing 8.1.

Listing 8.1. Records to be imported into database

ABC OF GOLF GREEN CONSTRUCTION
 F0A4-0001.00
 Film
 U.S. Golf Association, Clemson University, 1970
 1 Reel.  16mm.  Sound.  Color.  20 min.
 A detailed, step-by-step process of golf green construction. Includes
 planning  and development,
 preparation of grade, drainage and soil mixtures. Very good film.
 .
 College
 Adult
 ABC'S OF DECISION MAKING
 F0C6-0001.00
 Film
 Creative Media, 1975
 1 Reel.  16mm.  Sound.  Color.  30 min.
 Making a decision is often an unpleasant task. The aspects of decision making to
 insure that they will be effective are covered in this film.
 A leader's guide is included.
 .
 College
 Adult
 ALL SUCCESSFUL PEOPLE HAVE IT
 F0C6-0002.00
 Film
 Motivational Institute, 1980
 1 Reel.  16mm.  Sound.  Color.  28 min.
 Narrated by Marilyn Van Derbur, this film helps teens and adults be "somebody"
 in their own eyes. It shows how to accomplish something to be proud of -
 self-confidence and a positive self-image. It stresses the importance of having
 a goal and a logical, well-organized plan to carry  it out.
 Rated high by 4-H youth
 who previewed it.
 .
 Junior High, grades 7-9
 Senior High, grades 10-12
 College
 Adult

by BrainBellupdated
Advertisement: