I am building an android application, which involves listing details of product. These products will be 500 to 1000 items and evolve over time, with changes from backend server.
To avoid fetching this large data from server each time to display list, need to persist in local database and display by querying from database.
For persisting data, i explored the following ways available.
- Native sqlite (sync using sync adapter framework)
- Realm (couldn't figure how to sync)
- Couchbase lite (has it's own sync gateway)
But yet couldn't come into any conclusion for best possible approach.
Since the data is large and we need to have offline access to data through app, syncing data becomes very important. I am still learning these things.
Can someone please guide me in the right direction to design storing data and syncing data when there is some change in backend?
EDIT:
Though there are different views or multiple ways for designing data sync in an android app, want to understand few things:
Storage options
a. Storing in native sqlite or NoSQL databases like Realm, CouchDB Lite ?Sync options
a. For syncing, do i need to have sqlite db structure to be same as server db ?
b. Can Realm be combined with Sync adapter or does Realm has any other options for syncing ?Database design
a. Since each product item has further details to display upon clicking them, product details need to be fetched with another API call or all those details to be included in initial API call? what is the design approach to follow ?