Re: How to "undo" a database delete
- From: "Juan T. Llibre" <nomailreplies@xxxxxxxxxxx>
- Date: Tue, 30 Aug 2005 09:15:17 -0400
That is a viable database design idea, too.
Juan T. Llibre
ASP.NET MVP
http://asp.net.do/foros/
Foros de ASP.NET en Español
Ven, y hablemos de ASP.NET...
======================
"tom pester" <Tom.PesterDELETETHISSS@xxxxxxxxxx> wrote in message
news:a1a977a212f1a88c77b7c53c80e68@xxxxxxxxxxxxxxxxxxxxx
>
> Or you could do a soft delete. When the user deletes a row you flip a switch in a
> column, so :
>
> delete from table where id = 8
> becomes
> update table set deleted = true
>
> You can make it transparent for the developer by making a view of the table like this :
>
> Employees_All : a table that has also the deleted records
> Employees : SELECT * FROM Employees where deleted = false
>
> Let me know if you have any more questions...
>
> Cheers,
> Tom Pester
>
>> What I would do is set up an identical set of tables, prefaced
>> "bk_thetablename" and store any records deleted in *that* set of
>> tables.
>>
>> Kind of like an audit trail.
>>
>> That way, although you delete records,
>> you still keep all records, deleted or not, permanently.
>> Juan T. Llibre
>> ASP.NET MVP
>> http://asp.net.do/foros/
>> Foros de ASP.NET en Español
>> Ven, y hablemos de ASP.NET...
>> ======================
>> "Morgan Bachu" <dsfsdfs878@xxxxxxxxxxxxx> wrote in message
>> news:1125397228.770219.294150@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
>>
>>> Hello everybody,
>>>
>>> I have an intranet application which is mostly a bunch of data
>>> editing forms.
>>>
>>> The database has about 20 tables all related together.
>>>
>>> Recently somebody deleted a "the wrong record" and the cascade delete
>>> in sql server did its work nicely :(
>>>
>>> When they asked me to put the data back, I looked pretty stupid as I
>>> had no idea how.
>>>
>>> How is this normally done in ASP.NET app?
>>>
>>> Morgan
>>>
>
>
.
- References:
- Re: How to "undo" a database delete
- From: Juan T. Llibre
- Re: How to "undo" a database delete
- From: tom pester
- Re: How to "undo" a database delete
- Prev by Date: RE: Oracle Connections left open
- Next by Date: When/How often ist Web.config parsed
- Previous by thread: Re: How to "undo" a database delete
- Next by thread: RE: How to "undo" a database delete
- Index(es):
Relevant Pages
|
Loading