Lost Password?

Go Back   CodeCall Programming Forum > Web Development Forum > Database & Database Programming

Vote on your favorite hash algorithm here!

Database & Database Programming MySQL, Oracle, SQL, PL/SQL, ABAP, Smart Forms, and other databases and languages. A database is an organized body of related information used in many websites (including CC).

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 02-28-2008, 02:01 PM
eracha eracha is offline
Newbie
 
Join Date: Feb 2008
Posts: 4
Credits: 0
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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

Sponsored Links
  #2 (permalink)  
Old 02-28-2008, 04:36 PM
WingedPanther's Avatar   
WingedPanther WingedPanther is offline
Super Moderator
 
Join Date: Jul 2006
Age: 35
Posts: 2,535
Last Blog:
wxWidgets is NOT code ...
Credits: 919
Rep Power: 28
WingedPanther is a jewel in the roughWingedPanther is a jewel in the roughWingedPanther is a jewel in the roughWingedPanther is a jewel in the rough
Default

It depends on what you mean by an inconsistency. Are you looking for data corruption, table structure corruption, other?
__________________
CodeCall Blog | CodeCall Wiki | Shareware | Linux Forum
Chat with other CodeCall members on IRC; connect to irc.codecall.net and join #codecall
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 02-29-2008, 04:02 AM
eracha eracha is offline
Newbie
 
Join Date: Feb 2008
Posts: 4
Credits: 0
Rep Power: 0
eracha is on a distinguished road
Default

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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 02-29-2008, 10:53 AM
WingedPanther's Avatar   
WingedPanther WingedPanther is offline
Super Moderator
 
Join Date: Jul 2006
Age: 35
Posts: 2,535
Last Blog:
wxWidgets is NOT code ...
Credits: 919
Rep Power: 28
WingedPanther is a jewel in the roughWingedPanther is a jewel in the roughWingedPanther is a jewel in the roughWingedPanther is a jewel in the rough
Default

A quick search for "mysql metadata" gave me commands for finding the information you need.
__________________
CodeCall Blog | CodeCall Wiki | Shareware | Linux Forum
Chat with other CodeCall members on IRC; connect to irc.codecall.net and join #codecall
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Check ISO with CD TcM Computer Software/OS 3 12-21-2007 08:20 AM
Check if a file exists? Lop Pascal/Delphi 3 01-07-2007 12:54 AM
Check if a file exists Lop C and C++ 4 08-07-2006 10:03 PM
CAPTCHA Check Jonas PHP Forum 0 07-15-2006 07:22 PM
Check if a URL Exists Chan PHP Forum 1 07-13-2006 12:54 PM


All times are GMT -5. The time now is 08:45 AM.

Contest Stats

Xav ........ 1357.94
MeTh0Dz|Reb0rn ........ 1083.85
WingedPanther ........ 919.18
marwex89 ........ 906.86
morefood2001 ........ 903.18
John ........ 902.37
Brandon W ........ 789.89
chili5 ........ 312.39
Steve.L ........ 264.99
dcs ........ 240.34

Contest Rules

CodeCall Goal

Goal: 100,000 Posts
Complete: 83%

Ads