Database syncronization

From: Bytter <bytter_at_netc.pt>
Date: Sat, 27 Apr 2002 02:11:04 +0100
Message-ID: <3cc9faad$1_at_213.30.5.12>



Hi,

I've got a problem that I can't seem to resolve in a simple way. My problem is: one database in 'n' computers (to make it simple, lets start with 2). Both have the same tables, which have the same fields. But both run on two different computers. On both, they can add new things, delete old ones, and modify existing entries. But, at one time, they must syncronize. They data must be shared: those entries added, must be added, those modified must be modified, and so on... (simple uh :)) Let's start using a simple table, with an unsigned long int primary key:

Names



Cod (LONG INT) (PK) (auto-increment)
Name (varchar)

Ok until here... Now let's run it on two diferent computers. Tables are empty, we create two diferent entries on both computers. They get the same 'Cod'... :-(

Now, let's change our 'Cod' to a TIMESTAMP... The problem seems to be resolved but then, who said that it wouldn't be possible two create two entries at the same second? Nothing guarantees that the clock is synchronized, nothing guarantees how many users are using it at the SAME TIME... So, problem unresolved.

Third try: add an ID to the end of 'Cod', and mantain it TIMESTAMP. Well, fine... Problem is when 'n' (number of computers running the database independently) starts to grow... It doesn't seem a genial way to do it...

So, what's next ? Any ideas ? I'm really needing some help here... Oh, and they are meant to be practically implemented (consider performance).

Sorry about my english, but my thanks in advance,

Hugo Jose Ferreira Received on Sat Apr 27 2002 - 03:11:04 CEST

Original text of this message