Home | Syllabus | Schedule | Class Notes | Assignments
University of Alaska Fairbanks
Computer Science Program

CS 205: Intermediate Programming

Assignment: Perl Database

Assignment goal: To manipulate a simple database in Perl.

Assignment structure: Use a Perl program to interact with a MySQL server (as demonstrated in class). Use a command-line program, CGI, or both. Provide input to an existing table, and get and display output from the table. The program must include proper error checking for unexpected output from the MySQL server.

Required input and output: Required input is 2 or more new records of data. Required output is a listing showing the table structure (from the SQL command: show create table), table contents before a row insertion, and table contents after a row insertion.

Further work: Optionally, let the user specify the table structure, data types, etc. Optionally, handle errors gracefully (i.e., through data type checking prior to inserts).

Deliverables: Send email to Prof. Newby with two attachments. First is your Perl program. Second is a plain text file showing a sample run of the program. If you use a CGI program, send screen dumps or a similar view of the HTML input/output sequences.

Grading: 10 points for required functionality, plus up to 2 points for extra functionality, as follows:

Criterion Max. Points Description
Functionality 6 Meets assignment I/O requirements
Legibility 2 Includes comments; neatly written
Parsimony 2 Uses appropriate data structures and syntax; not overly complex or convoluted
Extra work 2 Functionality demonstrating clear understanding beyond the assignment requirements

Most recently updated: