Project 5 Deliverable

Your final assignment is to build a ‘user-friendly’, interactive application program front end to your PDA using a programming language that supports an interface to PostgreSQL. These include but are not limited to: C, C++, Perl, Python, Racket, Common-Lisp and Java. A web-based interface to your database is nice but is not required. You can find documentation on most of these options at the PostgreSQL Client Interfaces site. (If you want to use Racket and cannot find the package to require, check with me.) Regardless of your selected language, you will be turning in your code, which should be appropriately documented.


Your program should consist of a continuous read-eval-print-loop (REPL) in which:

  1. at least five (5) alternative options are offered to the user. An additional alternative should be quit.
  2. the user selects one of these alternatives,
  3. and in at least one case, the system prompts the user for input values that are used to focus the query on the database;
  4. the system queries the database to extract the appropriate information or to perform the appropriate modifications, and finally
  5. data or an appropriate acknowledgment is displayed for the user.
You should include both queries and modifications among your “five or more” options. For example, if your project was based on our in-class cars/drivers/dealers database, you might offer options such as:

I am not expecting anything fancy in the way of interface. For example, if you do not use a Web form, then a menu printed via printf is perfectly acceptable. 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.

Your REPL interface should run either in a standard web browser or as a terminal-based user application on vwardrobe.


You will have five (5) minutes to demonstrate your program in class. These presentations will take place on Friday, Dec. 6th. You should prepare a short presentation that highlights the features of your project and exercises several of 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.

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.

Submisions Instructions

Submit your program -- schema creation and table population scripts, interface code, and program logic -- together with a README 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. (Note, you do not need large tables; the artificial data was for testing joins with and without indexes.) As before, please create a tar (or zip) file named <your-dbuser-name>p5.tar and that expands to create a directory <your-db-name>p5, which contains all the 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, make sure that your README file clearly identifies the URL where application is running. 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 a static IP address.