I'd say you have the constraint in the wrong table. Looks like it should be more like this:create table PET( PetID Int not null identity (1,1), Name Char(20) not null, Type Char(30) not null, Breed Char(30) not null, DOB DateTime not null, OwnerID Int not null Constraint PetID_PK primary key (PetID, Breed), Constraint OwnerID_FK foreign key (OwnerID) References PET_Owner (OwnerID) on update cascade, Constraint BreedName_FK foreign key (Breed) References breed (BreedName));create table breed( BreedName Char(30) not null, MinWeight Int not null, MaxWeight Int not null, AverageLifeExpectancy Int not null Constraint BreedName_PK primary key (BreedName), Constraint BreedName_FK foreign key (BreedName) References PET (Breed) );
If this doesn't solve it for you, post the code that generates the error.As a side note, I never allow cascading foreign keys. It is a terrible practice that introduces difficult to track down bugs. It is also the lazy way out of actually programming your updates and deletes. And it can cause history to change, which is never acceptable. In IT, we guarentee two things above all: (1) data reliability and (2) data availability. Everything else we do is secondary. END RANT