rem 
rem $Header: enrolmnt.sql,v 1.1 1993/08/11 10:15:33 RKOOI2 Exp $ 
rem 
Rem  Copyright (c) 1993 by Oracle Corporation 
Rem    NAME
Rem      enrolmnt.sql - <one-line expansion of the name>
Rem    DESCRIPTION
Rem      <short description of component this file declares/defines>
Rem    RETURNS
Rem 
Rem    NOTES
Rem      <other useful comments, qualifications, etc.>
Rem    MODIFIED   (MM/DD/YY)
Rem     rkooi2     08/11/93 -  Creation 
REM  Create some classes and enroll some students in
REM  them, to test the procedures that access
REM  the ENROLLMENT table.

DELETE FROM classes;

REM  Department 150 is HISTORY


INSERT INTO classes VALUES (
        900,
        101, 150,
        300,
        2520,
        100,
        9001,
        1, 1990);

INSERT INTO classes VALUES (
        901,
        236, 150,
        20,
        2520,
        111,
        9001,
        3, 1990);

INSERT INTO classes VALUES (
        902,
        237, 150,
        15,
        2520,
        111,
        9001,
        4, 1990);

INSERT INTO classes VALUES (
        903,
        238, 150,
        10,
        2520,
        111,
        9001,
        1, 1991);


REM  Department 120 is COMPUTER SCIENCE

INSERT INTO classes VALUES (
        910,
        210, 120,
        60,
        2530,
        34,
        9003,
        1, 1990);

INSERT INTO classes VALUES (
        911,
        182, 120,
        120,
        2530,
        440,
        9003,
        1, 1991);

INSERT INTO classes VALUES (
        912,
        141, 120,
        60,
        2530,
        334,
        9003,
        2, 1990);

INSERT INTO classes VALUES (
        913,
        140, 120,
        300,
        2530,
        112,
        9003,
        1, 1989);


REM  Now enroll Susan and Michael in some courses.

DELETE FROM enrollment
        WHERE student_id =
        (SELECT id FROM students
                WHERE first_name = 'Susan' AND last_name = 'Brahms');

DELETE FROM enrollment
        WHERE student_id =
        (SELECT id FROM students
                WHERE first_name = 'Michael' AND last_name = 'Chen');


INSERT INTO enrollment VALUES (
        enrollment_seq.nextval,
        900,
        1000,
        3.0,
        'Good');

INSERT INTO enrollment VALUES (
        enrollment_seq.nextval,
        901,
        1000,
        3.5,
        'Very Good');

INSERT INTO enrollment VALUES (
        enrollment_seq.nextval,
        902,
        1000,
        4.0,
        'Excellent');

INSERT INTO enrollment VALUES (
        enrollment_seq.nextval,
        903,
        1000,
        2.0,
        'Fair');

INSERT INTO enrollment VALUES (
        enrollment_seq.nextval,
        910,
        1007,
        3.0,
        ' ');

INSERT INTO enrollment VALUES (
        enrollment_seq.nextval,
        911,
        1007,
        3.0,
        ' ');

INSERT INTO enrollment VALUES (
        enrollment_seq.nextval,
        912,
        1007,
        4.0,
        ' ');

INSERT INTO enrollment VALUES (
        enrollment_seq.nextval,
        913,
        1007,
        2.0,
        ' ');

        
