Solved

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

Posted on 2014-11-19
8
250 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
Comment Utility
Will information from their device need to go back to the cloud database or is the transfer one way?
0
 
LVL 38

Expert Comment

by:Aaron Tomosky
Comment Utility
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
Comment Utility
@jimFive The information from the device needs to go back to the cloud server
0
 

Author Comment

by:EasyToHelp
Comment Utility
@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
Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

 
LVL 15

Accepted Solution

by:
JimFive earned 200 total points
Comment Utility
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 38

Assisted Solution

by:Aaron Tomosky
Aaron Tomosky earned 100 total points
Comment Utility
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
Comment Utility
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
Comment Utility
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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Determine next b-weekly date 12 52
SQL JOIN 6 26
Data to display differently-SQL Server 4 19
SQL Split character from numbers 3 15
In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
The Delta outage: 650 cancelled flights, more than 1200 delayed flights, thousands of frustrated customers, tens of millions of dollars in damages – plus untold reputational damage to one of the world’s most trusted airlines. All due to a catastroph…
Viewers will learn how to use the INSERT statement to insert data into their tables. It will also introduce the NULL statement, to show them what happens when no value is giving for any given column.
Viewers will learn how to use the SELECT statement in SQL and will be exposed to the many uses the SELECT statement has.

728 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

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now