Changes in This Release for This Guide

This topic contains the following.

Changes in Oracle Database Release 21c

The following are the changes in Oracle Database Graph Developer's Guide for RDF Graph for Oracle Database Release 21c.

Required Migration of Pre-21c Semantic Data

After the database upgrade to Release 21, existing semantic networks must be migrated to reflect minor storage changes and to update the definitions of several triggers, views, and PL/SQL packages in the network owner’s schema. Note that this includes migration of long literals, but does not include migration to escaped network storage form.

For MDSYS-owned networks, you must run the following as SYSTEM or some other DBA user:

EXEC SEM_APIS.MIGRATE_DATA_TO_CURRENT;

For each schema-private semantic network, you must run the following as the network owner:

EXEC SEM_APIS.MIGRATE_DATA_TO_CURRENT(network_owner=>'<NETWORK_OWNER>', network_name=>'<NETWORK_NAME>');

Native Unicode Storage

RDF Knowledge Graph can now store special characters and Unicode characters natively, which means that such characters no longer need to be escaped into \u<HEX><HEX><HEX><HEX> form before being stored in the RDF_VALUE$ table. Using this unescaped storage form reduces storage cost and improves query performance.

The storage form for a network can be specified at network creation time in the options parameter of SEM_APIS.CREATE_SEM_NETWORK. Unescaped storage form is the default storage form for newly create semantic networks, and it is strongly recommended that you migrate existing semantic networks to unescaped storage form.

Existing semantic networks using escaped storage form can be migrated to unescaped storage form with the SEM_APIS.MIGRATE_DATA_TO_STORAGE_V2 procedure. Existing applications should not be affected by any changes in network storage form. Such changes only affect internal operations of RDF Knowledge Graph.

Long-Literal Storage Changes

A new hashing scheme is used for long literal values that are stored as CLOBs. The hashing scheme improves loading performance and removes the need for the VALUE$HASHCLOB index on RDF_LINK$.

Note that you must run the SEM_APIS.MIGRATE_DATA_TO_CURRENT procedure after upgrade to Release 20c to migrate long literal data to the new hashing scheme.

Support for Subject-Property-Matrix Tables

Subject-Property-Matrix (SPM) auxiliary tables can now be used to speed up SPARQL query execution. For a given model, you can create one or more Single-Valued Property (SVP) tables that, for each subject, holds the values for many predicates in the same row. Using SVP tables reduces the number of joins required to evaluate “star pattern” SPARQL queries.

In addition, you can create one or more Multi-Valued Property (MVP) tables that hold all the triples for a given property. MVP tables allow for better query optimizer statistics and improved query plans.

You can also create one or more Property Chain (PCN) tables that hold sequences of triples joined by previous object value equal to next subject value. PCN tables improve performance by eliminating joins required to evaluate sequences of triple patterns that form a path.

SVP, MVP and PCN tables are automatically updated when DML operations happen on the underlying model.

For more information, see Speeding up Query Execution with SPM Auxiliary Tables .

RDF Semantic Graph support added for Eclipse RDF4J

Using Oracle RDF Graph Adapter for Eclipse RDF4J, you can now utilize the powerful Eclipse RDF4J framework to work with RDF graph data. The adapter for Eclipse RDF4J provides integration with Eclipse RDF4J SAIL API, Eclipse RDF4J Server and Eclipse RDF4J Workbench.

The main features of the Oracle RDF Graph Adapter for Eclipse RDF4J include Java APIs to load RDF data (bulk and incremental) into the database, query RDF graphs, and update RDF data managed by the database.

See RDF Semantic Graph Support for Eclipse RDF4J for more information.

Changes in Oracle Database Release 19c

The following are changes in Oracle Spatial and Graph RDF Knowledge Graph Developer's Guide for Oracle Database Release 19c.

Support Added for Schema-Private Semantic Networks

Semantic networks can now be created in a regular user’s schema. Such networks are called schema-private semantic networks because the associated database objects are created in the network owner’s schema, and the network owner has exclusive privileges to those objects. (DBA users also have such privileges, and the network owner or a DBA can grant and revoke the privileges for other users.)

In previous releases, the only scenario was a single semantic network owned by the MDSYS user and asvailable to the entire database. That scenario is still supported, but you are encouraged to use schema-private semantic networks instead.

For more information, see Semantic Networks.

Feature Name Change: RDF Knowledge Graph

The feature name previously called RDF Semantic Graph is now called RDF Knowledge Graph.

The terms semantic network and semantic data are still widely used throughout this guide.

Support Added for Database Vault and Rolling Upgrades in 19.3

Effective with Oracle Database Release 19.3, RDF knowledge graphs are supported for:

  • Oracle Database Vault
  • Rolling upgrades

Reduced Default Privileges for MDSYS

Starting with Release 12.2, MDSYS no longer has the INHERIT ANY PRIVILEGES privilege, so MDSYS-owned invoker rights procedures can no longer be executed as SYS. Administrative procedures, such as creating a semantic network, must be executed by a non-SYS user with DBA role (such as SYSTEM). If you execute such procedures as SYS, you will get an ORA-01031: insufficient privileges error.

See RDF Privilege Considerations.

Reduced Tablespace Privileges for MDSYS

Effective with Release 19, the MDSYS user no longer has the UNLIMITED TABLESPACE privilege, and so MDSYS must be explicitly granted quota on the tablespace used for an MDSYS-owned semantic network.

See RDF Privilege Considerations.

RDF Semantic Graph support added for Eclipse RDF4J

Using Oracle RDF Graph Adapter for Eclipse RDF4J, you can now utilize the powerful Eclipse RDF4J framework to work with RDF graph data. The adapter for Eclipse RDF4J provides integration with Eclipse RDF4J SAIL API, Eclipse RDF4J Server and Eclipse RDF4J Workbench.

The main features of the Oracle RDF Graph Adapter for Eclipse RDF4J include Java APIs to load RDF data (bulk and incremental) into the database, query RDF graphs, and update RDF data managed by the database.

See RDF Semantic Graph Support for Eclipse RDF4J for more information.

Changes in Oracle Database Release 18.1

The following are changes in Oracle Spatial and Graph RDF Semantic Graph Developer's Guide for Oracle Database Release 18.1.

Support Added for Oracle Database In-Memory

RDF data can easily be loaded into memory to take advantage of the Oracle Database In-Memory feature. A semantic network can now be loaded into memory with the SEM_APIS.ENABLE_INMEMORY procedure. In addition, in-memory virtual columns can be used at the virtual model level to add lexical values for RDF terms to the in-memory representation of the MDSYS.RDF_LINK$ table, thus reducing the number of joins required to evaluate SPARQL queries.

For more information, see RDF Support for Oracle Database In-Memory.

Support Added for Semantic Networks with Composite Partitioning

Semantic networks can now be created with list-hash composite partitioning. With this scheme, a semantic network is initially list-partitioned by model id, and then each partition is subpartitioned using a hash of the RDF predicate ID. Composite partitioning improves SPARQL query performance through increased parallelization and better query optimizer statistics.

For more information, see Semantic Networks.

Enhanced CLOB Support for Bulk Load Operations

Staging tables that contain RDF quads with long literals (RDF object values greater than 4000 bytes in size) can now be efficiently loaded with SEM_APIS.BULK_LOAD_FROM_STAGING_TABLE.

New options have also been added to SEM_APIS.LOAD_INTO_STAGING_TABLE for better handling of long literals when loading from an external table. The VC_ONLY option loads only RDF quads with object values not larger than 4000 bytes into a staging table, and the CLOB_ONLY option loads only RDF quads with object values larger than 4000 bytes. These options allow a very efficient two-phase bulk load where VARCHAR-only data is loaded in one bulk load operation and CLOB-only data is loaded in a second bulk load operation.

Native Support for Turtle and Trig RDF Formats

Turtle and Trig RDF formats can now be directly loaded into Oracle Database without the need for third-party tools. SPARQL LOAD operations executed through SEM_APIS.UPDATE_MODEL can now parse and insert RDF data serialized in Turtle and Trig formats in addition to the N-Triple and N-Quad formats that were previously supported.

RDF Views can now be created directly from R2RML mappings specified in Turtle or N-Triple format. New R2RML_STRING and R2RML_STRING_FMT arguments have been added to SEM_APIS.CREATE_RDFVIEW_MODEL so that an R2RML mapping string can be used to create an RDF View model.

Support for RDF Added to SQL Developer

You can use Oracle SQL Developer to create RDF-related objects and use RDF and OWL features.

For more information, see RDF Support in Oracle SQL Developer.