Click here to Skip to main content
15,890,670 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: Create a kind of "recovery script" for a deleted object in Entity Pin
satc28-Jun-15 0:51
satc28-Jun-15 0:51 
GeneralRe: Create a kind of "recovery script" for a deleted object in Entity Pin
Eddy Vluggen28-Jun-15 1:01
professionalEddy Vluggen28-Jun-15 1:01 
GeneralRe: Create a kind of "recovery script" for a deleted object in Entity Pin
satc28-Jun-15 1:07
satc28-Jun-15 1:07 
GeneralRe: Create a kind of "recovery script" for a deleted object in Entity Pin
Dave Kreskowiak28-Jun-15 2:03
mveDave Kreskowiak28-Jun-15 2:03 
GeneralRe: Create a kind of "recovery script" for a deleted object in Entity Pin
satc28-Jun-15 2:07
satc28-Jun-15 2:07 
GeneralRe: Create a kind of "recovery script" for a deleted object in Entity Pin
Dave Kreskowiak28-Jun-15 2:18
mveDave Kreskowiak28-Jun-15 2:18 
GeneralRe: Create a kind of "recovery script" for a deleted object in Entity Pin
satc28-Jun-15 2:22
satc28-Jun-15 2:22 
GeneralRe: Create a kind of "recovery script" for a deleted object in Entity Pin
Dave Kreskowiak28-Jun-15 2:33
mveDave Kreskowiak28-Jun-15 2:33 
The reason you don't see this being done is because you've crossed into the point where the user is responsible for their own f*** ups and managing this becomes a nightmare!

Are you going to create restore scripts for EVERY record that is ever deleted?

How many tables can be restored? On my current application, I've got data going into 97 tables for ONE parent record.

How many records are going to be deleted in a month? For one record, in my case, that's a LOT of script to rewrite the record. How much disk space is going to be required to store all those scripts? More than the original data!

What scheme are you going to come up with to tombstone those restore scripts?

How are you going to re-write those scripts to support a new database schema? You really can't. Schema updates DO happen. I've done 9 schema updates in the last 6 months.


THESE ARE THE REASONS NOBODY DOES THIS!

If data that is "deleted" needs to be recovered. It's very simple. DON'T DELETE IT! Mark it deleted but never actually execute a DELETE command.

The only thing you need to do in your code is to make sure your queries don't return "deleted" data. Simple.
A guide to posting questions on CodeProject

Click this: Asking questions is a skill.
Seriously, do it.

Dave Kreskowiak

GeneralRe: Create a kind of "recovery script" for a deleted object in Entity Pin
satc28-Jun-15 2:42
satc28-Jun-15 2:42 
GeneralRe: Create a kind of "recovery script" for a deleted object in Entity Pin
Dave Kreskowiak28-Jun-15 6:03
mveDave Kreskowiak28-Jun-15 6:03 
GeneralRe: Create a kind of "recovery script" for a deleted object in Entity Pin
Eddy Vluggen28-Jun-15 2:33
professionalEddy Vluggen28-Jun-15 2:33 
GeneralRe: Create a kind of "recovery script" for a deleted object in Entity Pin
satc28-Jun-15 2:44
satc28-Jun-15 2:44 
GeneralRe: Create a kind of "recovery script" for a deleted object in Entity Pin
Eddy Vluggen28-Jun-15 2:49
professionalEddy Vluggen28-Jun-15 2:49 
GeneralRe: Create a kind of "recovery script" for a deleted object in Entity Pin
satc28-Jun-15 2:52
satc28-Jun-15 2:52 
GeneralRe: Create a kind of "recovery script" for a deleted object in Entity Pin
Eddy Vluggen28-Jun-15 2:58
professionalEddy Vluggen28-Jun-15 2:58 
AnswerRe: Create a kind of "recovery script" for a deleted object in Entity Pin
Sascha Lefèvre28-Jun-15 1:10
professionalSascha Lefèvre28-Jun-15 1:10 
GeneralRe: Create a kind of "recovery script" for a deleted object in Entity Pin
satc28-Jun-15 1:26
satc28-Jun-15 1:26 
GeneralRe: Create a kind of "recovery script" for a deleted object in Entity Pin
Sascha Lefèvre28-Jun-15 1:39
professionalSascha Lefèvre28-Jun-15 1:39 
GeneralRe: Create a kind of "recovery script" for a deleted object in Entity Pin
satc28-Jun-15 1:54
satc28-Jun-15 1:54 
GeneralRe: Create a kind of "recovery script" for a deleted object in Entity Pin
Sascha Lefèvre28-Jun-15 2:18
professionalSascha Lefèvre28-Jun-15 2:18 
GeneralRe: Create a kind of "recovery script" for a deleted object in Entity Pin
satc28-Jun-15 2:24
satc28-Jun-15 2:24 
GeneralRe: Create a kind of "recovery script" for a deleted object in Entity Pin
Sascha Lefèvre28-Jun-15 2:36
professionalSascha Lefèvre28-Jun-15 2:36 
GeneralRe: Create a kind of "recovery script" for a deleted object in Entity Pin
Eddy Vluggen28-Jun-15 2:37
professionalEddy Vluggen28-Jun-15 2:37 
GeneralRe: Create a kind of "recovery script" for a deleted object in Entity Pin
Sascha Lefèvre28-Jun-15 2:43
professionalSascha Lefèvre28-Jun-15 2:43 
GeneralRe: Create a kind of "recovery script" for a deleted object in Entity Pin
satc28-Jun-15 2:46
satc28-Jun-15 2:46 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.