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

10
Querying with SPARQL Tuesday, October 28, 2014 Technical Exchange on Network Management Interoperability Andrea Westerinen JHU-APL/Nine Points Solutions 1

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

Page 1: Querying with SPARQL Tuesday, October 28, 2014 Technical Exchange on Network Management Interoperability Andrea Westerinen JHU-APL/Nine Points Solutions.

Querying with SPARQL

Tuesday, October 28, 2014

Technical Exchange on Network Management Interoperability

Andrea WesterinenJHU-APL/Nine Points Solutions

1

Page 2: Querying with SPARQL Tuesday, October 28, 2014 Technical Exchange on Network Management Interoperability Andrea Westerinen JHU-APL/Nine Points Solutions.

2

Traditional SQL

Page 3: Querying with SPARQL Tuesday, October 28, 2014 Technical Exchange on Network Management Interoperability Andrea Westerinen JHU-APL/Nine Points Solutions.

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

Page 4: Querying with SPARQL Tuesday, October 28, 2014 Technical Exchange on Network Management Interoperability Andrea Westerinen JHU-APL/Nine Points Solutions.

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

Page 5: Querying with SPARQL Tuesday, October 28, 2014 Technical Exchange on Network Management Interoperability Andrea Westerinen JHU-APL/Nine Points Solutions.

5

Sample Ontology Definition

Page 6: Querying with SPARQL Tuesday, October 28, 2014 Technical Exchange on Network Management Interoperability Andrea Westerinen JHU-APL/Nine Points Solutions.

6

Sample Individual/Instance Data

Page 7: Querying with SPARQL Tuesday, October 28, 2014 Technical Exchange on Network Management Interoperability Andrea Westerinen JHU-APL/Nine Points Solutions.

7

Sample Rule

Page 8: Querying with SPARQL Tuesday, October 28, 2014 Technical Exchange on Network Management Interoperability Andrea Westerinen JHU-APL/Nine Points Solutions.

8

Sample SPARQL (Simplified Joins)

Query:

Result:

Page 9: Querying with SPARQL Tuesday, October 28, 2014 Technical Exchange on Network Management Interoperability Andrea Westerinen JHU-APL/Nine Points Solutions.

9

Sample SPARQL (Property Chaining and OPTIONAL)

Query:

Result:

Page 10: Querying with SPARQL Tuesday, October 28, 2014 Technical Exchange on Network Management Interoperability Andrea Westerinen JHU-APL/Nine Points Solutions.

10

Sample SPARQL (With Inference)Query:

Result (without reasoning):

Result (with reasoning):

Inferred