Had to first delete composition_rels and membership_rels. Then the rows can be easily deleted.
The object_id of the rows that I wanted to delete were the context_id of a couple of relations. Once those relations are deleted the rest works fine.