db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael Segel" <mse...@segel.com>
Subject RE: how to make a replication between mysql and derby?
Date Wed, 27 Sep 2006 16:51:23 GMT
Concurrency may have some drawbacks, if you end up holding the transaction
as you attempt to write to both databases...

If I understood the initial request, try creating an after transaction
trigger(s) on a table that you want to replicate. Have the trigger call an
SP that writes a record to a logtable. (Store the table name, "primary key",
transaction action [insert, update, delete], and a timestamp)

Then you can have an async process that will periodically check the log
table in database A and perform the same transaction on database B.

In general, this should work without too much of an issue. You would also
need a small fact table to store the last log entry processed.

HTH, 

-Mike


> -----Original Message-----
> From: Bernt.Johnsen@Sun.COM [mailto:Bernt.Johnsen@Sun.COM]
> Sent: Wednesday, September 27, 2006 4:27 AM
> To: Derby Discussion
> Subject: Re: how to make a replication between mysql and derby?
> 
> Hi,
> 
> You could also check out C-JDBC (http://c-jdbc.objectweb.org/) and
> especially
> this document:
> http://c-jdbc.objectweb.org/current/doc/C-JDBC_horizontal_scalability.pdf
> 
> --
> Bernt Marius Johnsen, Database Technology Group,
> Staff Engineer, Technical Lead Derby/Java DB
> Sun Microsystems, Trondheim, Norway



Mime
View raw message