DB2 Server for VSE & VM: Interactive SQL Guide and Reference


PROJECT Table

The PROJECT table describes each project that the business is currently undertaking. Data contained in each row includes the project number, name, person responsible, and schedule dates as shown in Figure 62; Figure 63 describes the columns.


Figure 62. PROJECT Table Contents
PROJNO PROJNAME DEPTNO RESPEMP PRSTAFF PRSTDATE PRENDATE MAJPROJ
AD3100 ADMIN SERVICES D01 000010 6.5 1982-01-01 1983-02-01 ?
AD3110 GENERAL ADMIN SYSTEMS D21 000070 6 1982-01-01 1983-02-01 AD3100
AD3111 PAYROLL PROGRAMMING D21 000230 2 1982-01-01 1983-02-01 AD3110
AD3112 PERSONNEL PROGRAMMING D21 000250 1 1982-01-01 1983-02-01 AD3110
AD3113 ACCOUNT PROGRAMMING D21 000270 2 1982-01-01 1983-02-01 AD3110
IF1000 QUERY SERVICES C01 000030 2 1982-01-01 1983-02-01 ?
IF2000 USER EDUCATION C01 000030 1 1982-01-01 1983-02-01 ?
MA2100 WELD LINE AUTOMATION D01 000010 12 1982-01-01 1983-02-01 ?
MA2110 W L PROGRAMMING D11 000060 9 1982-01-01 1983-02-01 MA2100
MA2111 W L PROGRAM DESIGN D11 000220 2 1982-01-01 1982-12-01 MA2110
MA2112 W L ROBOT DESIGN D11 000150 3 1982-01-01 1982-12-01 MA2110
MA2113 W L PROD CONT PROGS D11 000160 3 1982-02-15 1982-12-01 MA2110
OP1000 OPERATION SUPPORT E01 000050 6 1982-01-01 1983-02-01 ?
OP1010 OPERATION E11 000090 5 1982-01-01 1983-02-01 OP1000
OP2000 GEN SYSTEMS SERVICES E01 000050 5 1982-01-01 1983-02-01 ?
OP2010 SYSTEMS SUPPORT E21 000100 4 1982-01-01 1983-02-01 OP2000
OP2011 SCP SYSTEMS SUPPORT E21 000320 1 1982-01-01 1983-02-01 OP2010
OP2012 APPLICATIONS SUPPORT E21 000330 1 1982-01-01 1983-02-01 OP2010
OP2013 DB/DC SUPPORT E21 000340 1 1982-01-01 1983-02-01 OP2010
PL2100 WELD LINE PLANNING B01 000020 1 1982-01-01 1982-09-15 MA2100


Figure 63. Columns of the PROJECT Table
Column Name Description
PROJNO Project number (the primary key)
PROJNAME Project name
DEPTNO Number of department responsible for the project
RESPEMP Number of employee responsible for the project
PRSTAFF Estimated mean project staffing (mean number of persons) needed between PRSTDATE and PRENDATE to achieve the whole project, including any subprojects
PRSTDATE Estimated project start date
PRENDATE Estimated project end date
MAJPROJ Number of any major project of which the subject project may be a part

The PROJECT table has foreign keys referencing DEPARTMENT and EMPLOYEE. The EMPLOYEE and DEPARTMENT tables must be created before the PROJECT table. Once EMPLOYEE and DEPARTMENT are created, the following statement creates the PROJECT table:

     CREATE TABLE PROJECT
         (PROJNO    CHAR(6)        NOT NULL,
          PROJNAME  VARCHAR(24)    NOT NULL,
          DEPTNO    CHAR(3)        NOT NULL,
          RESPEMP   CHAR(6)                ,
          PRSTAFF   DECIMAL(5,2)           ,
          PRSTDATE  DATE                   ,
          PRENDATE  DATE                   ,
          MAJPROJ   CHAR(6)                ,
          PRIMARY KEY (PROJNO)             ,
          FOREIGN KEY R_DEPT2 (DEPTNO) REFERENCES DEPARTMENT
               ON DELETE RESTRICT          ,
          FOREIGN KEY R_EMPLY2 (RESPEMP) REFERENCES EMPLOYEE
               ON DELETE SET NULL          )
 

Relationship to Other Tables

PROJECT is a parent of the PROJ_ACT table.

PROJECT is a dependent of:


[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]