bartkl / cim-to-linkml

Generates LinkML schemas for packages in the CIM information model.
0 stars 0 forks source link

Write in wiki about modeling choices regarding relations (see LinkML FAQ) #9

Closed bartkl closed 2 months ago

bartkl commented 3 months ago

Read here.

The first idiom is pretty much what I'm doing now. The second one would be nice, however: in the CIM project (almost?) no relation has a name or note. Only the roles and notes thereof are usually described. For that reason I think it makes sense to stick with the currently used idiom (the first from the FAQ, compare notes though). Moreover, this feels like a safer data modeling idiom to work with generators and the likes.

bartkl commented 3 months ago

Suppose I have two different relations between the same domain and range class, with every parameter equal (role names, cardinality, etc.):

A - b --- R1 --- a - B A - b --- R2 --- a - B

With the current idiom, this would cause overwrites.

I think this is no problem however. We must be sure to detect this, pick the first (in deterministic order!) and log the situation and skips.

bartkl commented 3 months ago

Another potential improvement: involve direction? I'm not sure what to do with it, discuss this with Ruben.

bartkl commented 2 months ago

Write about this in the wiki. For now I'm not planning to change the modeling choices.