Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Distinction between attributes and associations in a semantic model #803

Open
sstenchlak opened this issue Nov 20, 2024 · 3 comments
Open
Assignees
Labels
core Regarding the core (model) discussion

Comments

@sstenchlak
Copy link
Member

sstenchlak commented Nov 20, 2024

Following the discussion from #449, currently, the semantic model does not provide a mechanism to specify whether a given relationship should be classified as an association or an attribute. This distinction is only on the visual model; however, we need it at the semantic level as well.

There are two potential ways to implement this:

  • To have the information within the relationship by saying whether it is an attribute or association.
  • Annotate the end entity (class) by saying whether it is a class/complex type or a datatype/primitive type, which would imply the type or the relationship.

Related issues: #449, #451

@skodapetr
Copy link
Collaborator

What is the effective difference for association vs attribute outside of the visual?

@jakubklimek
Copy link
Contributor

@skodapetr Well,

  1. structure editor treats them differently - regardless if the are visualized or not
  2. documentation generators treat them differently. Here, it may or may not be connected to how they are visualized
  3. Maybe some other generators might treat them differently.

What RDFS does is that datatypes are instances of rdfs:Datatype:

rdfs:Datatype is both an instance of and a subclass of rdfs:Class. Each instance of rdfs:Datatype is a subclass of rdfs:Literal.

This corresponds to @sstenchlak second point.

OWL then explicitly distinguishes DatatypeProperty and ObjectProperty. There is a correspondence - datatype properties have instances of rdfs:Datatype as ranges.

This corresponds to @sstenchlak first point.

The same issue will be with distinguishing datatypes and classes. Some classes are datatypes, and then they are ranges for datatype properties.

So the question boils down to whether we annotate both relationships and classes in DS Core (an maintain consistency), or just one of those. I would annotate both, as it might be easier to use, or hide this behind and interface that will allow me to work with datatype/object properties and classes/datatypes, regardless of whether this is annotated in one place or two.

@skodapetr Just a note - the semantic-level distinction is separate from the visual-level distinction - all combinations are possible - DatatypeProperty displayed as a relation or an attribute, and the same for ObjectProperty.

@skodapetr
Copy link
Collaborator

Few more questions:

  1. Based on the semantic-level distinction is separate from the visual-level distinction, the visual model must be able to store additional information. Why not do something similar for other use-cases?

  2. I belive we can have a relationship without a range. Is such relationship is association or attribute? Can I create a property "name" without explicitly stating a range?

  3. There is already a "functionality" to distinguish between association and attribute. The disadvantage is, that it is based on a hardcoded list of "primitives" and a hack.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core Regarding the core (model) discussion
Projects
None yet
Development

No branches or pull requests

4 participants