I am building tables using the database diagram with enterprise manager. One of the options available is to "Cascade Update and Delete Related Fields". I think this means that if I change a PK Identifier in a table all related FK's will be updated to the new value and if I delete the PK all related FK records will be deleted. Is this correct? Is this a good idea to do something like this?
I have always handled what needs to be changed using SP's following business rules. A friend has been preaching the use of the "Cascade Update and Delete Related Fields" functionality provided with the database.
Please let me know what you think.
ThanksAs you already mention, I think this is a matter of opinion. The advantage for cascading is that you don't have to do any checking and programming to avoid data inconstency. Disadvantage is that you don't have any control about the updates/deletes of the related records. For the manual programming through sp's it's offcourse the other way around.
In other words: you have to see in every situation what's the best solution.
Thursday, March 8, 2012
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment