Hi, I must be missing something really basic. In Studio, I have created a new DB and inserted a few sample triples via the INSERT DATA SPARQL statement. I can run a SELECT in Studio, showing the results. But when i switch to Explorer, i get a ‘No Results’ output.
Thanks Joe for the quick reply. Got it. Any hello world example on how to create and load the data model in Studio, so that Explorer can visualize the data?
is only needed to have Explorer picking up the data model, right? It’s not stricly needed if i’ll load the data in studio and use SPARQL to query the data.
Yes — you only need to write the model into stardog:context:schema (or some named graph) if you want Stardog to use it. The prefixed IRI stardog:context:schema has full IRI tag:stardog:api:context:schema and it’s the default named graph Stardog will look for data model triples in.
Other than that there’s nothing special about that named graph.
The Data Model is also where you may place OWL reasoning axioms or Stardog rules, so that reasoning can be applied over your data. For example you could make the :likes predicate Symmetric by running the insert data query below
When you run the select with reasoning on (the button next to Run) you’ll find that
:Bugs_Bunny :likes :Daffy_Duck and
:Daffy_Duck :likes :Bugs_Bunny
This 2nd triple pops into existence at query time. It doesn’t exist in the data.
So RDF itself is a schema less data model, so your SPARQL queries will work perfectly well even without a data model. The data model (sometimes called an ontology especially if it contains reasoning axioms) is optional and is used by visualiser, reasoning engines, validation mechanism (like Shacl) and for shared meaning.