Employee-to-project activity table (DSN8A10.EMPPROJACT)

The sample employee-to-project activity table identifies the employee who performs an activity for a project, tells the proportion of the employee's time that is required, and gives a schedule for the activity.

Begin general-use programming interface information.

The employee-to-project activity table resides in database DSN8D10A. Because this table has foreign keys that reference EMP and PROJACT, those tables and the indexes on their primary keys must be created first. Then EMPPROJACT is created with the following statement:

CREATE TABLE DSN8A10.EMPPROJACT
      (EMPNO     CHAR(6)                         NOT NULL,
       PROJNO    CHAR(6)                         NOT NULL,
       ACTNO     SMALLINT                        NOT NULL,
       EMPTIME   DECIMAL(5,2)                            ,
       EMSTDATE  DATE                                    ,
       EMENDATE  DATE                                    ,
       FOREIGN KEY REPAPA (PROJNO, ACTNO, EMSTDATE)
                 REFERENCES DSN8A10.PROJACT
                                       ON DELETE RESTRICT,
       FOREIGN KEY REPAE (EMPNO) REFERENCES DSN8A10.EMP
                                       ON DELETE RESTRICT)
  IN DSN8D10A.DSN8S10P
  CCSID EBCDIC;
End general-use programming interface information.

Content of the employee-to-project activity table

The following table shows the content of the columns in the employee-to-project activity table.

Table 1. Columns of the employee-to-project activity table
Column Column name Description
1 EMPNO Employee ID number
2 PROJNO Project ID of the project
3 ACTNO ID of the activity within the project
4 EMPTIME A proportion of the employee's full time (between 0.00 and 1.00) that is to be spent on the activity
5 EMSTDATE Date the activity starts
6 EMENDATE Date the activity ends

The following table shows the indexes for the employee-to-project activity table:

Table 2. Indexes of the employee-to-project activity table
Name On columns Type of index
DSN8A10.XEMPPROJACT1 PROJNO, ACTNO, EMSTDATE, EMPNO Unique, ascending
DSN8A10.XEMPPROJACT2 EMPNO Ascending

Relationship to other tables

The employee-to-project activity table is a dependent of the following tables:

  • The employee table, through its foreign key on column EMPNO
  • The project activity table, through its foreign key on columns PROJNO, ACTNO, and EMSTDATE.