Reduce the resources usage on the database

With the database helper, the application fragment is only required to
close the helper class. Please note that there are no more db.close and
db.getReadableDatabase.