def chain_value(row, attribute_ids):
    """
    Join all the values of attributes to get a identifier
    :param row: a row of the table, e.g. a list of attribute values
    :param attribute_ids: a set of attribute
    :return: a string consists of joint value
    """
    result = []
    for attribute_id in sorted(attribute_ids):
        result.append(row[attribute_id])
    return '-'.join(result)