[om-list] N-ary relationships and simple sentences

Mark Butler butlerm at middle.net
Wed Nov 26 13:42:01 EST 2003


After several weeks of effort and much struggle with binary 
relationships in my meta model, I have concluded that tagged n-ary 
relationships are much more practical, at least for my purposes.  That 
is not to say that binary relationships are unusable, just that n-ary 
relationships are more convenient.

I consider an event, like a collision to be a short temporal 
relationship between multiple participants.  You can handle this in a 
binary meta model by making the event a regular object and create binary 
relationships between the event and the participants.  In my system all 
relationships are first class objects, but all first class objects are 
not formal relationships, so you have to decide a head of time.  In this 
case the event was made into a plain vanilla object and the 
participations were made into relationships.

But what if a relationship has other relationships?  For example if 
friend(x,y) is a relationship between x and y, a third party z might 
have an opinion about the quality of that relationship.  Indeed the very 
fact the we have the word friendship indicates that we treat the 
relationship as a first class object.  That is not a problem in and of 
itself except for one thing - the roles x and y in a friendship are 
preferred (and hard coded) so that if you are searching for the parties 
to a relationship you have to look somewhere different (and in two 
different places, subject (argument 1) and object (argument 2) than you 
look to find other things that are related to the relationship.

My solution is to treat all first class relationships as generic 
objects, like the event object I described above, and then use second 
class relationships ("connections") to let an arbitrary number of 
participants participate in any relationship, and furthermore to tag 
those connections according to fundamental role in the relationship 
(agent, subject, object, place, time, etc).

So in the friendship case, I have an object for x, and object for y, a 
friendship object, and two connector objects, tagged as subject for the 
connection to x, and object for the connection to y.  I can also add 
other qualifiers as appropriate. 

Now of course, one might object that I have merely pushed the problem 
down a level - surely participation in an event needs to be treated as a 
first class object.  It would be nice however, if connections did not 
have to be first class objects with hard coded relationships, so my 
solution is to treat connections like second class objects and create a 
new first class object with a distinct pair of connections, if and only 
if the lower level relationship implied by the connection needs to be 
treated as a first class object.

This is rather similar to the way most natural languages work.  For 
example if I say "A collided with B in 2002", the verb is the core 
relationship object, A, and B are participants, '2002' is a related time 
object, and the prepositions 'with' and 'in' are relationship 
participation tags.  In languages like Latin and Korean, all parts of 
the sentence would be tagged according to case (subject, object, 
indirect object) etc.

But if I want to speak about A's responsibility for the collision, I 
don't make a reference to the meta-relationship between A and the 
collision per se, but rather speak of "A's responsibility for the 
collision" - now responsibility is the key relationship with A and the 
collision as tagged participants - 'A' is tagged as the owner, and 
'collision' as the qualifier"

Comments?

 - Mark




More information about the om-list mailing list