-
August 31st, 2018, 02:32 AM
#1
Duel database fact for a java app
Is there any way to use duel database for a Java app? Default db will store in local PC, another one will remote online server, application should have an option "Sync to online" after got the command click all local data will Sync with online db.
-
September 1st, 2018, 09:37 PM
#2
Re: Duel database fact for a java app
Sure use something like a guid as the primary key in the table (to avoid conflicts when syncing).
There are many strategies for syncing the data. One is to always write to the local database and have a background thread which syncs the records. The thread can he started by a button click. You can track a synced record in the local db by adding a column like a datetime column - just insert the current date/time when the record was sucessfully synced. The background thread will sync records that don't have the sync datetime column set.
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|