Removes a relation by comparing pointers of the given data