Optional Query Clauses
As part of SPARQL statements that define a query, these statements may typically also include one or more of the following clauses:
- PREFIX Clause: The optional PREFIX clause declares the abbreviations that you want to use to reference URIs. Using prefixes allows you to shorten the length of query statements when your data includes long URI names.
Tip: Rather than declaring prefixes in all queries and load files, you can define common prefixes in a standard prefix file. AnzoGraph then automatically recognizes these prefixes in all load files and queries. See Defining Standard Prefixes for more information.
- FROM Clause: The optional FROM clause defines the data sets or graphs to query. By default, if you do not specify the FROM clause, the scope of a query is limited to the default graph.
- WHERE Clause: The WHERE clause specifies the query pattern for data to match in the graphs or data sets specified in a query.