Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7165331
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T14:13:19+00:00 2026-05-28T14:13:19+00:00

I’ve seen various posts about how to implement the deletion of dependent rows from

  • 0

I’ve seen various posts about how to implement the deletion of dependent rows from other tables using CASCADE DELETE or various ways of creating or looking up dependencies and creating dynamic SQL.

I’m not crazy about the idea of using CASCADE delete if for no other reason than the overhaead concerns due to the fact that the CASCADE issues so many DELETEs for records that have numerous dependencies which have their own numerous dependencies (not to mention the fact that the results can be hard to track and not all that well-suited to production environments).

So, having resigned myself to writing them in one way or another, I’m wondering what the trade-off is to putting all the necessary deletes into a stored procedure or a delete trigger.

I like the DELETE trigger option, because it keeps the semantics of deletion straight forward. That is:

DELETE FROM [SomeTable] WHERE [SomeColumn] = VAL

Will take care of all the deleting that needs to be taken care of and no single developer can make the mistake of not calling the deletion procedure:

EXECUTE [prc_SomeTable_Delete] VAL

However, I am worried about the use of TRIGGERs since I seem to see a fair number of ‘expert’ recommendations against their [frequent] use.

From my perspective, the actual implementation of the TRIGGER vs the stored procedure seems nearly identical. So, provided internally we adopt a consistent practice, it seems that the TRIGGER solution should work out just fine.

Is there a best [or most common] practice that should be followed? What should my concerns be in the short term and long term? For the most part, these deletions are going to be issued from a .NET client application – more than likely relying on the Entity Framework for data access/manipulation; how should that affect my decision?

Feel free to post links to exhaustive considerations of the topic as my efforts haven’t yet yielded any.

Thanks all.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T14:13:20+00:00Added an answer on May 28, 2026 at 2:13 pm

    Triggers have the clear drawback that they fire right away, without you being able to postpone their execution. Under heavy use, your system might be so busy executing all those triggers, it’ll grind to a halt.

    If you can do something like:

    • make a “note” in a table which dependent rows need to be deleted
    • schedule a cleanup task that does its work during off-peak hours, e.g. during the night

    your overall system performance should be much better. This however requires that you can wait some time between the time the “parent” row(s) gets deleted, until you actually delete the dependent child rows.

    But as you say – the code written is almost the same, so you could definitely use a trigger first and see how it behaves and how it affects your system performance. If it gets too heavy on your system, “de-couple” those events (a parent row being deleted, and the dependent child rows being removed) by using such a “asynchronous” model with a stored proc being called at given intervals to do the cleanup.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am reading a book about Javascript and jQuery and using one of the
I have a bunch of posts stored in text files formatted in yaml/textile (from
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
For some reason, after submitting a string like this Jack’s Spindle from a text
I'm using v2.0 of ClassTextile.php, with the following call: $testimonial_text = $textile->TextileRestricted($_POST['testimonial']); ... and
I am currently running into a problem where an element is coming back from
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
We're building an app, our first using Rails 3, and we're having to build
I need to clean up various Word 'smart' characters in user input, including but

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.