To Web restAPI or To Use Local Database ? That is the question my friends

I am writing an application for a company that has multiple locations ( with more opening at a steady pace ).

the application will have data to use for GPS look ups for travelers to use. I am looking for other peoples thoughts on this.

There are going to be several more fields but lets keep this simple.

I was thinking of using a local db doing something like this:

LocaDB Elements and values

DataVersion = 1.0

StoreLocationId = 1

StoreLat=xxxx

StoreLog=xxxx

StoreLocationId = 2

StoreLat=xxxx

StoreLog=xxxx

StoreLocationId = 3

StoreLat=xxxx

StoreLog=xxxx

So I could start off with all the data populated with the default xml file, and create the local db on the fly when the app first starts.

Then anytime there is an update I upload a new version of the XMLFile to the internet.

A very small and simple RestAPI can be called to just check the version of the xml file

RestApi.GetDataVersion() this would return the version number and then based on the version I could call another api ( restAPI.GetDataForUpdate() ).

This would in-turn download the entire xml file and I would wipe and reload the database.

  1. Or I could call a RestAPI with my current location and then get the store location details around me.

  2. The only other way would be to keep a static DB and force updates on the app every time the data changed and I don’t want to do that.

and I would be using this data to see if I have a Store located near me ( my current location ).

any thoughts would be great.

thanks

Larry

Personally I would consider doing both.

The local DB holds known places. On startup, or when you find you have Internet, contact your server and have it send all new items since some date/time (stored locally)., inject those new locations into your local database.

This will minimize overall network traffic and provide a faster performance with a local query.

Rob

Personally I would consider doing both.

The local DB holds known places. On startup, or when you find you have Internet, contact your server and have it send all new items since some date/time (stored locally)., inject those new locations into your local database.

This will minimize overall network traffic and provide a faster performance with a local query.

Rob