def add_relation(self, relation):
        assert isinstance(relation, Relation), 'Input should be a relation'
        if relation.full_name in self._relations:
            raise ValueError(
                'Relation %s already added to database' % relation.full_name)

        self._relations[relation.full_name] = relation
Add a relation, only if its name is not already used.
dataset/ETHPy150Open coursera/dataduct/dataduct/database/database.py/Database.add_relation