8.9 Blank Nodes Support in Oracle RDF Graph Adapter for Eclipse RDF4J

In a SPARQL query, a blank node that is not wrapped inside < and > is treated as a variable when the query is executed through the support for the adapter for Eclipse RDF4J. This matches the SPARQL standard semantics.

However, a blank node that is wrapped inside < and > is treated as a constant when the query is executed, and the support for Eclipse RDF4J adds a proper prefix to the blank node label as required by the underlying data modeling. Do not use blank nodes for the CONTEXT column in the application table, because blank nodes in named graphs from two different RDF graphs will be treated as the same resource if they have the same label. This is not the case for blank nodes in triples, where they are stored separately if coming from different RDF graphs.

The blank node when stored in Oracle database is embedded with a prefix based on the RDF graph ID and graph name. Therefore, a conversion is needed between blank nodes used in RDF4J API’s and Oracle Database. This can be done using the following methods:

  • OracleUtils.addOracleBNodePrefix
  • OracleUtils.removeOracleBNodePrefix