Solved

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

Posted on 2014-11-19
8
261 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 38

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
VMware Disaster Recovery and Data Protection

In this expert guide, you’ll learn about the components of a Modern Data Center. You will use cases for the value-added capabilities of Veeam®, including combining backup and replication for VMware disaster recovery and using replication for data center migration.

 

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 38

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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Need help how to find where my error is in UFD 6 30
convert null in sql server 12 34
Find SQL query used by application 3 20
Sql server, import complete table, using vb.net 9 36
Slowly Changing Dimension Transformation component in data task flow is very useful for us to manage and control how data changes in SSIS.
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.
Viewers will learn how to use the SELECT statement in SQL to return specific rows and columns, with various degrees of sorting and limits in place.
Viewers will learn how to use the UPDATE and DELETE statements to change or remove existing data from their tables. Make a table: Update a specific column given a specific row using the UPDATE statement: Remove a set of values using the DELETE s…

822 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