Skip to main content

SPARQL Introduction

SPARQL (pronounced "sparkle") is a query-langauge for RDF ledgers.

RDF ledgers are also known as triple-store ledgers, and every fact in a triple-store leger is stored a triple composed of a subject-predicate-object (SPO).

The first three elements of a flake (subject, predicate, object) align exactly to triple-store ledgers' SPO triples. This lends itself to connection across Fluree and RDF ledgers.

You can use SPARQL to:

  1. Query FlureeQL ledgers across time
  2. Query across Fluree and non-Fluree ledgers, such as Wikidata and BigData.
  3. Calculate aggregates
  4. Create complicated joins

In additional, SPARQL is strictly a query-language. You cannot use SPARQL to transact data.

SPARQL queries, as supported in FlureeQL are comprised of a:

  • SELECT clause
  • WHERE clause
  • PREFIXes
  • Additional Options