import pickle


def load_db(pathname):
    """
    returns the stored database from a pickle file
    
    Parameters
    ----------
    pathname: string
    
    Returns
    -------
    database: dictionary mapping names to profiles
    
    """
    with open(pathname, mode="rb") as opened_file:
        database = pickle.load(opened_file)
    return database