Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Check for inconsistency in mysql DB. 1

Status
Not open for further replies.

eracha

Programmer
Feb 5, 2008
5
AT
Hi all,

I have been assigned with the task of developing a java class to check for inconsistency in a DB in our firm. I was thinking I could rush over this using a trigger, but honestly, my whole idea flopped.

So I will greatly appreciate any tips on how to go about it. Just enlightening me on how I could face the task will be highly appreciated.

many thanks.

Eric
 
Code:
import java.util.*;
import java.sql.*;
 
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)

Check this article about how to check for consistency.
 
Many thanks Obadare.
Your post gave me a rich starting point and things seems lot more easier now.
Cheers
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top