O
O
Orkhan Hasanli2018-10-01 22:36:18
Android
Orkhan Hasanli, 2018-10-01 22:36:18

What is the best way to organize a database in Android?

Good day!
There is a small android application in which data from the database is loaded into a recyclerview.
Since my database is full (the user cannot perform crud operations), for this I used SQLiteAssetHelper ( https://github.com/jgilfelt/android-sqlite-asset-h... thanks to which I can fill the sqlite database and add it to assets.And when you install or update the application, the tables are compared and updated.However, there are a number of problems that I encountered ... and would like to know how to implement it even
better.In SQLiteAssetHelper, there are the following disadvantages:
1) project abandoned
2) it is rather tedious to update the existing database, it is necessary to prescribe versions and sql commands for each of the possible updates, and this leads to errors. And many other nuances...
What is the best way to store data and, accordingly, how to update it in android?
Should I use:
- sqliteopenhelper
- or create a small web application with postgres sql for crud tasks and then sync data with sqlite
- Firebase Realtime Database
Are there any limits in Firebase (in free version)... number of records or db weight?
In simple terms, what is the best way to organize a database on android, if I need to add a database to the application already being filled

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander Varakosov, 2018-10-02
@azerphoenix

I am using this implementation. If the user cannot change the data in the database, then you can not bother with migration, but delete the old database and extract a new one in its place, for example, by listening toandroid.intent.action.PACKAGE_REPLACED

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question