SPARQL query support
There are various syntactic or semantic restrictions and limitations for SPARQL to consider when you work with RDF data.
- Limits on lengths of URIs
- An RDF implementation of Db2® database can store URIs of any length. However, only the first 2000 characters are used for comparison operations.
- Limits on lengths of literals
- An RDF implementation of a Db2 database stores literals of any length. However, only the first 2000 characters are used for comparison operations, and other operations such as STRSTARTS and STRENDS.
- DATATYPE operator in a FILTER expression
- Support is extended for the SPARQL
DATATYPEoperator in a FILTER expression. - Constants in a FILTER expression
- Support is extended for constants in a FILTER expression.
- Unary minus in a FILTER expression
- A filter expression with a unary minus on variables is not supported.
The expression returns an RdfStoreException, with error identifier DB255001E and SQL error code -104.FILTER ( -?v = -10 ) - DISTINCT * or REDUCED * operators in a SELECT expression
- Support is extended for
DISTINCT *orREDUCED *operators in a SELECT expression. - Data type operator in a SELECT expression
- support is extended for the SPARQL data type operator in a SELECT expression.
- Dot escape sequence in regular expression
- The dot escape sequence in regular expression pattern matches
has limitations, where the expression does not properly match the
dot character.
The preceding code sample does not match the string "example.com" as expected.FILTER regex(?val, "example\\.com") - Double backslash escape sequence limitation
- Escape sequences with double backslash in strings do not get interpreted correctly. A workaround is not available.
- Cygwin and createrdfstoreandloader command (Windows)
- When you issue the createrdfstoreandloader command by using Cygwin on Windows platforms, Cygwin hangs instead of displaying any errors or warning messages. Therefore, issue the createrdfstoreandloader command only on Linux® or UNIX platforms. Then use the generated Db2 load files and SQL files to load to a Db2 server on the Windows platform.