Solved

Need help developing a Mobile/Tablet Application which needs to sync to an Online Database

Posted on 2014-11-19
8
263 Views
Last Modified: 2014-12-01
Hi

I currently am tasked with creating a mobile/tablet application which users may not always have internet connection but they still need to be able to use the application if there is no internet connection.I currently have created a SQL database which is on a cloud server. I need the application to sync to the cloud server once the device comes online.

Please could you assist me in letting me know what would be the best way to create a mobile application which is capable of working offline, and once it comes online it syncs with the online database.

Please keep in mind if the device is offline they still need to be able to access data that was added from the last time the device was sync with the cloud server.
0
Comment
Question by:EasyToHelp
  • 2
  • 2
  • 2
  • +1
8 Comments
 
LVL 15

Assisted Solution

by:JimFive
JimFive earned 200 total points
ID: 40453679
Will information from their device need to go back to the cloud database or is the transfer one way?
0
 
LVL 39

Expert Comment

by:Aaron Tomosky
ID: 40453961
So basically your app talks to a local database, you never talk directly to the remote database. Then you have a part of the app that does the syncing. Exactly how this is done depends on if you are writing or just reading at both locations and how your data is structured.
0
 

Author Comment

by:EasyToHelp
ID: 40454380
@jimFive The information from the device needs to go back to the cloud server
0
NAS Cloud Backup Strategies

This article explains backup scenarios when using network storage. We review the so-called “3-2-1 strategy” and summarize the methods you can use to send NAS data to the cloud

 

Author Comment

by:EasyToHelp
ID: 40454387
@Aaron Tomosky The cloud server is basically there to act as a master database to hold all data from all the users devices and provide live updates if the device is online.So if the device is online it needs to show all the information that gets posted to the Master Database and update the database on the mobile/tablet device so once the device goes offline they will have the latest data from when they were online and they are still able to add new records to the database and access any older records.And once they login and they are online again the device needs to sync(send all the records which were created when the device was offline to the cloud and update the device database with all other records that may not be on the devices database).
0
 
LVL 15

Accepted Solution

by:
JimFive earned 200 total points
ID: 40454936
Basically, what you do is create your application to use the local data store.  Then you create a sync adapter (android, don't know what MS calls it) to handle the data synchronization.  When designing your data model be sure to ensure that you won't have collisions.  One way to do that is by using device IDs that you can assign when the application is first executed.  Another consideration is to make sure the device stores the "last synched record" so that it isn't getting all the data every time, only synch the new records.  If records are going to change (instead of just being added/deleted) then you will need a mechanism to know which records have changed as well.

Good Luck
0
 
LVL 39

Assisted Solution

by:Aaron Tomosky
Aaron Tomosky earned 100 total points
ID: 40455727
Rule 1: changes are hard, additions/deletions of a row are easy. You want to avoid doing merge changes within a row.

When you are going to have lots of data, you can do fun things like bundling groups of additions or using a timestamp to know you have data up to a certain time.
0
 
LVL 23

Assisted Solution

by:Racim BOUDJAKDJI
Racim BOUDJAKDJI earned 200 total points
ID: 40460015
You will need to create some kind of middleware to merge back data back and forth SQL CE (tablets, mobile...) and your cloud database when the mobile is connected.
0
 
LVL 23

Assisted Solution

by:Racim BOUDJAKDJI
Racim BOUDJAKDJI earned 200 total points
ID: 40460018
You need to identify the primary keys of the tables which should be the same on both local and cloud database then as mentioned above, use a timestamp to write down to either the local database or to the cloud database.
0

Featured Post

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
Here, we have shared an easy step by step tutorial on how to download instagram images and videos on PC, Android Mobile and iOS mobile.
Viewers will learn how to use the SELECT statement in SQL and will be exposed to the many uses the SELECT statement has.
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

821 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question