< Day Day Up > |
The Project Table: DSN8810.PROJDSN8810.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 DDLCREATE 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 > |