I was browsing around and I found different ways on how you should implement the database:
- This says it should be open the whole time, while
- This says it should be opened and closed only when data is being read/written.
which had me thinking, which is really the correct way, when applied to SQLite database running on Android? Should one have the database open during the whole lifetime of the app, or should it only be opened/closed when data is read/written?
What are the advantages and disadvantages of each of these two approaches?