3.1 SOFTWARE:

We will be using the ORACLE8 database management system
accessible on the Delphi computer. 

I will request accounts on Oracle 8 for the whole class.

When  you receive your accounts, you will be able to access 
Oracle 8 as follows:

STEP 1: ACCESSING ORACLE:

Access your account on Oracle, from SCIS, by typing:

     a) type: oracle8
     b) enter userid (as one sentence): 
        username/password@delphi8
        where your username is the same as on scis
        and your password for the class is: dcte7501
        (your course-id followed by 1).

STEP 2: ORACLE SQL TUTORIAL BY DR SUN

In order to do the SQL assignment, you will need to download
and read carefully Dr Junping Sun's Oracle8 SQL tutorial.

The Oracle8 SQL Tutorial from Dr Junping Sun is available 
at:
	Oracle8 SQL Tutorial

STEP 3: CREATE A SQL SESSION:

The easiest way to execute a SQL session is to edit a file
(either on Unix, using the Pico editor) or on your PC 
(but you will have to upload the file to your Unix account).

The SQL session should implement your database design, 
including the following items:

     Create the relations,
     enter a few records
     Produce the reports you described in your requirements

Here is an example to create 3 relations, insert 5 records 
and retrieve selected data. I also drop first the tables to 
be able to run the session several times for testing 
purposes:

************************************************************

     drop table student;
     drop table course;
     drop table grade;
     create table student(name char(10), age int, sex 
     char(1), address char(2));
     create table course (course_id char(6), teacher 
     char(10), room_no char(2));
     create table grade  (name char(10), course_id char(6), 
     grade char(2));
     insert into student(name, age, sex, address)
                 values ('philip', 17, 'm', 'FL');
     insert into course (course_id, teacher, room_no)
                 values ('math', 'johnson', '11');
     insert into grade  (name, course_id, grade)
                 values ('philip', 'math', 'A');
     insert into student(name, age, sex, address)
                 values ('ann', 22, 'f', 'CA');
     insert into student(name, age, sex, address)
                 values ('tom', 21, 'm', 'CA');
     select student.name, course.teacher, grade.grade
     from student, course, grade
     where student.name=grade.name
     and grade.course_id=course.course_id;

**********************************************************

You can take this basic example, replace my tables, data
and report by your tables, data and reports.

You can do that on your PC with your favorite editor, then 
upload it to your account on SCIS. This is what I refer to 
as a SQL session. Let's call the file: session1.sql

STEP 4: EXECUTE YOUR SQL SESSION

Make sure you are in the directory where you saved your
SQL session when you access Oracle8. 

     From the SQL prompt, type: 
     start session1.sql
     this will execute the SQL statements you stored in the 
     file session1.sql described in step 3 above

STEP 5: POST YOUR ASSIGNMENT on your homepage.

Your assignment includes the SQL session (session1.sql) plus
the execution of your SQL session.

a) To post the SQL session as an HTML document, just
   add the tag <pre> at the beginning of the file before
   you post it.
     
b) To capture the execution and display it on your homepage,
   you can either
   i)   use a tool like PaintShopPro to capture your screen 
        on your PC.
   ii)  Another option is to use the Unix script utility:
        Before you access Oracle, just type from your Unix 
        prompt:
        script tmp (where tmp is the file name that will 
        capture the script). You will get the message: 
        script started, file is tmp
        then Access Oracle
        then execute your session (with: start session1.sql)
        then exit Oracle
        finally type: Control-d to exit the script session.
   iii) Clean the tmp file (to get rid of control characters
        Control-M at the end of each line) using the wsstrip 
        utility:
        wsstrip < tmp > tmp1
        File tmp1 will contain everything you saw on your 
        screen during the execution of your SQL session.