rdfowl

uniqueness of owl n-ary relationships


I defined an n-ary relationship in an owl ontology by representing the relationship as a class with n-object properties, i.e. given 3-ary relationship r, I have 3 object properties for r.

Can someone suggest how I can make sure that the n-ary relationship is indeed unique that is given 2 3-ary relations (a1,b1,c1) and (a2,b2,c2) then a1 not equals a2 and b1 not equals b2 and c1 not equals c2 (and is important here e.g. if c1 is not equals to c2 then the relationships would be surely different regardless of what a1,b1,a2,b2 are). For this case I cannot make use of the inverse functional property since this would check the entities one by one but what I need here is an axiom that asserts that all properties are unique.

Any help would be appreciated ! Thanks .

I tried using some axioms such as inverse functional but to no avail.


Solution

  • There are 2 factors that make this possible within OWL

    1. Representation of n-ary relations
    2. Key constraints

    Representation of n-ary relations

    An n-ary relation Rn over components R1, . . . , Rn can be expressed as the reified concept C using n roles r1, . . . , rn as represented in the next diagram.

    Reification of n-ary relation

    The Manchester syntax of this is as follows:

    Class: C 
        SubClassOf: r1 exactly 1
    ...
    Class: C
        SubClassOf: rn exactly 1
    
    owl:Thing SubClassOf r1 only R1
    ...
    owl:Thing SubClassOf rn only Rn   
    

    Unique constraints

    To define a unique constraint on an n-ary relation, you need to define the unique constraint on the reified concept C as follows:

    Class C: 
        HasKey: r1, r2, r3
    

    if C has a uniqueness constraint on for those 3 components.

    I have written about this in my MSc dissertation(see section 5.1.2) and Phd thesis (see section 5.2).