Sets up basic database access