Querying with SPARQL Tuesday, October 28, 2014 Technical Exchange on Network Management...

Post on 31-Dec-2015

214 views 0 download

Tags:

Transcript of Querying with SPARQL Tuesday, October 28, 2014 Technical Exchange on Network Management...

Querying with SPARQL

Tuesday, October 28, 2014

Technical Exchange on Network Management Interoperability

Andrea WesterinenJHU-APL/Nine Points Solutions

1

2

Traditional SQL

Query language for RDF triples

Can view a triple database as rows of data, where each row has 3 columns:

SubjectPredicateObject

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 SQLWith ORDER BY, GROUP BY, …Support for algebra (AVG, SUM, …) OPTIONAL data

3

SPARQL

Based on the data from the previous demo

Query for:Ontology definitionsTrouble tickets and their dataPOC for tickets and their names

Affected entities and their containing entities

4

SPARQL Examples

5

Sample Ontology Definition

6

Sample Individual/Instance Data

7

Sample Rule

8

Sample SPARQL (Simplified Joins)

Query:

Result:

9

Sample SPARQL (Property Chaining and OPTIONAL)

Query:

Result:

10

Sample SPARQL (With Inference)Query:

Result (without reasoning):

Result (with reasoning):

Inferred