I described a possible way to do this a while ago using the character database:
It’s not graphic, but can keep track of all sorts of relationships