Solved

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

Posted on 2014-11-19
8
267 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

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

Creating Instructional Tutorials  

For Any Use & On Any Platform

Contextual Guidance at the moment of need helps your employees/users adopt software o& achieve even the most complex tasks instantly. Boost knowledge retention, software adoption & employee engagement with easy solution.

Question has a verified solution.

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

Often, people trade privacy and security for convenience. However in today's concrete jungle, this is an extremely foolish decision considering the vast amount of technologies being used against consumer interest. First off, I won't waste any time e…
It is possible to export the data of a SQL Table in SSMS and generate INSERT statements. It's neatly tucked away in the generate scripts option of a database.
Using examples as well as descriptions, and references to Books Online, show the different Recovery Models available in SQL Server and explain, as well as show how full, differential and transaction log backups are performed
Via a live example, show how to extract insert data into a SQL Server database table using the Import/Export option and Bulk Insert.

636 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