Chapter 4 Lab

Adding Rows to Database Tables

Make yourself a copy of this CGI script.

Tasks to Do for this Lab

Solution

Extra for Experts

Reject attempts to INSERT a book that already exists in the table, i.e. when a book already exists with the same title, price, and edition.

Extra-Extra for Expert-Experts

Modify the HTML form and CGI script to elicit the title_id from the user instead of by auto-incrementing. What happens when you try to INSERT a book with a duplicate title_id?

Extra-Extra-Extra for Expert-Expert-Experts

So far, are we complying with relational database normal form? If not, how should we modify our schema?

 
Dan Keller Technical Services © 2000