Embedded SQL

Required files. Transfer these to your student account, to be used on rees:

To use the provided sample on rees:

  1. Set up your environment:
    > source /u/db2cs448/sqllib/db2cshrc (if you are using csh or tcsh)
    or
    $ . /u/db2cs448/sqllib/db2profile (if you are using sh or bash)
        
  2. Create a Sailors table in your schema of the cs448 database and add some data to it using the dbcreate.db2 script. To run this script on rees, use:
    > db2 -tvf dbcreate.db2
  3. Build and run the sample program:
    > Make
    > ./sample
    

JDBC

Required files. Transfer these to your student account, to be used on any machine in the student.cs environment, not just rees:

Here is a tutorial on using JDBC in the student.cs environment. It has detailed instructions on how to compile and run the sample program.