2

I have a database containing coordinates GPS of stores. Since I am the admin, I am able to keep adding some.

However, I am using Parse.com so I would like the users not to access the database online each time (limit database access and deal with offline matter) but instead, cloning the database on the device and each time the user launch the app, it would compare the database stored locally and the on on Parse.Com and update if needed. What is the way to do that ?

I hope I am clear enough.

Arnaud

4
  • how big is the database? and how fast does it grow? Commented Dec 15, 2014 at 21:26
  • It is pretty small. It will grow at a 2/3 added stores a day rate. I think at the end, I will have like 200 stores or so. Commented Dec 15, 2014 at 21:46
  • You could probably use the parse on-disk cache. see blog.parse.com/2014/04/30/… Commented Dec 15, 2014 at 21:50
  • Thank you for pointing this out. However it seems to me that it is not suitable for my purpose. Am I wrong ? Commented Dec 15, 2014 at 22:11

1 Answer 1

3
  1. On the first app launch select all the records from Parse.com and store them in the local database. Store date and time of the request as well.

  2. Keep in database on Parse.com date of last data modification by admin. These fields in Parse.com database are available by default. (createdAt, updatedAt)

  3. Each time user launched app make a request to compare dates. Request entries which are created or modified only after specific date.

Sign up to request clarification or add additional context in comments.

2 Comments

steps 1 and 3 are the same (in case 1, specific date is 0). (also, you want entries created and modified (which is also hinted by point 2)).
Yes 1 and 3 are the same. Added both just to explain the use case. Thanks, added info about modification date in 3.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.