Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Synchronizing inserted rows from Oracle Lite using Mobile Server
John wrote:
> Hello,
>
> I am developing an application which acts as an offline mobile client
> for an online centralized database application. The client app is
> utilizing Oracle Lite 10g and will occasionally be synch'd up with the
> online database (Oracle 9i) using mobile server.
>
> The client app has the ability to insert new rows into its local
> database which should then in turn be inserted into the central
> database upon synchronization. The problem that I am running into is
> how to handle sequence numbers for the primary key columns across the
> the databases. As there will be multiple versions of the client app
> floating around the sequence numbers will not be in synch.
>
> Does mobile server have a specific way of handling this problem or do I
> need to create a home-grown work-around?
>
> Thanks in advance for any help.
>
> John Fleming
> jflemingnj_at_gmail.com
>
Don't cross-post
Avoid sequences, if possible; they will cause problems sooner or later... Another post suggested 1-1000 for user 1: what when user one is about to insert record 1001?!? Right... That gives another problem... Primary keys... One solution might be to use a concatenated key of user and sequence#. If you cannot avoid sequences, try to estimate the max number of users. Multiply by three (to be on the safe side), and make that the *increment* of your sequence. Start value for every mobile install should be the last generated start value, plus one.
-- Regards, Frank van Bortel Top-posting is one way to shut me up...Received on Tue Nov 15 2005 - 12:25:06 CST
![]() |
![]() |