-3

I'm really new to programming apps - so this question might sound a bit strange: I'm trying to program an app in android studio, where people can upload different things (basically strings and links put together in some kind of "package") and other peoble can then decide what "packages" they want to add inside their app. However after downloading, this data should be stored on their device and not just in the memory of the phone so that they can use it after restarting the app (and also if theres no internet connection). Do you have any idea what would be the best way to store this data both on the phone and in a database and how to synchronize the data on the phone with the selected data from the database. I really dont want to know how to do this exactly but would rather like some basic ideas and maybe you could tell me what kinds of stuff i should learn in order to succeed and what kind of database would be best here (firebase, MYSQL,..)?

Thanks a lot, Andi

Australo
  • 3
  • 4

2 Answers2

0

If you are talking about local databases. Go for Realm or look up a good ORM on github (Object relational mapping, you dont have to write SQL queries explicitly) . I would suggest Realm which is very fast and user friendly.

Pavan
  • 767
  • 4
  • 18
0

First of all you should decide what DB you are going to use. In my opinion all RDBMs are good, but using Sqlite in order to achieve best performance on android devices is a good idea.

In your case you need server-side DB and application too. (Depend on the scenario and framework you use can be different (sql,mysql,PostgreSQL,oracle,...)).

About how to sync local database with server-side you can download new DB from server and replace it with previous one, if you need previous user data you can have 2 different table and update one by downloading it from server, and save id or any identical row from specific package that already saved by user.

These are some question has been already answered in Stackoverflow

java - How to update table in sqlite?

java - SQLite in Android How to update a specific row

Create SQLite database in android

Community
  • 1
  • 1
Moien.Dev
  • 1,030
  • 2
  • 10
  • 18