title: How do triple stores use linked data?
body: <p>Lets say I have the following scenario:</p>
  
  <p>I have some different ontology files hosted somewhere on the web on different domains like _http://foo1.com/ontolgy1.owl#, _http://foo2.com/ontology2.owl# etc.</p>
  
  <p>I also have a triple store in which I want to insert instances based on the ontology files mentioned like this:</p>
  
  <pre><code>INSERT DATA
  {
    &lt;http://foo1.com/instance1&gt; a &lt;http://foo1.com/ontolgy1.owl#class1&gt;.
    &lt;http://foo2.com/instance2&gt; a &lt;http://foo2.com/ontolgy2.owl#class2&gt;.
    &lt;http://foo2.com/instance2x&gt; a &lt;http://foo2.com/ontolgy2.owl#class2x&gt;.
  }
  </code></pre>
  
  <p>Lets say that _http://foo2.com/ontolgy2.owl#class2x is a subclass of _http://foo2.com/ontolgy2.owl#class2 defined within the same ontology.</p>
  
  <p>And after the insert if I run a SPARQL query like this:</p>
  
  <pre><code>select ?a
  where 
  {
    ?a rdf:type ?type.
    ?type  rdfs:subClassOf* &lt;http://foo2.com/ontolgy2.owl#class2&gt; .
  }
  </code></pre>
  
  <p>the result would be:</p>
  
  <pre><code>&lt;http://foo2.com/instance2&gt;
  </code></pre>
  
  <p>and not:</p>
  
  <pre><code>&lt;http://foo2.com/instance2&gt;
  &lt;http://foo2.com/instance2x&gt;
  </code></pre>
  
  <p>as it should be. This is happening because the ontology file _http://foo2.com/ontolgy2.owl# is not imported into the triple store.</p>
  
  <p>My question is:</p>
  
  <p>Can we talk in this example about "linked" data? Because it seems to me that it is not linked at all. It has to be imported locally into a triple store, and after that you can start querying.</p>
  
  <p>Lets say if you want to run a query on some complex data that is described by 20 ontology files, then all 20 ontology files would need to be imported.</p>
  
  <p>Isn't this a bit disappointing?</p>
  
  <p>Do I misunderstood triple stores and linked data and how they work together?</p>