Synchronize object IDs in application and website database?
We have an Android app and a web service. We want to download some of the objects objects to the mobile. The user will be able to download more than a certain city. Because of this, we need to store the city_id online in a mobile database. We thought of two options:
- Each database will have its own primary IDs, but we will also store the Web Primary ID on the mobile device (so we can ask the web service for more information). This is the easiest option.
- The mobile table will not be automatically updated and the objects will have the same IDs as on the web.
What (or another) do you think is the best approach?
thanks!
0
a source to share