0

Hi guys!

sorry if there is already a thread on this but i couldnt see one...

I just want a little bit of help about the statement ON DELETE CASADE. I am designing the structures of my tables and I am not sure about using this statement. I know it means that if a record is deleted then it will also be deleted in every table in which it is referenced by a foreign key. But, i seem to using it in every table. Should this only be used in certain tables?

Thanks in advance.

3
Contributors
2
Replies
3
Views
10 Years
Discussion Span
Last Post by debasisdas
0

depends on what you want to keep around.
if the data is not important for future reference, the delete cascade to your heart's content.

however, should data be valuable later, then those tables should not have rows automatically delete.

that is a "business process" decision on your or your management's part.

0

That should be defined in the time of table / relationship creation . If you wnat to delete all the child records by deleting the parent record thenu need specify ON DELETE CASCADE. Other wise it does not allow you to delete parent record if there is any sort of dependent child records.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.