CS145 - Spring 2004
Introduction to Databases
Project Part 3: AuctionBase Web Site
Due Thursday May 27th
Warning: Even more so than in the last project, a large number of students will be putting significant load onto the Oracle system at the same time. We strongly suggest that you start early for your own benefit and convenience, and please be aware that we will not extend the on-time deadline because the system is slow.


Overview

As a baseline, you will design a set of queries and updates for your AuctionBase system and create a simple Web interface for them. Ambitious students may migrate the simple front-end into a user-friendly Web interface that looks like a "real" auction site, and may exploit triggers and other Oracle features for additional functionality. Use your creativity. Several projects will be selected to be demonstrated on the last day in class (for glory, not grades).

Getting Familiar with Java Servlets

In this portion of the project you will become familiar with Java Servlets by setting up a servlet directory and experimenting with sample code for a restaurant site.

Connecting to Oracle through JDBC

The sample code does not actually connect to Oracle. Fortunately, Java and JDBC make it very easy to connect to Oracle with only a few lines of code. Everything you need to know can be found in our Introduction to JDBC help document together with the JDBC Tutorial web site from Sun.

Functionality

The functionality of your final AuctionBase system is quite flexible and open-ended, however you must implement at least the following basic capabilities in order to receive full credit on the project.

Here are some examples of additional capabilities beyond our basic expectations that you might consider adding to your system if you are feeling ambitious. Use your imagination to come up with even more.

A note on extra functionality: You can receive full credit on the project by implementing just the basic capabilities in the first bullet list and a simple Web interface. That is the standard against which projects will be graded. Many of you will realize that it is not difficult to add functionality or "pretty up" the interface. You will not receive additional points for doing so. However, in addition to the possibility of winning the AuctionBase contest (described below), we will make a note of students whose project goes well beyond the basic expectations. Such notes do not affect the grading curve, but they can on occasion affect an individual grade -- in a borderline case, or when an earlier project part was botched or missed entirely. If you have questions about this policy, please ask the course staff.

Notes

User interface

While the functionality of your AuctionBase system is quite open-ended, the interface itself is extremely open-ended. CS145 is not a user interface class and you can certainly get full credit for a solid system with simple input boxes, menus, and/or radio buttons, and simple HTML output tables, similar in style to the sample restaurant Servlet we provide. (However, under no circumstances should you be exposing SQL to the end user.) Of course we welcome much snazzier interfaces, with the zenith being a near-replica of eBay itself.

Browser compatibility

Before turning in your final project please ensure that it operates correctly using the Netscape browser on the Sweet Hall Solaris workstations. If there is a compelling reason you cannot make your system work in the Solaris Netscape browser environment (e.g., you really want to exploit certain features in Internet Explorer), you must get "preapproval" from the course staff to use a different browser environment. Send an email message to cs145@cs.stanford.edu telling us precisely what browser environment you wish to use for your project. The message must be sent by Wednesday May 19 so that we have time to work things out if your browser environment poses a problem for us. You will receive a reply within 24 hours of your message, and you must receive a positive confirmation message before assuming that your alternate environment is okay.

When the preapproval process is not followed, projects that have problems on the Sweet Hall Solaris Netscape browsers may lose points, possibly all points if we cannot run your project at all.

System testing and runaway queries

We strongly suggest that you debug your queries directly on Oracle before hooking them into your Web interface. JDBC is not particularly friendly when it comes to "runaway" queries, so you will benefit yourself and the rest of the class by using sqlplus first (through which runaway queries are easy to kill using Ctrl-C) to ensure that your queries are working properly and are finishing in a reasonable amount of time. Once you are certain your queries are working correctly, incorporate them into your Web interface.

Even with prior debugging, it is prudent to set a timeout mechanism in JDBC for all of your queries. Use setQueryTimeout([time in seconds]) on each of your statement objects, for example:

   Statement stmt = conn.createStatement( );
   stmt.setQueryTimeout(180);
   ...

Finally, you should never close an ssh or telnet session or an xterm window without stopping all queries and Java servlets first. Otherwise, queries may continue to run on Oracle long after you've turned in for the night. Specifically:

Using other languages and tools

You are not required to implement your AuctionBase web site using Java Servlets and JDBC. Any web programming environment and means of connecting to Oracle is fine with us. However, only Java Servlets and JDBC have guaranteed support from the course staff in terms of system problems, knowledge, and general help. If you choose to use alternate languages or tools, you may be on your own, and you are still required to meet the project specifications.

Most importantly: It is imperative that we can run your project with a minimum of effort on the Sweet Hall Solaris machines. Due to the size of the class we will not be able to set up separate environments for individual projects, or conduct private demos.


Having trouble?

If you run into difficulties, before contacting the course staff please consult the Project Part 3 FAQ Page. We will keep it up-to-date with answers to common questions.

What to submit

Prepare a submission directory containing a text file called README.txt along with your entire servletdir directory.

Your README should include at least the following, in this order:

  1. The line "I WOULD LIKE TO ENTER THE AUCTIONBASE CONTEST" if you want your project to be considered for the contest described below. Otherwise leave blank.
  2. A description of how the user gets to each of the basic capabilities required by the assignment.
  3. A short description of the input parameters a user can provide when browsing auctions.
  4. A list of any capabilities in your system beyond the basic requirements, how the user gets to them, and a short description of any relevant input parameters.

Since your servlet will be connecting to your Oracle database, make sure that before submission and throughout the grading period your database is loaded with all of the appropriate data, constraints, and triggers. If you are using PL/SQL procedures or functions, make sure they are loaded also.

If you did not use Java Servlets and/or JDBC: It's imperative that we can run your project with a minimum of effort on the Sweet Hall Solaris machines. You must submit all of your source code, along with the following set of files:
Makefile For compiling your source code
runServer Script for starting your server
killServer Script for stopping your server
runBrowser Script for starting a Netscape browser with appropriate arguments

As usual, from your submission directory execute the script:

  /afs/ir/class/cs145/bin/submit-project
You may resubmit as many times as you like, however only the latest submission and timestamp are saved, and those are what we will use for grading your work and determining late penalties. Submissions via email will not be accepted.

Remember that points may be deducted if you do not follow the submission procedures exactly as specified.

The (Optional) CS145 AuctionBase Contest

We will select a small number of AuctionBase systems as winners of our third annual CS145 AuctionBase Contest. Winners of the contest will:

The criteria for selection will be some combination of beyond-the-basics functionality and a good user interface.

Important - If you want your project to be considered for the contest, you must:

  1. Submit your project no later than one day late, i.e., by Friday, May 28th at 11:59pm. This deadline is to allow sufficient time for us to carefully select winners. Please note that you may not submit one version of your project for grading and one for the contest. Your last submission will be the one used for grading and late penalty calculations, and it can be considered for the contest only if it is submitted before Friday at 11:59pm.

  2. As specified in What to submit, clearly indicate at the top of your README file your desire to be considered for the contest.