Querying with SPARQL Tuesday, October 28, 2014 Technical Exchange on Network Management Interoperability Andrea Westerinen JHU-APL/Nine Points Solutions 1
2 2 Traditional SQL
Query language for RDF triples Can view a triple database as rows of data, where each row has 3 columns: Subject Predicate Object Much simpler to query if you need to relate multiple objects and/or the objects are themselves “join”able entities Such defining all the entities affected by a trouble ticket Similar SELECT vocabulary to SQL With ORDER BY, GROUP BY, … Support for algebra (AVG, SUM, …) OPTIONAL data 3 3 SPARQL
Based on the data from the previous demo Query for: Ontology definitions Trouble tickets and their data POC for tickets and their names Affected entities and their containing entities 4 4 SPARQL Examples
5 5 Sample Ontology Definition
6 6 Sample Individual/Instance Data
7 7 Sample Rule
8 8 Sample SPARQL (Simplified Joins) Query: Result:
9 9 Sample SPARQL (Property Chaining and OPTIONAL) Query: Result:
10 Sample SPARQL (With Inference) Query: Result (without reasoning): Result (with reasoning): Inferred