Project Information

  • Term Project Descriptions: PDF

  • Demos schedule: TXT


  • Testing Environment:
    The Java version on Pitt's unixs machine is "1.5.0_17". We will test your projects only on pitt unixs machine. Although you are free to develop your project in a different environment, you should make sure your code works in the Pitt unixs environment before submitting your project.

  • JDBC Documents: http://java.sun.com/j2se/1.3/docs/guide/jdbc/

  • Instructions for doing projects in XP Windows:
    In order to correctly connect to the Oracle serever using JDBC you need to have several files in your working directory. These are all contained in the file oracle.zip. Dowload this file into the directory of your project.

    Specifically, We assume you have Java virtual machine installed in your machine. Download the JDBC classes (oracle.zip) from course website. You need to modify your CLASSPATH environment variable to contain the path to the downloaded file, for example, if you put the downloaded file in directory C:\ABC\XYZ, you need to specify CLASSPATH=.;C:\ABC\XYZ\oracle.zip; (Refer to http://java.sun.com/j2se/1.3/install-windows.html#Classpath for information about how to set up CLASSPATH environment variable for java programs.)

  • Instructions for doing projects in UNIX:
    There is no need to download the Oracle JDBC classes if you are using UNIX. You only need to specify the environment variable CLASSPATH. In order to help you, we have modified the bash.env and tcsh.env with all the necessary definitions. So, you only need to source these files as usual before running your programs.

  • Demo Program
    To help you started, downlod and execute the following demo Java program: JavaDemo.java. The JavaDemo has all the code and an example embedded in it. You can this program as a skeleton for your project.

  • dayofweek
    Unfortunatelly, dayofweek() is not working as advertised in the latest version of the Oracle manual. This applies to both sqlplus and Embedded SQL. Instead please use "to_char()". You can read the Oracle SQL Reference manual for details (pg 3-52).

    Here's a quick overview:

    select to_char(mydate, 'DY') from .....
    --> returns "sun", "mon", "tue", "wed", "thu", "fri", or "sat".
    
    select to_char(mydate, 'D') from .....
    --> returns 1-7 (with 1 being sunday)
    
    * mydate must be a date attribute from a relation.

    If instead of a date type, you have a string that you want to figure out which day of the week it falls on, you need to also use to_date(). For example:

    select to_char(to_date('19-apr-2003'), 'DY') from .....
    --> returns "sat"
    
    select to_char(to_date('19-apr-2003'), 'D') from .....
    --> returns 7