Handles actions concerning a database.