I am creating an app that uses an SQL database for storing data. The way the app is designed it will be updated every 3 minutes or so with new data depending on user actions while the app is running.
In the tutorials I have seen, they recommend that you close the database after changing it (it is an "expensive" in terms of resources).
Is it better to leave it open for the duration of my App since it is being updated on a fairly frequent basis or should I run the close() method immediately after every change?
I guess my worry is that opening it and closing it constantly will draw more resources than it would to leave it open the entire time.