The graph console
Oxigraph, a SPARQL 1.1 store compiled to WebAssembly, running in this tab over
4,001 triples: the Portugal graph re-serialised at build, with the ontology inside the store, every
inverse declared with owl:inverseOf, and labels in English and Portuguese. Pick a worked query
or write your own; the same question in Cypher is shown beside each, and not run.
Worked queries
The IRI scheme, stated once
The triples are triples.nt, written by the Portugal graph build
from graph.json and ontology.json
— a re-serialisation, not a second source. Nodes are portugal/id/<graph id>, verbs
portugal/verb/<verb>, types portugal/type/<Type>, scalar attributes
portugal/prop/<key>. Each fact is stored once in its forward direction; the inverse verb is
declared with owl:inverseOf so a query walks it with ^. Node and verb labels carry
@en, and @pt where the ontology has one, which is what lets the third worked query
read a path aloud in Portuguese from the store alone.
Where a graph language earns its place
Three of the worked queries cannot be asked comfortably in SQL: the property path that walks any verb in
either direction, the CONSTRUCT that derives 298 inverse edges without storing them, and the
ASK that checks the grammar's ban on symmetric edges. The rest are the same questions the
SQL console answers, so the two can be read side by side. Cypher is the other
common graph language and is shown for every query; running it here would mean vendoring a 73 MB
engine, and the argument page says why that was declined.
For an agent
After tool:ready (detail.name = 'nsdb-sparql'): window.__tools.sparql.run(query) → for SELECT {kind:'select', columns, rows, ms} with each cell {type, value, lang?}; for ASK {kind:'ask', answer, ms}; for CONSTRUCT {kind:'construct', triples:[{s,p,o}], ms}. .prefixes is the prefix block the page prepends when a query has none; .examples() returns the worked queries with Cypher equivalents and build-time counts; .timings() the load measurements; .size() the triple count in the store. The page reads #q= and ?example=. Read-only; SPARQL UPDATE is not exposed.