Timeline for Cascading "Deleted" records that aren't really deleted
Current License: CC BY-SA 3.0
25 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Feb 6, 2014 at 0:45 | vote | accept | JonH | ||
Feb 1, 2014 at 20:37 | audit | Close votes | |||
Feb 3, 2014 at 10:44 | |||||
Feb 1, 2014 at 0:14 | audit | Close votes | |||
Feb 2, 2014 at 11:34 | |||||
Jan 28, 2014 at 18:32 | audit | Close votes | |||
Jan 28, 2014 at 18:32 | |||||
Jan 25, 2014 at 22:50 | audit | Close votes | |||
Jan 25, 2014 at 22:50 | |||||
Jan 24, 2014 at 3:56 | audit | Reopen votes | |||
Jan 24, 2014 at 3:57 | |||||
Jan 23, 2014 at 18:01 | audit | Close votes | |||
Jan 24, 2014 at 12:53 | |||||
Jan 22, 2014 at 8:16 | audit | Close votes | |||
Jan 22, 2014 at 12:51 | |||||
Jan 12, 2014 at 10:09 | audit | Close votes | |||
Jan 12, 2014 at 15:43 | |||||
Jan 10, 2014 at 14:13 | comment | added | JonH | @Kevin that is fine for a relationship between one to many. However, we have one to one relationships. I think the answers given so far is everything we have thought of so we need to just make a decision. Thanks all for your help and comments. | |
Jan 10, 2014 at 8:32 | comment | added | Pieter B | Just ask yourself: how and when would you delete related records if you would use a real delete instead of a bitfield. Use the same logic for setting the bitfield. | |
Jan 10, 2014 at 2:32 | history | tweeted | twitter.com/#!/StackProgrammer/status/421469560538423296 | ||
Jan 9, 2014 at 21:44 | answer | added | Jon Raynor | timeline score: 1 | |
Jan 9, 2014 at 19:54 | answer | added | Kilian Foth | timeline score: 2 | |
Jan 9, 2014 at 17:50 | comment | added | Kevin | Why do you need to delete related data? If the parent of the related data is inaccessible how are you going to access it? | |
Jan 9, 2014 at 17:17 | answer | added | Michael | timeline score: 5 | |
Jan 9, 2014 at 17:07 | comment | added | JonH | @ratchetfreak - That's sort of my question, should we handle it via an update trigger, or via the server side code, and why. I sort of know the answer to this I was just hoping to get an idea what others do for soft delete - how would you soft delete the relationships (cascade delete have you without really deleting). | |
Jan 9, 2014 at 17:06 | comment | added | JonH | @TruthOf42 - Sometimes based on the application a hard delete is not allowed, in fact in the system we are working with it could potentially impact the business greatly. | |
Jan 9, 2014 at 17:00 | comment | added | ratchet freak | only thing that would automate it is an update trigger | |
Jan 9, 2014 at 16:56 | comment | added | user40980 | @TruthOf42 it really depends on the database implementation and requirements. Many times, auditing or fast recovery is necessary for information. A soft delete is perfectly correct in these situations. Hard deletes are very difficult to recover, reverse, or audit. However, none of this is applicable to the actual technical solution for when you do need a cascading soft delete. | |
Jan 9, 2014 at 16:53 | comment | added | TruthOf42 | The fact that a delete doesn't really delete, and just hides scares me a little. When something is deleted I expect it to be deleted. What if there's personal information I want to delete to avoid it being out there? Some people delete things specifically because they want it deleted, not because they don't currently need it. | |
Jan 9, 2014 at 16:46 | comment | added | user40980 | Hmm... a cascading 'update'... This might be something answered on DBA.SE. Consider Update on cascade. | |
Jan 9, 2014 at 16:42 | comment | added | JonH | @ratchetfreak - this doesn't help with the related records...how do you handle the cascade of the delete. Imagine a company page that has associated issues, if someone deletes the company (sets Company.Deleted=1) how do you delete the issues associated with that company? | |
Jan 9, 2014 at 16:39 | comment | added | ratchet freak | use a view so deleted never get into the picture, and group on that bitfield | |
Jan 9, 2014 at 16:35 | history | asked | JonH | CC BY-SA 3.0 |