Closed Thread
Results 1 to 4 of 4

Thread: DB inconsistency check

  1. #1
    eracha is offline Newbie
    Join Date
    Feb 2008
    Posts
    4
    Rep Power
    0

    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

  2. CODECALL Circuit advertisement
    Join Date
    Always
    Posts
    Many

     
  3. #2
    Join Date
    Jul 2006
    Posts
    16,491
    Blog Entries
    75
    Rep Power
    143
    It depends on what you mean by an inconsistency. Are you looking for data corruption, table structure corruption, other?
    Programming is a branch of mathematics.
    My CodeCall Blog | My Personal Blog

  4. #3
    eracha is offline Newbie
    Join Date
    Feb 2008
    Posts
    4
    Rep Power
    0
    hi WingedPanther,

    thanks for the respond. You are right. That's exactly what I want, that is, checking for all corrupt data and corrupt table structure including wrong key references in the DB.

    I am able to connect to my DB and retrieve data, but how to check for this inconsistency is a challenge for me.

    Are the code lines you provided all I need or some further codes needs to be added to it.
    I appreciate and thanks.

    Eric

  5. #4
    Join Date
    Jul 2006
    Posts
    16,491
    Blog Entries
    75
    Rep Power
    143
    A quick search for "mysql metadata" gave me commands for finding the information you need.
    Programming is a branch of mathematics.
    My CodeCall Blog | My Personal Blog

Closed Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Check this out!
    By Scott in forum The Lounge
    Replies: 7
    Last Post: 05-09-2010, 10:03 AM
  2. Could someone check this?
    By Alex_j in forum C# Programming
    Replies: 1
    Last Post: 05-05-2010, 12:40 PM
  3. How to check if a check box has changed?
    By Peckerfish in forum C# Programming
    Replies: 2
    Last Post: 05-24-2009, 02:22 PM
  4. Check your IP
    By Jaan in forum PHP Tutorials
    Replies: 7
    Last Post: 01-17-2008, 06:29 AM
  5. Check ISO with CD
    By TcM in forum Computer Software/OS
    Replies: 3
    Last Post: 12-21-2007, 06:20 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts