DS Catalog:SPARQL Query Service/example queries: Difference between revisions

No edit summary
Line 9: Line 9:


=Prefix Declarations=
=Prefix Declarations=
TBD.
==Why are they used?==
Prefix declarations made at the beginning of a SPARQL query tell you which namespaces (ontologies, data models, or other specifications) will be used by the query to construct its triples. Rather than having to write out a long URI every time an entity is referenced, by declaring prefixes, you can shorthand the URIs used later in the query.
 
For instance, instead of having to type out
<br><br>
<https://catalog.digital-scriptorium.org/entity/Q88> <https://catalog.digital-scriptorium.org/prop/direct/P16> <https://catalog.digital-scriptorium.org/entity/Q13> .
<br><br>
after declaring prefixes, you can type out
<br><br>
wd:Q88 wdt:P16 wd:Q13 .
<br><br>
This makes SPARQL queries much more readable and editable by human beings.
 
==Which prefix declarations will I need to use the DS Wikibase?==
The following prefix declarations should be at the beginning of any SPARQL query made at [https://catalog.digital-scriptorium.org/query/ the DS Wikibase Query Service endpoint].


=Basic Example Queries=
=Basic Example Queries=
Bots, Bureaucrats, emailconfirmed, Administrators
30,537

edits