The Project Table: DSN8810.PROJ

 <  Day Day Up  >  

The Project Table: DSN8810.PROJ

DSN8810.PROJ defines all the projects for the organization. It contains information on the project's number; the project's name ; the responsible department number and employee number; the project's staffing requirements, start date, and end date; and the project number of any related , superior project. The primary key is PROJNO .

DSN8810.PROJ is a self-referencing table because one project can relate to another by the MAJPROJ column, which identifies a parent project. It is also a parent table because it has relationships to DSN8810.DEPT for the responsible department and to DSN8810.EMP for the responsible employee.

Two indexes exist for this table: DSN8810.XPROJ1 is a primary key index on PROJNO , and DSN8810.XPROJ2 is an index on RESPEMP .

DSN8810.PROJ Table DDL

 

 CREATE TABLE DSN8810.PROJ  (PROJNO         CHAR(6) PRIMARY KEY NOT NULL,   PROJNAME       VARCHAR(24)         NOT NULL WITH DEFAULT                                      'PROJECT NAME UNDEFINED',   DEPTNO         CHAR(3)             NOT NULL                  REFERENCES DSN8810.DEPT ON DELETE RESTRICT,   RESPEMP        CHAR(6)             NOT NULL                  REFERENCES DSN8810.EMP ON DELETE RESTRICT,   PRSTAFF        DECIMAL(5, 2),   PRSTDATE       DATE,   PRENDATE       DATE,   MAJPROJ        CHAR(6) ) IN DSN8D81A.DSN8S81P CCSID EBCDIC; ALTER TABLE DSN8810.PROJ   FOREIGN KEY RPP (MAJPROJ)     REFERENCES DSN8810.PROJ ON DELETE CASCADE: 

 <  Day Day Up  >  


DB2 Developers Guide
DB2 Developers Guide (5th Edition)
ISBN: 0672326132
EAN: 2147483647
Year: 2004
Pages: 388

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net