M
M
Maybe_V2016-03-20 12:57:37
Android
Maybe_V, 2016-03-20 12:57:37

How to deal with the database in android?

The question is not about the problem of creating or using a database in android, but about the correctness of its creation, or rather its implementation in the application!
For example, I'm currently making an application that has a database and 8 tables in it! How to do it right: create a database in a class that extends SQLiteOpenHelper or copy a ready-made database into an application?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Denis Zagaevsky, 2016-03-20
@prokopov-vi

In principle, both approaches have the right to life. It all depends on where you get the data from these tables. If this is something that is inside the application initially, then it is easier to create a ready-made database file. And if the data appears while the application is running (for example, from the network), then it is better to use the first option, since there is more control and everything (creation, updating) in one place. IMHO.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question