Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Need Advice - Soft Deletes of Rows

Re: Need Advice - Soft Deletes of Rows

From: Scott Cote <scottcotexy_at_contractor.net>
Date: Mon, 13 Jul 1998 08:16:27 -0500
Message-ID: <35AA08AB.6F054882@contractor.net>


Doug,

If you users need to be able to logoff, change their mind, then log back on and correct their mistake - you will need to use a flag field. Now this may not be a good business model (rule) so you might want to double check to see if you really want to support this capability.

In the past, I have allowed the "flag" row to hold the timestamp of the users action so that a maintenance program will clean the row 24 hours later (in addition to a boolean flag that say,"delete me").

Hope I helped,

SCott

Douglas White wrote:

> I am a humble programmer programming a straight forward C/S system with
> Delphi 3 and Oracle 7.3. When a user deletes a row from a table I want the
> deletion to be a soft delete so that if they change their mind they can undo
> the delete and restore the row. The traditional way of doing this is to set
> up a flag field to indicate whether the row has been marked for deletion. I
> have two questions:
>
> 1) Is there a smarter way of doing this in Oracle?
> 2) If there isn't, how do you handle the case where the user wants to flag
> for deletion a row that has child rows (i.e. has rows that reference it in a
> foreign key)? I would not want to allow this, but how can I tell if a row
> has child rows before I try to delete it and Oracle raises an error message?
>
> I would be very grateful for any advice anyone has on these issues!
>
> Thanks
>
> Doug White


Received on Mon Jul 13 1998 - 08:16:27 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US