Re: Database Replication

From: Jan Hidders <jan.hidders_at_pandora.be.REMOVE.THIS>
Date: Thu, 09 Oct 2003 10:19:43 +0200
Message-ID: <3f8519e9.0_at_news.ruca.ua.ac.be>


Daniel wrote:

> I have to implement product independent database replication and would
> appreciate any hints on some theories regarding replication.
>
> What I want (have) to do:
>
> - several databases on distributed servers
> - no master database
> - changes are made to any of the distributed databases
> - the changes have then to be synchronized on all databases
>
> My customer wants a detailed desription of the used replication mechanisms
> and the source code that is doing this. So I can not use any commercial
> product. Furthermore the mechanism should potentially work with any
> available database without major changes in the replication software. (For
> the moment the databases will be ORACLE and InterBase).
>
> I currently have two ideas how this could be realized:
>
> 1) Create my own "transaction log" in a database table and use that for
> replication
> 2) But a timestamp on each record of every table in my database
>
> So my questions:
>
> Does anyone know if 1) or 2) would be a good mechanism to use?

Not if you want to guarantee integrity and consistency.

> Can anyone give me any pointers to (detailed) information regarding
> replication algorithms?

A good starting point is the chapter on distributed databases in Date's "An Introduction to ...". That's chapter 20 in the 7th edition, and chapter 21 in the 8th edition. Especially the parts on recovery control where he discusses the two-phase commit protocol are relevant. It is this protocol that you should probably be using.

  • Jan Hidders
Received on Thu Oct 09 2003 - 10:19:43 CEST

Original text of this message