CS125 Project, Part 6

Due PRIOR TO class, Wednesday Dec. 6, 2006

Part 6 of Your Project

Your final assignment is to build a "user-friendly," interactive application program front end to your Project using one of the programming languages supported by PostgreSQL.  These include: C, C++, Python, Lisp and Java.  There is also an ODBC driver that may be used.  You can also use PHP to create a nice web-based interface to your database.  You can find documentation on most of these options at the PostgreSQL Client Interfaces site.  (If you want to use Lisp, check with me for info on the Lisp interface to PostgreSQL.)  Regardless of your selected language, you will be turning in your code, which should be appropriately documented

Your program should consist of a continuous loop in which:

1.
A list of at least five (5) alternative options is offered to the user.  An additional alternative should be quit.
2.
The user selects an alternative.
3.
The system prompts the user for appropriate input values.
4.
The system accesses the database to perform the appropriate queries and/or modifications.
5.  
Data or an appropriate acknowledgment is returned to the user.

You should include both queries and modifications among your options. For example, if your PDA were about dealers, cars and drivers, you might offer options such as
  1. Look up the price of a given car at a given dealer.
  2. Find the dealer with the lowest price for a given car.
  3. Given a driver, find all the other drivers that shop at least one dealer in common.
  4. Add a new car to the set of cars a driver likes.
  5. Increase all the prices at a given dealer by a given amount.
  6. Quit.

I am not requiring anything fancy in the way of interface. For example, if you do not use a Web form, then a menu printed via printf is OK. Also, handling of SQL errors can be quite simple. As a minumum, write an sqlerror routine that just prints the error message from PostgreSQL.  I am especially interested in how effectively you can utilize the database schema you have designed to support interesting and/or engaging user interactions. 

Submit your program and sufficient documentation for me to run it.  At this point, your database should be populated with meaningful data.  This means that the values of attributes in your relations should not be random strings.  As before, please create a tar (or zip) file named <your-db-name>p6.tar and expands to create a directory <your-db-name>p6, which contains any files relevant to your program for this assignment.

If you build a Web interface to your database that allows the sorts of options described above, then in addition to your code, please submit the URL and some sample data values that will give nontrivial responses to your queries. In this case, your project should be kept on some server that is normally available, such as with your student home page or a machine that you control that happens to have static IP address.

Presentations

You will have 10 to 15 minutes in class on Wednesday and Friday December 6th or 8th to demonstrate your program.  You should prepare a short presentation that describes the features of your Project and exercises the functions of the interface as described above.  You are not required to demonstrate every interface option if you want to spend more of your time describing interesting features of your Project.  (However, I will be testing every option with several inputs so make sure they all work.)

Since each of you will be demonstrating your Project from my laptop, make sure you submit your assignment to Eureka with all necessary files by the due date and time (11:30am, Wed. Dec. 6). 

Acknowledgements:  Most of the material for the project descriptions and assignments has been taken from Professor Ullman's website.