We help IT Professionals succeed at work.

Check out our new AWS podcast with Certified Expert, Phil Phillips! Listen to "How to Execute a Seamless AWS Migration" on EE or on your favorite podcast platform. Listen Now

x

Save deleted records

Web_Admin
Web_Admin asked
on
Medium Priority
350 Views
Last Modified: 2012-05-11
Hello experts,

my boss requested that before my application delete a record , it should be saved the record in a txt file before the actual delete happened so the user can retreive his/her information if they delete it by mistake.

do you have a good idea to implement this ? from java side or from oracle database side ?
and whay shall i exactly save in the txt file ?

Thank you :)
Comment
Watch Question

Awarded 2011
Awarded 2011

Commented:
Seems to be starightforward in java - just write to a file before deleting the record.
In Oracle you can set up automatic capturing of deleted records in the special table
which will keep traclk of original table updates and also keep a copy of
deleted records.

Commented:
you must save record on temp table
like this
http://www.myaspnet.com/codedisplay.aspx?id=662
Mick BarryJava Developer
CERTIFIED EXPERT
Top Expert 2010

Commented:
Awarded 2011
Awarded 2011

Commented:


If you are using Oracle 11 you can use flshback archive
http://www.oracle-base.com/articles/11g/FlashbackAndLogminerEnhancements_11gR1.php

If you are on earlier versions of Oracle you can create trigger which will
store the record before deleting it to another table

Author

Commented:
I know how to implement it in java , but i would like to know what is the best way to achieve this
? to save the records in db or in file system ><
Mick BarryJava Developer
CERTIFIED EXPERT
Top Expert 2010

Commented:
easiest to do it in the database, either to a another table of an export.
Awarded 2011
Awarded 2011
Commented:
Unlock this solution and get a sample of our free trial.
(No credit card required)
UNLOCK SOLUTION

Author

Commented:
@for_yan: Thank you

Thank you all :)
Unlock the solution to this question.
Thanks for using Experts Exchange.

Please provide your email to receive a sample view!

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.