HWA2_P1_1.sql

/* -------------------------------------------------------------------------
   Yu Cheng
   ICS 321 Assignment 2
   October 23, 2008

   PART 1.1
   Modify the PERSON table required for compliance with the Metadata
   Dictionary provided above. Be sure to establish a PK/FK recursive
   constraint relationship.
   ------------------------------------------------------------------------- */

USE DB9975
GO

-- Update the PERSON table based on the Metadata Dictionary.  Note that
-- nowhere in the assignment is it specified WHO a person's supervisor is,
-- so this script will create the column but not enforce the NOT NULL
-- constraint as specified in the 'ENTITY DEFINITION HWA2F08.doc' file.

ALTER TABLE PERSON
	ADD Supervisor INT NULL
	CONSTRAINT FK_PERSON_PERSON
		FOREIGN KEY (Supervisor)
		REFERENCES PERSON(Id)
GO

-- Also note the modifications to this table to support the badge assignment
-- are done in part two of this assignment.
Valid HTML 4.01 Valid CSS