Getting Started with Semantics
MarkLogic Semantic Technologies and APIs include
- A SPARQL query language interpreter
- Tools and APIs for directly loading semantic data encoded in a variety of RDF triple formats
- A set of REST endpoints for interacting and querying stored RDF triples
- Tight integration of this with MarkLogic's document store, indexes, and search and analytics APIs
This tutorial contains a series of exercises to introduce these features, with a number of challenges for you to work through. We assume you
- Have installed MarkLogic and the mlcp tool.
- Are generally familiar with MarkLogic architectural concepts and terms.
- Maintain some fluency in XQuery and can use Query Console.
The first exercise is a simple Hello World-style introduction. The second has you go through the necessary steps to load the data needed by the subsequent exercises, which include some basic use of SPARQL, use of related XQuery APIs and the underlying triple index.
For your convenience in working through the exercises, we've provided a download-able semantics-exercises.zip (~5 MB) file that includes
- The necessary datasets and utility scripts for loading the data, along with
- A set of Query Console workspaces that contain the queries used by each exercise
NOTE: This is not a SPARQL language tutorial or an introduction to the Semantic Web.
There are a good number of online resources for learning SPARQL, including:
- A comprehensive set of tutorials from Cambridge Semantics
- Some SPARQL examples you can execute live
- Lee Feigenbaum's Cheat Sheet
- David Becket's Slideset on SPARQL 1.1
- Olaf Hartig's Introduction to SPARQL
- W3C tutorial on the semantic web and linked data
As well, we recommend the following books:
- Learning SPARQL, by Bob DuCharme
- Semantic Web for the Working Ontologist, by Jim Hendler and Dean Allemang
Again, we assume you can learn SPARQL syntax elsewhere.
Semantics Hello World