O'Reilly logo

Semantic Web for the Working Ontologist, 2nd Edition by James Hendler, Dean Allemang

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

SPARQL—Query Language for RDF

The syntax of SPARQL actually looks like Turtle. So these examples really look more like this:

image

Before we go further, let’s talk a bit about the syntax of a SPARQL query. We’ll start with a simple form, the SELECT query. Readers familiar with SQL will notice a lot of overlap with SPARQL syntax (e.g., keywords like SELECT and WHERE). This is not coincidental; SPARQL was designed to be easily learned by SQL users.

A SPARQL SELECT query has two parts; a set of question words, and a question pattern. The keyword WHERE indicates the selection pattern, written in braces. We have already seen some question patterns, e.g., ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required