Solved

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

Posted on 2014-11-19
8
265 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
The Ultimate Checklist to Optimize Your Website

Websites are getting bigger and complicated by the day. Video, images, custom fonts are all great for showcasing your product/service. But the price to pay in terms of reduced page load times and ultimately, decreased sales, can lead to some difficult decisions about what to cut.

 

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

Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

Question has a verified solution.

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

In this post we will learn how to make Android Gesture Tutorial and give different functionality whenever a user Touch or Scroll android screen.
In this article we will learn how to fix  “Cannot install SQL Server 2014 Service Pack 2: Unable to install windows installer msi file” error ?
Via a live example, show how to set up a backup for SQL Server using a Maintenance Plan and how to schedule the job into SQL Server Agent.
Using examples as well as descriptions, and references to Books Online, show the documentation available for datatypes, explain the available data types and show how data can be passed into and out of variables.

734 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