I’d like guidance on the best approach when trying to record properties on links between objects in our ontology. Right now we are going to create an object in the ontology that is essentially a linkage object so that we can capture information like the start/end date of a linkage. Is that the best approach? Are there any alternatives?
Creating an object type to contain metadata on the link is the normal solution for this kind of problem. You can have a few different designs for linking ObjA
to ObjB
:
ObjA <---> ObjLink <---> ObjB
This is semantically the most satisfying, but you might the limit on 3 search arounds quite quickly. Alternatively you can keep the old link but add the ‘metadata link’:
ObjA <-----------------> ObjB
\-> ObjLink <-/
This allows you to do the search arounds quickly in some cases, but also lets you get the metadata when you need it.
However, in many cases you can just denormalise any link metadata onto one of the objects. I’d say this is normally always the case in any one-to-one or one-to-many links.
I agree with all of @Ben’s points, but commenting to add a supplemental note that I believe that the actual performance of a two-hop search-around on one-to-many or one-to-one links is the same as that of a single-hop search-around on a many-to-many “Join Table” link (though indeed, the second one is advantageous with respect to avoiding the limit on three search-arounds in functions).
Thank you for the clarification and for the trade-offs on the various approaches here!