Semantic Web and Web 3.0 · class 09 · demo

The graph answers, and defends itself

The graph of the class, queried with SPARQL with and without a reasoner, and checked with SHACL. «The same query returns 40 results on your engine and 62 on a colleague's» — here is why, on real data.

286
triples · as written
918
triples · after OWL 2 RL (owlrl)
conforms
SHACL · domain.ttl
8
SHACL violations · domain-bad.ttl

Same data, same queries, two regimes. A count in orange changes when the reasoner is on — a result published without its regime means nothing.

The five competency questions

QueryNo reasonerOWL 2 RL
Q1 · Which products are made by Portuguese manufacturers?4 rows4 rows
Q2 · Which orders contain products from more than one manufacturer?1 row1 row
Q3 · Which products replace a discontinued product?1 row1 row
Q4 · Which customers ordered peripherals last month?1 row1 row
Q5 · Which products share components with product 17?3 rows3 rows

With and without a reasoner

QueryNo reasonerOWL 2 RL
Every product (example 05)4 rows5 rows
What manufacturer 9 makes, through the inverse (example 05)0 rows3 rows
Portuguese products, by the defined class alone0 rows3 rows
Large orders, as a FILTER — outside OWL 2 RL1 row1 row

The rest of the class: filters, aggregation, paths and the other three forms

QueryNo reasonerOWL 2 RL
Filters, optionals and negation2 rows2 rows
Products with no manufacturer (FILTER NOT EXISTS)0 rows0 rows
Products per manufacturer, and their average price2 rows2 rows
The components of product 17, at any depth (hasPart+)3 rows3 rows
Alternative and sequence in one path5 rows10 rows
ASK · Is there a discontinued product nothing replaces?falsefalse
CONSTRUCT · The public catalogue, in schema.org only20 triples24 triples
DESCRIBE · product:1715 triples40 triples

Ask your own

A free query box over the read-only endpoint, the prefixes already written →

Check what comes in

The SHACL shapes over the good data and over the bad data: the report, readable →

The endpoint

The same protocol as Fuseki and as example 06: GET or POST on /sparql with query=, answers in application/sparql-results+json (text/csv if the Accept header asks), CONSTRUCT and DESCRIBE in Turtle. Add regime=owl for the closure. Read only: an update gets a 403.

curl --get --data-urlencode 'query=SELECT (COUNT(*) AS ?n) WHERE { ?s ?p ?o }' 'http://demo.csoares.me/class09/sparql'