Subject Re: [firebird-support] Creation of a "Replication Friendly" database. Any rules of thumb?
Author Todd Brasseur
We are also thinking about adding Replication. We currently have all
primary keys as integers being created with Generators.

I like the idea of the 2 part primary keys because the application is
already quite dependent on the current primary keys (single generated
integers) and think it would be much less work to add a second generator
and primary key than changing existing keys to GUIIDs.

We are very happy with how quick our application is and we think that
one of the reasons it is quick is because of the single integer primary
keys.

Will moving to 2 part primary keys affect the speed of our queries?

Todd


Joe Martinez wrote:

>I am in the process of making my application multi-site right now with
>replication (I'm writing my own replication server). I thought about doing
>2-part primary keys, but a much more elegant solution is to use
>GUID's. They are guaranteed to be unique, and don't require worrying about
>colliding values, plus it's a single field.
>
>-Joe
>
>
>At 11:37 AM 3/23/2005, you wrote:
>
>
>>acegracely wrote:
>>
>>
>>>I need to make my database replication friendly...
>>>
>>>Am I right in thinking that the easiest way is to make all primary
>>>keys an integer with a generator?
>>>
>>>
>>That's a start.
>>
>>
>>>If so, will this fall over if replication is bi directional i.e.
>>>depending on the time interval between replications, both ends could
>>>add a number of records thus the generators could be out of sync.
>>>
>>>
>>Yup. But put a table in your database that contains a field that
>>identifies the server and make all your keys two part - server and
>>generated value.
>>
>>
>
>
>
>
>Yahoo! Groups Links
>
>
>
>
>
>
>
>
>
>
>
>



[Non-text portions of this message have been removed]