Course Links

Resources

External

Due: Thursday, Oct. 17 Tuesday, Oct. 22 Thursday, Oct. 24 11:59 PM on Zapp (all files posted to zapp.smith.edu will be collected automatically)

The goal of this assignment is to create a simple database with CRUD (Create, Read, Update, Delete) functionality. You may wish to read this reference on the topic as you go.

A Curio Shop

Your job is to create the database and web interface for the owner of a shop selling curios and antiques. Each of these is a one-of-a-kind object, and the shop owner needs to be able to keep track of them in a database.

Each item has a name and description. You should also record the date each item was acquired and its price. Since none of these may be unique, you will also have to assign an inventory number to each item.

The interface you create should be able to create a table listing all items by name, with price and acquisition date, sorted according to either of the latter two. Each item should link to a detail page showing all the information for the item, including its description. From this page, links should allow the owner to modify the entry (any of the four fields) or delete it entirely. Finally there should be a link under the main listing page to add a new item.

To set up the tables for your site, you can either use the command line MySQL interface, or you can create a special one-time use initialize.php page to do that work.

Details

The listing, item addition and item detail pages will be similar to ones you have already created for the labs. Just like the add page, the update page will have two parts: an input form that sends its results to a do_update.php script to perform the actual work. The delete functionality can be just a link to a do_delete.php page, or you can include a confirmation to discourage mistakes.