1

I've just started looking at Semantic Web and there's one thing I'm a little uncertain of:

Are Turtle, JSON-LD (and others like Trig) simply ways to write RDF in their own respective syntaxes?

From what I understand once its in some RDF format, I can happily run SPARQL queries - or is there more to their differences, like specific use cases?

Regards.

userMod2
  • 8,312
  • 13
  • 63
  • 115
  • 1
    Yes, those are just different syntaxes to serialize RDF. Like also N-Triples, RDF/XML. And yes, you can run SPARQL queries once you loaded the RDF data into the triple store/SPARQL engine of your choice - the only limitation might be that one of the syntax formats isn't supported by the triple store. although this is very rare especially for the most popular ones. – UninformedUser Jan 15 '20 at 07:42
  • Trig is a bit different from the other formats as it allows to serialize whole datasets, i.e. it can contain multiple graphs with its contained triples. Same for N-Quads format. – UninformedUser Jan 15 '20 at 07:45
  • 1
    https://w3c.github.io/json-ld-syntax/#relationship-to-rdf. JSON-LD allows predicates to be blank nodes :). – Stanislav Kralin Jan 15 '20 at 10:53
  • ok, so it's [generalized RDF](https://www.w3.org/TR/rdf11-concepts/#section-generalized-rdf) which is afaik non-standard though – UninformedUser Jan 16 '20 at 11:36

1 Answers1

1

RDF-Turtle and JSON-LD are really notations for inscribing RDF sentences to documents.

RDF Documents may reside on a Filesystem or be managed by a DBMS, Quad- or Triple-store.

SPARQL is a Declarative Query Language for performing Data Definition and Data Manipulation operations on Data Represented in RDF (i.e., Relations represented as subject->predicate->object 3-tuples).

SPARQL is handled by a SPARQL Processor (or Engine) that is typically a feature of an RDF-supporting DBMS, Quad- or Triple store.

You ability to use SPARQL is totally unaffected by your RDF being created using RDF-Turtle or JSON-LD notations.

One final thing, the body of a SPARQL Query is actually RDF-Turtle plus additional support of variables as another mechanism for entity denotation.