Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9277373
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T17:05:31+00:00 2026-06-18T17:05:31+00:00

We have a mobile(Android and iPhone) application which need to perform offline access. I

  • 0

We have a mobile(Android and iPhone) application which need to perform offline access. I want to get an idea on what is the best way to update SqLite database on the app side in more streamlined manner.

  1. One way I found is to send all the objects in JSON format via web service and there is a timestamp check to see if there is an update. if there is an update all the tables are truncated and insert again in the app side. I feel it’s very inefficient.

  2. Another way is to send sql statements over web services (wrapped with JSON). first time it sends all the insert records, hereafter insert records and update records if there are new records or updates. I feel this method is very insecure.

What is the best way to perform that using Restful Web service

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T17:05:33+00:00Added an answer on June 18, 2026 at 5:05 pm

    There are a few options, hardly an exhaustive list but more of examples to start your thinking around;

    • To optimize version 1, you can create a trigger on the server side that updates a version field on rows that are changed. That way, if the client knows that it has version 47 and the server has version 52, you know you’ll only need to send rows with version numbers between 48 and 52 to get the client up to date. This works best if updates are mostly line by line, not ‘update all green rows to puce’ which would still send a lot of data.

    • To make version 2 a little more secure, you can send all SQL except the table name and thereby lock down the changes to a particular operations (for example UPDATE/INSERT/DELETE, no SELECT) and to a particular table (ie no updates to other tables in the same database). This may be somewhat trickier to maintain, but works better if large parts of the database may be affected by a single UPDATE for example.

    • Break down the operations to the database into business operations and send those instead. For example, a business operation may be “Payment made: User2, $47”, the operation itself is sent to the client and then you’d map “Payment made” to an update in the database. This would require the number of operations to be fairly small and defined (seldom a bad idea to try to define them anyway though), but works well with both line by line and sweeping updates and would probably use the least amount of data to get things up to sync (if you number the operations so that you only send them once if the client has not already received them) It also gives you an audit log for free, the users balance did not just change, you know what made it change.

    Personally I’d go for option 3 if I had a choice since I like to know what the database updates actually mean and when they were done, but for existing systems it may be way too much work.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have been given the tasks of speccing a mobile application, which will need
We are developing a mobile application(iPhone, Android, WM) which mainly connects with the server
I have web application for mobile (developed in .net), I want to use iPhone
We have a fairly simple mobile application, completed for iPhone and Android that does
I am new to mobile application technologies.... We are developing applications for iPhone/android/blackberry/windows mobile.
I already have working iPhone & Android application. We are planning to add more
I want to develop a application. Say for example on Phone7/iPhone/android, this application shall
I am thinking to make an mobile app in Android and iPhone which will
I am creating mobile application in asp.net webform targeting IPhone, Android and blackberry. I
I have developed a HTML application which uses JQuery to get the data from

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.