title: Should I open() and close() my SQL database constantly or leave it open?
body: <p>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.</p>
  
  <p>In the tutorials I have seen, they recommend that you close the database after changing it (it is an "expensive" in terms of resources).  </p>
  
  <p>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?</p>
  
  <p>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.</p>