'Return a dictionary of {field_name: (field_name_other_table, other_table)}
representing all relationships to the given table.'

def get_relations(self, cursor, table_name):

    constraints = self.get_key_columns(cursor, table_name)
    relations = {}
    for (my_fieldname, other_table, other_field) in constraints:
        relations[my_fieldname] = (other_field, other_table)
    return relations
