Add a get_database utility function.