Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

-- Campuses (from Rutgers):

INSERT INTO prd_campuses (id, code, name)
  VALUES (prd_campuses_seq.NEXTVAL, '01', 'COLLEGE AV');

INSERT INTO prd_campuses (id, code, name)
  VALUES (prd_campuses_seq.NEXTVAL, '02', 'BUSCH');

INSERT INTO prd_campuses (id, code, name)
  VALUES (prd_campuses_seq.NEXTVAL, '03', 'LIVINGSTON');

INSERT INTO prd_campuses (id, code, name)
  VALUES (prd_campuses_seq.NEXTVAL, '04', 'NEWARK');

INSERT INTO prd_campuses (id, code, name)
  VALUES (prd_campuses_seq.NEXTVAL, '05', 'CAMDEN');

INSERT INTO prd_campuses (id, code, name)
  VALUES (prd_campuses_seq.NEXTVAL, '06', 'COOK');

INSERT INTO prd_campuses (id, code, name)
  VALUES (prd_campuses_seq.NEXTVAL, '07', ' ');

INSERT INTO prd_campuses (id, code, name)
  VALUES (prd_campuses_seq.NEXTVAL, '08', ' ');

INSERT INTO prd_campuses (id, code, name)
  VALUES (prd_campuses_seq.NEXTVAL, '09', 'DOUGLASS');

INSERT INTO prd_campuses (id, code, name)
  VALUES (prd_campuses_seq.NEXTVAL, '99', 'OFF CAMPUS');


-- Identifiers (from Rutgers):

INSERT INTO prd_identifier_types (identifier_t, name)
  VALUES (prd_identifier_types_seq.NEXTVAL, 'SSN');

INSERT INTO prd_identifier_types (identifier_t, name)
  VALUES (prd_identifier_types_seq.NEXTVAL, 'RUID');

INSERT INTO prd_identifier_types (identifier_t, name)
  VALUES (prd_identifier_types_seq.NEXTVAL, 'RCPID');

INSERT INTO prd_identifier_types (identifier_t, name)
  VALUES (prd_identifier_types_seq.NEXTVAL, 'IID');

INSERT INTO prd_identifier_types (identifier_t, name)
  VALUES (prd_identifier_types_seq.NEXTVAL, 'NETID');


-- Needed sequence that's not created by JPA:

CREATE SEQUENCE rcpid_generator_seq;


-- Example Data Types

INSERT INTO ctx_data_types (id, data_type, description)
 VALUES (ctx_data_types_seq.NEXTVAL, 'Affiliation', 'Faculty');

INSERT INTO ctx_data_types (id, data_type, description)
 VALUES (ctx_data_types_seq.NEXTVAL, 'Department', 'Computer Science');

INSERT INTO ctx_data_types (id, data_type, description)
 VALUES (ctx_data_types_seq.NEXTVAL, 'Affiliation', 'SAKAI Access');

INSERT INTO ctx_data_types (id, data_type, description)
 VALUES (ctx_data_types_seq.NEXTVAL, 'Status', 'Active');

INSERT INTO ctx_data_types (id, data_type, description)
 VALUES (ctx_data_types_seq.NEXTVAL, 'Status', 'InActive');

INSERT INTO ctx_data_types (id, data_type, description)
 VALUES (ctx_data_types_seq.NEXTVAL, 'Phone', 'Cell');

INSERT INTO ctx_data_types (id, data_type, description)
 VALUES (ctx_data_types_seq.NEXTVAL, 'Phone', 'Home');

INSERT INTO ctx_data_types (id, data_type, description)
 VALUES (ctx_data_types_seq.NEXTVAL, 'Phone', 'Campus');

INSERT INTO ctx_data_types (id, data_type, description)
 VALUES (ctx_data_types_seq.NEXTVAL, 'Address', 'Home');

INSERT INTO ctx_data_types (id, data_type, description)
 VALUES (ctx_data_types_seq.NEXTVAL, 'Address', 'Campus');

INSERT INTO ctx_data_types (id, data_type, description)
 VALUES (ctx_data_types_seq.NEXTVAL, 'EmailAddress', 'Home');

INSERT INTO ctx_data_types (id, data_type, description)
 VALUES (ctx_data_types_seq.NEXTVAL, 'EmailAddress', 'Campus');


-- Example Organizational Units and Roles

INSERT INTO drd_organizational_units
   (id, code, name, campus_id, organizational_unit_t)
 (SELECT drd_organizational_units_seq.NEXTVAL, 'CSI', 'Computer Science',
     c.id, dt.id
   FROM prd_campuses c, ctx_data_types dt
    WHERE c.code = '02'
     AND dt.data_type = 'Department' AND dt.description = 'Computer Science');

 INSERT INTO prd_roles (prd_roles.id, code, title, affiliation_t, campus_id, organizational_unit_id)
  (SELECT prd_roles_seq.NEXTVAL, 'PRO', 'Professor', dt.id, d.campus_id, d.id
     FROM ctx_data_types dt, drd_organizational_units d
      WHERE dt.data_type = 'Affiliation' AND dt.description = 'Faculty'
       AND d.code = 'CSI');

 INSERT INTO prd_roles (prd_roles.id, code, title, affiliation_t, campus_id, organizational_unit_id)
  (SELECT prd_roles_seq.NEXTVAL, 'SAK', 'SAKAI User', dt.id, d.campus_id, d.id
     FROM ctx_data_types dt, drd_organizational_units d
      WHERE dt.data_type = 'Affiliation' AND dt.description = 'SAKAI Access'
      AND d.code = 'CSI');

  • No labels