The Knowledge Graph Conference Icon
The Knowledge Graph Conference
  • 馃彔Home
  • 馃搮Events
  • 馃懁Members
  • 馃數Announcements
  • 馃數Ask
  • 馃數Ask The Ontologists
  • 馃數Events
  • 馃數Jobs
  • 馃數Promotions
  • 馃數Share
Powered by Tightknit
Ask
Ask

Exploring Blank Nodes and Local Scopes in RDF Graphs

Avatar of Sven V.Sven V.
路Dec 09, 2022 02:27 AM

Hi all, I was reading this thread on skolems and blank nodes in RDF on answers.knowledgegraph.tech, but the thread is somewhat old. It seems like most of the issues with blank nodes is that they are treated as existential variables, not constants, like IRIs. However, they seem to be the only way to correctly apply a "local scope". Is that correct or is there a more appropriate way of applying a local scope? In particular, I am interested in building an RDF graph on a single machine without the capability of minting global identifiers, but am trying to utilize the great capabilities of ontologies and SPARQL. Some options I am considering but do not like:

  1. 1.

    IRI scheme urn:uuid doesn't seem appropriate because a single machine should have a way of deterministically assigning identifiers

  2. 2.

    An IRI like myLocalIdentifier:1 would be good because it enforces the resource is a constant, but it doesn't provide any indication that some remote application should treat this particular resource name differently (because it is only locally unique)

9 comments

路 Sorted by Oldest
  • Avatar of Dimitris K.
    Dimitris K.
    路

    RDF 1.1 defines the proposed way for generating IRIs for blank nodes: https://www.w3.org/TR/rdf11-concepts/#section-skolemization

  • Avatar of Dimitris K.
    Dimitris K.
    路

    There are also algorithms for providing consistent IDs (or skolem IRIs) for these blank nodes, see references in https://w3c.github.io/rch-wg-charter/explainer.html

  • Avatar of Donny W.
    Donny W.
    路

    they seem to be the only way to correctly apply a "local scope". Is that correct or is there a more appropriate way of applying a local scope?

    you could use http IRIs using an authority component that is known to be reserved for local use, e.g. using the .test TLD, e.g. http://mynamespace.test/ as an IRI prefix for RDF nodes

  • Avatar of Donny W.
    Donny W.
    路

    it is also a not-uncommon practice to use http IRIs where you control the authority component (e.g. you own the domain name) but you don't actually provide resolution, though they may one day resolve (i.e. they are resolvable)

  • Avatar of Donny W.
    Donny W.
    路

    See also https://www.ietf.org/archive/id/draft-chapin-rfc2606bis-00.html#RFC2606 for discussion of reserved top level domain names such as .test and .localhost

  • Avatar of Sven V.
    Sven V.
    路

    Thanks Dimitris, I have been looking at skolemization a lot. I do have ambitions of one day publishing my data so I would like to use an IRI that indicates that the blank nodes are to be skolemized later, but also specifies that the blank node identifier is a constant. I guess the second link you shared describes a method of assigning hashes as ids. Is that different from an IRI?

  • Avatar of Sven V.
    Sven V.
    路

    Also, the first link https://www.w3.org/TR/rdf11-concepts/#section-skolemization states "Systems may wish to mint Skolem IRIs in such a way that they can recognize the IRIs as having been introduced solely to replace blank nodes. This allows a system to map IRIs back to blank nodes if needed." I guess I am looking for any such established approaches.

  • Avatar of Sven V.
    Sven V.
    路

    Thanks Donny, are there any domains that indicate that an identifier needs to be skolemized? What I am looking for is something that indicates to a different entity that the blank node should be skolemized, like a blank node, but is treated as a constant, like an IRI, by reasoners.

  • Avatar of Dimitris K.
    Dimitris K.
    路

    Sven V. these algorithms are used to compute a consistent hash for a dataset but in order to do that, they also compute deterministic IDs for blank nodes (depending on the algorithm you choose). One option could be to use these IDs as a suffix in the skolem namespace you will create, e.g. http://example.com/.well-known/genid/{bnode_id}