db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Oystein Grovlen - Sun Norway <Oystein.Grov...@Sun.COM>
Subject Re: Derby Database Change Capturing Using Log
Date Thu, 04 May 2006 06:51:39 GMT
Huinan wrote:
> Hi,
>  
> I am tring to build an application that captures changes in Derby 
> database.For example, as a new query inserts data to some table comes, I 
> want to be able to get that change without using trigger for scalability 
> and loose coupling reasons.
>  
> The solution I'm considering is to use Derby's transaction log. I read 
> through its source code, espacially the package 
> org.apache.derby.impl.store.raw.log, trying to file clues about it's log 
> format and ways to instantiate log object. There is one class which 
> looks promising called Scan. But when trying to instantiate Scan, it 
> takes a LogToFile and a LogInstant. Both of them are not easily 
> instantiated. Does any one have a clue about how to access the log and 
> make sense of it? Or maybe some other ways to capture changes inside the 
> database?

As Mike also indicated, I am not sure how useful the log will be for 
you.  Since logging in Derby is "physiological", what you find in the 
log is that some bytes of some record in some page has been changed. 
You will not generally be able to determine the key of the record nor 
which columns have changed.

-- 
Øystein Grøvlen, Senior Staff Engineer
Sun Microsystems, Database Technology Group
Trondheim, Norway

Mime
View raw message