Lab2: Simple JDBC

  1. Accessing the Oracle database server:

    Using a text-based client:

    a.) Login on any Sun machine (e.g. cassiopeia.cs.uchicago.edu)

    b.) Run: 

        sqlplus <user>@${ORACLE_DB}

    (replace <user> with your database user name communicated by Mark).

    If you are not able to run "sqlplus" without manually sourcing your .bashrc then try the following:
    >cd
    >mv .bash_profile .bash_profile.bak
    >ln -s .bashrc .bash_profile

    c.) More information on using sqlplus and SQL is available here. (Please ignore "Getting an account" and "Logging-in" sections)

  1. Take a look at this simple JDBC program that does a SELECT and understand how it works.  Copy the code into your directory, then compile and run it 

    Ask questions! Sun's JDBC tutorial  or Mark's JDBC slides might be helpful to understand what's going on. 

  2. Resources:
      JDBC Home Page
      JDBC tutorial
      Programming examples

      JDBC Short Course:  Using MetaData

     

  3. Start working on Assignment 2 (which, if you successfully did all of the above, you will have practically finished.).