def get_relations(self, cursor, table_name):
        """
        Returns a dictionary of {field_name: (field_name_other_table, other_table)}
        representing all relationships to the given table.
        """
        cursor.execute(self._get_relations_query, {
            'schema': self.connection.schema_name,
            'table': table_name
        })
        relations = {}
        for row in cursor.fetchall():
            relations[row[1]] = (row[2], row[0])

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