r/csharp•
Quesa-dilla

Pros and Cons of deleting instead of updating table entries.

So I have this project, it will never be anything where there will be more than a dozen or so people accessing it at once (a personal project for a family member). It's basically going to be a repository for our generational recipes where anyone in the family can access/contribute.

So I have a primary Recipes table which has a 1 to many relationship with an Ingredients table. People will be able to directly link to a Recipe but not an ingredient. Like so:

{my site}/Home/Recipes/?id=8

So when someone updates a recipe, I actually call the update function so that if someone saves one of these recipes with a bookmark, it's still there after the update.

Now that you have a quick background, hers is the real question. When someone edits the recipe, what should I consider when using one of two ways of modifying the ingredients list:

  • Delete and re-create all ingredients

  • Update each ingredient

I know for a simple/small project there will likely be no quantifiable difference but what would I need to consider for a larger project, one that may be hit thousands of times a day/hour?

Posted Feb 25, 2016, 1:26 AM UTC

010
Loading comments…