Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Self Join Referential Integrity
Message
From
15/09/2011 10:47:56
 
 
To
All
General information
Forum:
Microsoft SQL Server
Category:
Database design
Title:
Self Join Referential Integrity
Environment versions
SQL Server:
SQL Server 2008
Miscellaneous
Thread ID:
01523616
Message ID:
01523616
Views:
86
Hi,

I've got a SQL Server Express 2008 R2 database which has a Person table where I store People and their dependents like this:

PersonId
Name
ParentId

So one PersonID can have many dependents by storing their ID in the ParentID field (simple self join).

I want to set up referential Integrity on this table so that if a parent is deleted, their dependents are deleted (cascade). I created a database diagram, dropped my Person table on it and then dragged the PersonId field to the ParentID field. However, when I try to set the Delete Rule to Cascade, it is disabled.

How can I do this?
Frank.

Frank Cazabon
Samaan Systems Ltd.
www.samaansystems.com
Next
Reply
Map
View

Click here to load this message in the networking platform