If Roommate implies Friend, then creating a Roommate relationship should also create a Friend relationship - it does. Conversely, deleting the Friend relationship should also delete the Roommate relationship - it doesn't.
Deleting an implied relationship should also delete the implying relationship.
Comments
Comment #1
sprsquish commentedThis isn't necessarily true. In fact your example is perfect.
I may not be friends with my roommate anymore, but they're still my roommate.
What this really needs is an optional "delete implied relationship" setting.
Comment #2
sprsquish commentedComment #3
sprsquish commentedoops
Comment #4
prfctns6@gmail.com commentedPropositional calculus and I disagree with you. :-)
Here's the truth table for 'A implies B':
A = T | B = T | A->B = T
A = T | B = F | A->B = F
A = F | B = T | A->B = T
A = F | B = F | A->B = T
In semi-English: If A is true and B is false, then 'A implies B' is false. In real English: If Roommate is true and Friend is false, then Roommate does not imply friend. At least according to propositional calculus, if Roommate does imply Friend, then you can't be Roommates without also being Friends.
With regards to my example, you're actually claiming that I've configured my options incorrectly, because Roommate does not really imply Friend (at least not in the real world). But, in the microcosm of my little web site, if relationship A does in fact imply relationship B, then relationship A shouldn't exist if relationship B doesn't exist.
Here's an indisputable example: Sibling implies Family Member. If there is no Family Member relationship, then there clearly shouldn't be a Sibling relationship.
If you want to make deleting the implying relationship optional, you could certainly make the point that not everyone who uses your module is a strict logician, and therefore might appreciate a little flexibility. :-) But please do at least give us the option of maintaining the formal semantics of 'imply'.
Comment #5
sprsquish commentedMost people in the world are not logicians and real-world relationships certainly don't follow logic. This is one of the same issues with object-relational-mappers. Objects don't always properly map to relations in the RDBMS sense. Logic doesn't always properly match relationships.
I'll write in the ability to optionally delete the implied relationship.
Comment #6
sprsquish commented