[AccessD] "Faked" replication

John W. Colby jcolby at colbyconsulting.com
Thu Dec 18 08:29:56 CST 2003


I think this pretty much sums it up (from that article)...

Large databases that have outgrown their incremental primary key values
(tables with more than 2 billion records) and developers who must combine
two or more systems with duplicate primary key values require key values
that are unique across an indeterminate number of servers. When feasible, a
cost-effective and efficient solution in both cases is simply to declare the
primary key values in all tables suspect and replace them all with GUID
values (generated by the GUID datatype). The process requires updating every
primary and foreign key value, which might be tedious but it guarantees that
none of the primary key values are duplicated. The process won't cost you
anything but time.

Microsoft discourages the use of GUID as a primary key, but that's because
most people don't really need universal uniqueness. When uniqueness across
many systems is vital, however, the GUID datatype is definitely the way to
go. Just remember that you pay a price in performance.

GUIDs in Replicated Databases
By and large, the most common use for GUID values is in replicated
databases, where users insert new records and update copies of the same
records on different servers. At any moment, two database replicas could
contain new records, so a row or rows might contain identical primary key
values. Adding a GUID value to each record would guarantee that all replicas
(as a group) contain a unique primary key, reducing the synchronization
problem to a series of simple append queries.

However, updating existing data poses a more difficult problem—users could
change the same record in different replicas. Simply replacing an
incremental primary key with a GUID primary key won't solve this problem,
because you still have n different versions of a row identified by the same
GUID.

John W. Colby
www.ColbyConsulting.com

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com]On Behalf Of Susan Harkins
Sent: Thursday, December 18, 2003 9:20 AM
To: Access Developers discussion and problem solving
Subject: Re: [AccessD] "Faked" replication


Microsoft recommends that you not use GUID's as primary keys, but I'm not
sure that really means anything. :)

http://www.devx.com/dbzone/Article/10167/0

Susan H.




More information about the AccessD mailing list