Property domain and range definition - additive or overwritten?

In the definition below, would the so:domainIncludes be combined together or would the latter overwrite the first? (And would it matter if the definitions were in the same named graph or separate ones?)

:login_date a owl:DatatypeProperty ;
    rdfs:label "login_date" ;
    so:domainIncludes :table_1 , :table_2 ;
    so:rangeIncludes xsd:string .

:login_date a owl:DatatypeProperty ;
    rdfs:label "login_date" ;
    so:domainIncludes :table_3 ;
    so:rangeIncludes xsd:string .

Thanks!

ChatGPT's answer:

In RDF/OWL semantics, properties and classes are assumed to be open. Thus, stating new information doesn't overwrite old information but adds to it. If these statements are in the same named graph or different ones, it won't matter in terms of the overall inferred model: :login_date will include :table_1, :table_2, and :table_3 in its domain. This is assuming default behavior and settings; specific behavior might be influenced by the database's configuration or the application querying it.

Sounds sensible to me! Would a knowledgeable knowledge graph person be so kind as to verify?

Additive. Both RDF(S) and OWL semantics are so-called monotonic: new statements can only yield new inferences but never invalidate inferences that were true in the previous state of the data.

If you have a statement that the domain of :p is :A, then every object with an outgoing :p edge is an instance of :A. If you then add that the domain of :p is :B, then every object with an outgoing :p edge is an instance of both :A and :B.

so:domainIncludes works differently from rdfs:domain. Its semantics is disjunctive, i.e. the domain is A or B, not conjunctive. There're discussions on the Web on the differences between so:domainIncludes and rdfs:domain, but as far as I can tell this isn't the main question here.

Best,
Pavel

Any idea on how I would learn this kinda information (which seems important)? Is there a book out there for "How to get comfortable with RDF"?

There're definitely books out there and the monotonicity must be mentioned in a few (it's also in the OWL Guide). I like the Foundations of Semantic Web Technologies, other people prefer the Dean Allemang's book. There are others, e.g on SHACL.

Adrian Gschwend from Zazuko at some point started curating a list of resources on everything RDF-related, you can check it out too: https://linked-data-training.zazuko.com/

Hope it helps,
Pavel

1 Like

Thank you for the recommendations Pavel.