Advertisement

05.04.2008 at 03:12PM PDT, ID: 23375319
[x]
Attachment Details

Cascade delete problem

Asked by Cragly in SQL Server 2005, Programming for ASP.NET

Tags: Microsoft, SQL Server 2005

Hi all,

I am attempting to create a simple internal messaging system and have come up with the following schema. My problem is how to handle the cascading deletes that take place within the system. An example of this would be when a user is deleted and I would want to then delete everything associated with that user. Am I best adding cascade updates and deletes to some relationships and then triggers for the others? Therefore adding a cascade delete to the aspnet_Users  MsgFolders and then on the MsgMessages folder add a Delete trigger to then delete the related MsgRecipient record? Maybe my schema design is not quite correct?

Any help on this would be much appreciated.

Thanks

Cragly  
Start Free Trial
Attachments:
 
Messaging Schema
Messaging Schema
 
[+][-]05.04.2008 at 03:35PM PDT, ID: 21497199

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.04.2008 at 03:37PM PDT, ID: 21497203

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: SQL Server 2005, Programming for ASP.NET
Tags: Microsoft, SQL Server 2005
Sign Up Now!
Solution Provided By: DarkoLord
Participating Experts: 1
Solution Grade: B
 
 
[+][-]05.05.2008 at 12:55AM PDT, ID: 21498630

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]05.05.2008 at 01:15AM PDT, ID: 21498671

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628