Monday, March 19, 2012

Cascading Update And Delete

If we want to maintain the data in relationships.

There are two ways to do it.

1. Auto (Like Cascading Update And Delete)

2. Manually (Like In Stored Procedures)

I read an intresting article

http://imar.spaanjaars.com/QuickDocId.aspx?quickdoc=419

In this article Imar has choosen the second way (Manually).

And when I talk to Imar.

He said, "Cascading deletes would have worked equally well in this situation. However, I personally don't like them too much. I am much rather in control, enabling me to delete what I want and when I want it. I could, for example, keep certain data for "time travelling scenarios" (e.g. the state things were in some time ago) or I might want to keep it for other purposes."

Can any one help me to choose the better one.

Waiting for helpful replies.

Well, I can give you my opinion. I preferer cascading deletes to keep the integrity of my data. If it's something that I want to keep I make a structure for that data. Like a log table or some export function to retrieve the state of something.

To rely on stored procedures to maintain the integrity sounds to error prone for me.

|||

I need more views.

No comments:

Post a Comment