---------------------------------------------------------------
-- Grade Book Database; Create Tables Script
-- Chapter 2; Oracle 9i Programming -- A Primer
--            by R. Sunderraman
---------------------------------------------------------------

insert into o_employees values
  (1000,
   person_type('Jones',
               address_type('123 Main St','Wichita','KS',67226),
               phones_varray_type('316-555-1212',null,null)),
  '12-DEC-95');

insert into o_employees values
  (1001,
   person_type('Smith',
               address_type('101 Elm St','Fort Dodge','KS',60606),
               phones_varray_type('316-555-2121','316-555-2323',null)),
  '01-JAN-92');

insert into o_employees values
  (1002,
   person_type('Brown',
               address_type('100 Elm St','Kansas City','KS',50302),
               phones_varray_type('780-555-1111',null,null)),
  '01-SEP-94');

insert into o_parts values
  (10506,'Land Before Time I',200,19.99,20);
insert into o_parts values
  (10507,'Land Before Time II',156,19.99,20);
insert into o_parts values
  (10508,'Land Before Time III',190,19.99,20); 
insert into o_parts values
  (10509,'Land Before Time IV',60,19.99,20);
insert into o_parts values
  (10601,'Sleeping Beauty',300,24.99,20);
insert into o_parts values
  (10701,'When Harry Met Sally',120,19.99,30);
insert into o_parts values
  (10800,'Dirty Harry',140,14.99,30);
insert into o_parts values
  (10900,'Dr. Zhivago',100,24.99,30);

insert into o_customers values
  (1111,
   person_type('Charles',
               address_type('123 Main St','Wichita','KS',67226),
               phones_varray_type('316-636-5555',null,null)));

insert into o_customers values
  (2222,
   person_type('Bertram',
               address_type('237 Ash Avenue','Wichita','KS',67226),
               phones_varray_type('316-689-5555','316-689-5556',null)));

insert into o_customers values
  (3333,
   person_type('Barbara',
               address_type('111 Inwood St','Fort Dodge','KS',60606),
               phones_varray_type('316-111-1234','316-111-1235',null)));

insert into o_orders values
  (1020,
   odetails_ntable_type(odetails_type(10506,1),
                        odetails_type(10507,1),
                        odetails_type(10508,2),
                        odetails_type(10509,3)),
   1111,1000,'10-DEC-94','12-DEC-94');

insert into o_orders values
  (1021,
   odetails_ntable_type(odetails_type(10601,4)),
   1111,1000,'12-JAN-95','15-JAN-95');

insert into o_orders values
  (1022,
   odetails_ntable_type(odetails_type(10601,1),
                        odetails_type(10701,1)),
   2222,1001,'13-FEB-95','20-FEB-95');

insert into o_orders values
  (1023,
   odetails_ntable_type(odetails_type(10800,1),
                        odetails_type(10900,1)),
   3333,1000,'20-JUN-97',null);
