Get the database down to the necessary level.