stores db as global app object
saves db as global object in app