List:General Discussion« Previous MessageNext Message »
From:Andreas Date:November 9 2003 6:20pm
Subject:Re: Data sincronization
View as plain text  
>* Gaston Escobar
>>I need to sincronice two mysql databases that are in different
>>places. It is imposible to centralice everything in one database.
>>Then I would need to sincronice the changes made in both of them
>>one time per day. Is there any way to do this?

* Roger Baklund

>This very much depends on your application. Normally some changes needs to
>be done in the table definitions.
Right, ids and foreign keys are an issue here.

>One way to get around this, is to include a new column in the table, called
>'server' in this example. [...]
I thought about this but I couldn't figure out how to manage foreign 
keys in an elegant way.
AFAIK it's much more handy to have one single column primary key.

>A different approach could be to make sure server A only use id codes >
>100000, and server B only use id codes < 100000 or similar. This would
>require you to make a guess on how many rows will be inserted on each
>server, and could introduce a problem in the future, when this limit is
Right, too.
So, with an nonpermanent connection the design of such an application sucks.

On the other hand one could use intervals for key assignment.
Every time a server runs out of keys it throws a warning at the admin 
and rejects further inserts until it gets a new key interval.
It's a way to go at least with a low number of servers.

Data sincronizationGaston Escobar4 Mar
  • Re: Data sincronizationRoger Baklund4 Mar
    • Re: Data sincronizationAndreas9 Nov
      • Re: Data sincronizationRoger Baklund9 Nov
        • Dupe killing (was: Data sincronization)Andreas10 Nov
        • Re: Data sincronizationKaram Chand10 Nov
          • ANN: Database Workbench 2.4 releasedMartijn Tonies10 Nov
            • Re: ANN: Database Workbench 2.4 releasedNils Valentin10 Nov
          • Re: ANN: Database Workbench 2.4 releasedMartijn Tonies10 Nov