Straight to your questions.
- Yes, it possible to store a database in the device memory. One of the most popular ways is to use SQLite plugin (the plugin on GitHub).
- DB file location - DB location depends on the app location. When the app calls
sqlitePlugin.openDatabase(), the plugin will create the database file if it does not exist, or read the database file if it does exist. For each platform, the database file should be in the same path (relative to your app) regardless whether you are running it on an emulator or on a real device.
There is an option (
createFromLocation) that copies the database file from the app's
www directory if it is not already present (used to pre-populate database).
- You can store thousands of elements using SQLite queries - still, you are limited on space available on the device and should also test the performance with a larger database as devices vary on computing power.
- Distributed database - I am not aware this approach to be available when using a mobile database. Could you please share some more information about your use case in order to be able to provide more information on possible approaches?
Further, you may review this blog post as well as our sample SQLite demo app.
I hope this has helped.
Telerik by Progress