RE: Sync DB SQL Server CE and remote MySQL on internet

From: Darren Shaffer (DarrenShaffer_at_discussions.microsoft.com)
Date: 09/27/04


Date: Mon, 27 Sep 2004 09:53:04 -0700

Peter,

Safe to say there is no chance of native replication (RDA/Merge) from SQL CE
to mySQL coming in the future, however using an XML Web Services approach
from the Pocket PC client to the database server is your best bet for
achieving database-independent synchronization from mobile device to a DBMS
and back again. It puts more work on you to manage conflicts and concurrency
when multiple devices are synchronized, but it can be done very effectively
and I use this
model even for SQL Server database servers when the amount of data being
transferred is small (< 1MB).

Some tips:

1. make every entity that needs to be unique on the server and across all
PDAs a GUID.
2. use an outbox model on both ends - in other words, for every table that
contains replicatable entities, create an outbox that contains the GUID of
the entities that have changed on that end, and the next time a connection
exists, send copies of those entities the other direction
3. both ends can use a "delete and replace" algorithm to keep entities
current. of course you have to manage conflicts with locking/data currency
across multiple devices, but in most cases this is not too hard to figure out
rules for.

Good luck!

-Darren

"Peter" wrote:

> Hello EveryOne,
>
> Currently, i have a local db (SQL CE) in the PPC device and MySQL DB on the
> net. So far we sync both db using a mid application. However, in the future,
> we might remove the midapp so hopefully ppc will can sync directly from
> SQLCE to Online MySQL.
>
> Any idea how to achieve it?
>
> I really appriaciate any comment, helps and suggestion.
>
> thanks a lots.
>
> regards,
>
> Peter Alex
>
>
>



Relevant Pages

  • Re: SQL Server 2000 Hardware Recommendations?
    ... Hardware Performance CheckList ... Andrew J. Kelly SQL MVP ... >> trace and see what is taking up all the resources especially cpu. ... Currently the database server houses all data pertinent to ...
    (microsoft.public.sqlserver.server)
  • Re: Problem with Set MyRst = MyDB.OpenRecordset(PString, dbOpenForwardOnly)
    ... but I've already verified that the SQL ... MySQL = MySQL & "FROM tblVehicleJobs INNER JOIN tblAddnlOwnrs ON ... vbNewLine ... MySQL = MySQL & "FROM tblVehicleJobs INNER JOIN tblLienHolders ON ...
    (comp.databases.ms-access)
  • Re: looking for way to include many times some .py code from anotherpython code
    ... data is read from mysql and presented ... > The underlaying data at some time point go into sql tables. ... > it into xml and present on web/. ... > I don't want to invent the database schema in bsddb in python. ...
    (comp.lang.python)
  • Re: commit work not working?
    ... Because he is using straight sql, ... The transaction is made up of the statements that occur ... locks the stock table, updates rows in the stock table ... The database server must perform this sequence of operations either ...
    (comp.databases.informix)
  • Re: mySQL and ASP, ASP.NET and FP server extension
    ... > ISP already offered me one MS SQL account to be used. ... I then found out MySQL is free to download ...
    (microsoft.public.frontpage.programming)