View Single Post
  #1 (permalink)  
Old 02-28-2008, 02:01 PM
eracha eracha is offline
Newbie
 
Join Date: Feb 2008
Posts: 4
Rep Power: 0
eracha is on a distinguished road
Default DB inconsistency check

hi all,

I have been turning around with this problem for a while now, and do hope some body can help me go about it here.

I need to write s short java class to check for inconsistency in a mysql DB. It is something I thought I could realize using a trigger, but the whole idea flopped.
Basically, it should look like:


public class DbChecker extends TimerTask{
public DbCheck(){ //initialize the connection to database
}

public void run(){
// your algorithm for checking for inconsistency
//if inconsistency found, write in to a log file
//using java.util.Logger
}
}

//class to perform task.
Timer.schedule(DbChecker,intervals)



My java knowledge is limited, that's I am unable to implement that run method as as I am calling it, and that's thing holding me. I will greatly appreciate if some one can help me formulate the algorithm or give me tips on how to go about it.

Thanks
Eric
Reply With Quote

Sponsored Links