Frage

  • I am using sesame HTTP api with its in-memory rdf store.
  • I load data/triples in a context/named graph
  • I query using named graph/context

I have 2 questions:

  • In the same repository, can a graph node be shared across different named graphs?

    • My use case is I filter data from graph1 and put it in graph2. So are nodes shared b/w graph1 and graph2?
  • Is looking up for a named graph an O(1) operation during a GET operation ? Or is there a performance advantage of using named graphs ?

War es hilfreich?

Lösung

  1. Yes, a graph node can be shared across different named graphs - in fact in Sesame any RDF resource with the same URI is automatically assumed to be identical and is therefore automatically shared across named graphs.
  2. That depends on the type of store and index used. In the in-memory store, a search for all statements given a particular element (subject, predicate, object, or named graph/context) is O(1) as the required list of statements is directly accessible. In a native store (Sesame's persistent on-disk store) the complexity depends on which indices are available, but on average it's O(log n).
Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top