The EMP_ACT table identifies the employee performing each activity listed for each project. The table in Figure 107 shows some of the rows in this table. Figure 108 shows a description of the columns.
Figure 107. Partial Contents of EMP_ACT Table
EMPNO
PROJNO
ACTNO
EMPTIME
EMSTDATE
EMENDATE
000130
IF1000
90
1.00
1982-01-01
1982-10-01
000130
IF1000
100
.50
1982-10-01
1983-01-01
000140
IF1000
90
.50
1982-10-01
1983-01-01
000030
IF1000
10
.50
1982-06-01
1983-01-01
000030
IF2000
10
.50
1982-01-01
1983-01-01
000140
IF2000
100
1.00
1982-01-01
1982-03-01
000140
IF2000
100
.50
1982-03-01
1982-07-01
000140
IF2000
110
.50
1982-03-01
1982-07-01
000140
IF2000
110
.50
1982-10-01
1983-01-01
000010
MA2100
10
.50
1982-01-01
1982-11-01
000110
MA2100
20
1.00
1982-01-01
1982-03-01
000020
PL2100
30
1.00
1982-01-01
1982-09-15
000010
MA2110
10
1.00
1982-01-01
1983-02-01
000220
MA2111
40
1.00
1982-01-01
1983-02-01
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
·
Figure 108. Columns of the EMP_ACT Table
| Column Name | Description |
|---|---|
| EMPNO | Employee number |
| PROJNO | Project number of the project to which the employee is assigned |
| ACTNO | Activity number within a project to which an employee is assigned |
| EMPTIME | A proportion of the employee's full time (between 0.00 and 1.00) to be spent on the project from EMSTDATE to EMENDATE |
| EMSTDATE | Date the activity starts |
| EMENDATE | Completion date of the activity |
Since the table has foreign keys referencing EMPLOYEE and PROJ_ACT, those tables must be created first.
CREATE TABLE EMP_ACT
(EMPNO CHAR(6) NOT NULL,
PROJNO CHAR(6) NOT NULL,
ACTNO SMALLINT NOT NULL,
EMPTIME DECIMAL(5,2) ,
EMSTDATE DATE ,
EMENDATE DATE ,
FOREIGN KEY R_PROACT (PROJNO,ACTNO,EMSTDATE)
REFERENCES PROJ_ACT ON DELETE RESTRICT,
FOREIGN KEY R_EMPLY3 (EMPNO) REFERENCES EMPLOYEE
ON DELETE CASCADE )
The EMP_ACT table is a dependent of: