Project activity table (DSN8C10.PROJACT)

The sample project activity table lists the activities that are performed for each project.

The project activity table resides in database DSN8D12A. Because this table has foreign keys that reference PROJ and ACT, those tables and the indexes on their primary keys must be created first. Then PROJACT is created with the following statement:

Begin general-use programming interface information.
CREATE TABLE DSN8C10.PROJACT
      (PROJNO    CHAR(6)                         NOT NULL,
       ACTNO     SMALLINT                        NOT NULL,
       ACSTAFF   DECIMAL(5,2)                            ,
       ACSTDATE  DATE                            NOT NULL,
       ACENDATE  DATE                                    ,
       PRIMARY KEY (PROJNO, ACTNO, ACSTDATE),
       FOREIGN KEY RPAP (PROJNO) REFERENCES DSN8C10.PROJ
                                       ON DELETE RESTRICT,
       FOREIGN KEY RPAA (ACTNO) REFERENCES DSN8C10.ACT
                                       ON DELETE RESTRICT)
  IN DSN8D12A.DSN8S12P
  CCSID EBCDIC;
End general-use programming interface information.

Content of the project activity table

The following table shows the content of the columns of the project activity table.

Table 1. Columns of the project activity table
Column Column name Description
1 PROJNO Project ID
2 ACTNO Activity ID
3 ACSTAFF Estimated mean number of employees that are needed to staff the activity
4 ACSTDATE Estimated activity start date
5 ACENDATE Estimated activity completion date

The following table shows the index of the project activity table:

Table 2. Index of the project activity table
Name On columns Type of index
DSN8C10.XPROJAC1 PROJNO, ACTNO, ACSTDATE primary, ascending

Relationship to other tables

The project activity table is a parent table of the employee to project activity table, through a foreign key on columns PROJNO, ACTNO, and EMSTDATE. It is a dependent of the following tables:

  • The activity table, through its foreign key on column ACTNO
  • The project table, through its foreign key on column PROJNO