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 4 Next »

The following are the inserts used to demo the Add Role use case:

INSERT INTO prc_names (name_id, family_name, given_name)
 VALUES (prs_name_seq.NEXTVAL, 'Rock', 'Chris');

INSERT INTO prc_names (name_id, family_name, given_name)
 VALUES (prs_name_seq.NEXTVAL, 'Fey', 'Tina');

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

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

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

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

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

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

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

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

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

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

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

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

INSERT INTO prc_persons
   (person_id, date_of_birth, gender, official_name_id, preferred_name_id)
 (SELECT prs_person_seq.NEXTVAL, TO_DATE('17-DEC-1980', 'DD-MON-YYYY'), 'M',
    n.name_id, n.name_id
      FROM prc_names n
        WHERE  n.family_name = 'Rock');

INSERT INTO prc_persons
   (person_id, date_of_birth, gender, official_name_id, preferred_name_id)
 (SELECT prs_person_seq.NEXTVAL, TO_DATE('20-MAR-1975', 'DD-MON-YYYY'), 'F',
    n.name_id, n.name_id
      FROM prc_names n
        WHERE  n.family_name = 'Fey');

INSERT INTO prs_departments
   (department_id, code, name, campus_id, department_t)
 (SELECT prd_department_seq.NEXTVAL, 'CSI', 'Computer Science',
     c.campus_id, dt.id
   FROM prs_campuses c, ctx_data_types dt
    WHERE c.code = '02'
     AND dt.data_type = 'Department' AND dt.description = 'Computer Science');

INSERT INTO prs_roles (prs_roles.id, code, title, affiliation_t, campus_id, department_id)
 (SELECT prd_roleinfo_seq.NEXTVAL, 'PRO', 'Professor', dt.id, d.campus_id, d.department_id
    FROM ctx_data_types dt, prs_departments d
     WHERE dt.data_type = 'Affiliation' AND dt.description = 'Faculty'
      AND d.code = 'CSI');

INSERT INTO prs_roles (prs_roles.id, code, title, affiliation_t, campus_id, department_id)
 (SELECT prd_roleinfo_seq.NEXTVAL, 'SAK', 'SAKAI User', dt.id, d.campus_id, d.department_id
    FROM ctx_data_types dt, prs_departments d
     WHERE dt.data_type = 'Affiliation' AND dt.description = 'SAKAI Access'
      AND d.code = 'CSI');
  • No labels