1

From the perspective of someone familiar with relational databases, I know that I can learn about a data model by querying information_schema (or the SQL Server sys schema) - looking at tables, keys, naming conventions often facilitate this kind of learning, etc.

I'm struggling to find the equivalent in the RDF world. I am consuming a SPARQL endpoint, and I can see the ontologies/resource .rdf XML (specifying rdf, rdfs, and owl namespaces). I'm not very familiar with RDF/graphs at this point. Do these XML files contain all the information I would need to discover the entire RDF schema? Especially in the from clauses, where there are often graphs defined that I think I am unable to discover without prior knowledge of what graphs a server has access to.

Is this even a good mindset - "querying RDF schema metadata"?

Please let me know if this is not a good question! I'm still learning RDF basics

Zach Smith
  • 8,458
  • 13
  • 59
  • 133
  • 2
    RDF is schemaless, so you won't find tables columns etc. - the corresponding things you could check for are the used predicates and classes. Exploratory SPARQL queries are one way to achieve this: https://stackoverflow.com/questions/2930246/exploratory-sparql-queries – UninformedUser Feb 28 '20 at 09:27
  • also things like namespace aren't "part" of RDF but can be seen in some RDF serialization formats like RDF/XML or Turtle. In the end, you just have URIs, blank nodes and literals in RDF. Regarding "FROM" - think you mean SPARQL, those denote graphs a set of which comprises so called datasets. You'll find those just when you have Trig or N-Quads format – UninformedUser Feb 28 '20 at 09:30
  • thanks - that question is exactly what I'm looking for. I'm not sure what you mean by Trig / N-Quads format though – Zach Smith Feb 28 '20 at 10:09
  • RDF itself is made of RDF triples, right? So just subject, predicate and object. But you also mentioned the "from" keyword which occurs in SPARQL queries sometimes - those denote RDF graphs which itself contain a set of RDF triples. Those graphs can also be serialized using either Trig (it's basically Turtle syntax for quads and N-Quads (which is N-Triples with graphs) - so, you have subject, predicate, object and graph. – UninformedUser Feb 28 '20 at 10:15
  • Does that mean that the dataset - which is effectively a list of tripples - is effectively indexed by a value (the name of a graph that it is a tripple of)? – Zach Smith Feb 28 '20 at 10:30
  • 1. it is a **set** of triples 2. yes, triple stores **can** use this graph for indexing. – UninformedUser Feb 28 '20 at 10:41
  • Would it be correct to say that a set of triples is namespaced to a particular graph? Also, what's the difference between a list of triples and a set of triples – Zach Smith Feb 28 '20 at 10:45
  • I don't know about the word "namespace", it's just that those triples belong to this path. It's sets because no duplicates? – UninformedUser Feb 28 '20 at 12:17
  • Ah thank you. That makes sense. My understanding of namespacing is that it's conceptual. To me it feels like triples are namespaced by path. But that could be a misunderstanding on my part. But good enough to go on! – Zach Smith Mar 01 '20 at 12:31

0 Answers0