Chapter 5. Query RDF Graphs

Table of Contents

Functions Supported in SPARQL Queries
Syntax Involving Bnodes (Blank Nodes)
JavaScript Object Notation (JSON) Format Support
Best Practices
Additional Query Options
SPARQL 1.1 federated query SERVICE Clause
Data sampling
Query hints

The RDF Graph feature has native support for World Wide Web Consortium (W3C) standards. SPARQL is a query language designed specifically for graph pattern matching queries, and RDF and OWL are standards for representing and defining graph data. Oracle NoSQL Database stores RDF data as an array of bytes. It supports non-ASCII characters to accommodate a wide range of international characters.

Functions Supported in SPARQL Queries

SPARQL queries can use functions in the function library of the Apache Jena ARQ query engine. These queries are executed in the middle tier.

The following examples use the upper-case and namespace functions. In these examples, the prefix fn is and the prefix afn is

PREFIX dc:  <>
PREFIX fn:  <>
PREFIX afn: <>
SELECT (fn:upper-case(?object) as ?object1)
WHERE { ?subject dc:title ?object }

PREFIX fn: <>
PREFIX afn: <>
SELECT ?subject (afn:namespace(?object) as ?object1)
?subject <> 
?object }