14.3.2 RDF Data Page
You can manage and query RDF objects in the RDF Data page.
The left panel contains information on the available RDF data in the data source. The right panel is used for opening properties of a RDF object. Depending on the property type, SPARQL queries and SPARQL updates can be executed.
- Data Source Selection
- RDF Network Actions
- Importing Data
- SPARQL Query Cache Manager
- RDF Objects Navigator
- Data Source Published Datasets Navigator
- Performing SPARQL Query and SPARQL Update Operations
- Publishing Oracle RDF Models
- Published Dataset Playground
- Support for Result Tables
- Advanced Graph View
- RDF Views from Relational Data
- Database Views from RDF Models
Parent topic: Getting Started with RDF Graph Query UI
14.3.2.1 Data Source Selection
The data source can be selected from the list of available data sources present in Figure 14-11.
Select the desired Oracle RDF semantic network for the selected data source. Each network is identified by a network owner and network name.
Parent topic: RDF Data Page
14.3.2.2 RDF Network Actions
You can execute the following semantic network actions:
- Create an RDF network.
- Delete an RDF network.
- Gather statistics for a network.
- Refresh network indexes.
- Purge values not in use.
Parent topic: RDF Data Page
14.3.2.3 Importing Data
For Oracle RDF networks, the process of importing data into an RDF model is generally done by bulk loading the RDF triples that are available in the staging table.
The available actions include:
-
Upload one or more RDF files into a couple of Oracle RDF Graph staging tables. The staging table with suffix
_CLOB
will contain records with object values having length greater than 4k. These staging tables can be reused in other bulk load operations. Files with extensions.nt
(N-triples),.nq
(N-quads),.ttl
(Turtle),.trig
(TriG), and.jsonld
(JsonLD) are supported for import. There is a limit of file size to be imported, which can be tuned by administrator.Also, zip files can be used to import multiple files at once. However, the zip file is validated first, and will be rejected if any of the following conditions occur:
- Zip file contains directories
- Zip entry name extension is not a known RDF format (.nt, .nq, .ttl, .trig, .jsonld)
- Zip entry size or compressed size is undefined
- Zip entry size does exceed maximum unzipped entry size
- Inflate ratio between compressed size and file size is lower than minimum inflate ratio
- Zip entries total size does exceed maximum unzipped total size
-
Bulk load the staging table records into an Oracle RDF model.
-
View the status of bulk load events.
Parent topic: RDF Data Page
14.3.2.4 SPARQL Query Cache Manager
SPARQL queries are cached data source, and they apply to Oracle data sources. The translations of the SPARQL queries into SQL expressions are cached for Oracle RDF network models. Each model can stores up to 64 different SPARQL queries translations. The Query Cache Manager dialog, allows you to browse data source network cache for queries executed in models.
You can clear cache at different levels. The following describes the cache cleared against each level:
- Data source: All network caches are cleared.
- Network: All model caches are cleared.
- Model: All cached queries for model are cleared.
- Model Cache Identifier: Selected cache identifier is cleared.
Parent topic: RDF Data Page
14.3.2.5 RDF Objects Navigator
The navigator tree shows the available RDF objects for the selected data source.
-
For Oracle data sources, it will contain the different concept types like models, virtual models, view models, RDF view models, rule bases, entailments, network indexes, and datatype indexes.
Figure 14-29 RDF Objects for Oracle Data Source
-
For endpoint RDF data sources, the RDF navigator will have a list of names representing the available RDF datasets in the RDF store.
Figure 14-30 RDF Objects from capabilities
-
If an external RDF data source does not have a capabilities URL, then just a default dataset is shown.
Figure 14-31 Default RDF Object
To execute SPARQL queries and SPARQL updates, open the selected RDF object in the RDF objects navigator. For Oracle RDF objects, SPARQL queries are available for models (regular models, virtual models, and view models).
Different actions can be performed on the navigator tree nodes. Right-clicking on a node under RDF objects will bring the context menu options (such as Open, Rename, Analyze, Manage auxiliary tables, Delete, Create Graph Views, Visualize, and Publish) for that specific node.
- Publish menu item will be enabled only if the selected RDF data source is public.
- Guest users cannot perform actions that require a write privilege.
Figure 14-32 RDF Navigator - Context Menu

Parent topic: RDF Data Page
14.3.2.6 Data Source Published Datasets Navigator
If the selected RDF data source is public, a navigator node with the public datasets is displayed on the menu tree as shown in the following figure:
Figure 14-33 Data Source Published Datasets Navigator

Parent topic: RDF Data Page
14.3.2.7 Performing SPARQL Query and SPARQL Update Operations
To execute SPARQL queries and updates, open the selected RDF object in the RDF objects navigator. For Oracle RDF objects, SPARQL queries are available for regular models, virtual models, and view models.
You can define the following parameters for SPARQL queries:
- SPARQL: The query string.
- RDF options: Oracle RDF options to be used when processing a query (See Additional Query Options for more information.).
- Runtime parameters: Fetch size, query timeout and others (this is applied to Oracle RDF data sources).
- Rulebases: Rulebase names associated with RDF model in an entailment. If none, then the selection box will be empty.
- Binding parameters: The expression
?ora__bind
is used as a binding parameter in a SPARQL string. Each binding parameter is defined by a type (uri or literal) and a value. For example:SELECT ?s ?p ?o WHERE { ?s ?p ?ora__bind } LIMIT 500
An example of JSON representation of a binding parameter that can be passed to a REST query service is:
{ "type" : "literal", "value" : "abcdef" }
The following figure shows the SPARQL query page, containing the graph view.
Figure 14-34 SPARQL Query Page

The number of results on the SPARQL query is determined by the limit parameter in SPARQL string, or by the maximum number of rows that can be fetched from server. As an administrator you can set the maximum number of rows to be fetched in the settings page.
A graph view can be displayed for the query results. On the graph view, you must map the columns for the triple values (subject, predicate, and object). In a table view, the columns that represent URI values have hyperlinks.
Besides the Execute button to run the SPARQL query, there is also the Explain Plan button to retrieve the SQL query plan for the SPARQL. This basically displays a dialog with the EXPLAIN PLAN results and the SPARQL translation.
Figure 14-35 SQL EXPLAIN PLAN for SPARQL Translation

Description of "Figure 14-35 SQL EXPLAIN PLAN for SPARQL Translation"
For Oracle data sources, if the SPARQL query selects an RDF object value
that represents a GeoSPARQL data type (such as WKT
,
GML
, KML
, or GeoJSON
), a map
visualization can be displayed by switching on Map view result.
In this case, the SPARQL query must select the geometry attribute which is an RDF
literal of a GeoSPARQL data type. On execution, this query will produce a GeoJSON result
which is then passed to the map component for visualization. For example:
Figure 14-36 Map Visualization for GeoSPARQL Data Types in a SPARQL Query

Description of "Figure 14-36 Map Visualization for GeoSPARQL Data Types in a SPARQL Query"
Parent topic: RDF Data Page
14.3.2.8 Publishing Oracle RDF Models
Note:
It is important to be aware that by enabling RDF data publishing and defining a public RDF data source, your public URL endpoints for RDF datasets are exposed. This endpoint URL can be used directly in applications without entering credentials.To publish an Oracle RDF model as a dataset:
- Right-click on the RDF model and select Publish from the menu
as shown:
Figure 14-37 Publish Menu
- Enter the Dataset name (mandatory), Description, and Default
SPARQL. This default SPARQL can be overwritten on the REST request.
Figure 14-38 Publish RDF Model
- Click OK.
The public endpoint GET URL for the dataset is displayed. Note that the POST request can also be used to access the endpoint.
Figure 14-39 GET URL Endpoint
This URL uses the default values defined for the dataset and follows the pattern shown:
http://${hostname}:${port_number}/orardf/api/v1/datasets/query/published/${dataset_name}
You can override the default parameters stored in the dataset by modifying the URL to include one or more of the following parameters:- query: SPARQL query
- format: Output format (
JSON
,XML
,CSV
,TSV
,GeoJSON
,N-Triples
,Turtle
) - options: String with Oracle RDF options
- rulebases: Rulebase names associated with dataset RDF model in an entailment
- params: JSON string with runtime parameters
(
timeout
,fetchSize
, and others) - bindings: JSON string with binding parameters (URI or literal values)
The following shows the general pattern of the REST request to query published datasets (assuming the context root as
orardf
):http://${hostname}:${port_number}/orardf/api/v1/datasets/query/published/${dataset_name}?datasource=${datasource_name}&query=${sparql}&format=${format}&options=${rdf_options}¶ms=${runtime_params}&bindings=${binding_params}
In order to modify the default parameters, you must open the RDF dataset definition by selecting Open from the menu options shown in the following figure or by double clicking the published dataset:Figure 14-40 Open an RDF Dataset Definition
The RDF dataset definition for the selected published dataset opens as shown:Figure 14-41 RDF Dataset Definition
You can update the default parameters and preview the results.
Note:
- RDF user with administrator privileges can update and unpublish any dataset.
- RDF user with read and write privileges can only manage the datasets that the user created.
- RDF user with read privileges can only query the dataset.
Parent topic: RDF Data Page
14.3.2.9 Published Dataset Playground
You can explore the published RDF datasets from a public web page.
You can access the page using the following URL format:
{protocol}://{host}:{port}/{app_name}/public.html
For example:
http://localhost:7101/orardf/public.html
The public web page is displayed as shown:
The main components of this public page are:
- Published Datasets: contains the names of the
published RDF datasets for public RDF data source. To open the RDF dataset double
click it or right click the tree dataset and execute the Open menu item as
shown:
Figure 14-43 Opening a Published Dataset on the Public Page
Description of "Figure 14-43 Opening a Published Dataset on the Public Page " - The tab panel on the right allows you to execute SPARQL queries against
the published RDF dataset. SPARQL query results are displayed in tabular as well as
graph view formats. However, if the Accessibility switch on
the top right corner of the page is switched
ON
, then the results are only displayed in tabular format.The following options are supported in the tab panel:
- Templates: SPARQL template queries to use.
- Add prefix: click to add the selected prefix in the combo box to a SPARQL query.
- SPARQL: enter the SPARQL to be executed in the text area.
- select/ask: select the output format for
SPARQL
SELECT
and SPARQLASK
queries. - construct/describe: select the output
format for SPARQL
CONSTRUCT
and SPARQLDESCRIBE
queries. - Execute: click this button to execute the SPARQL query against the RDF public endpoint.
- Table: shows the result in a tabular format.
- Raw: shows the raw SPARQL result on specified format returned from server.
- Download: click
to download the raw response.
Parent topic: RDF Data Page
14.3.2.10 Support for Result Tables
Result tables (also known as Subject-Property-Matrix (SPM) auxiliary tables) can be used to speed up SPARQL query execution. It is recommended you first refer to Speeding up Query Execution with Result Tables, for a detailed description of result tables. These auxiliary tables are associated with individual RDF graphs. Once they are created, they are automatically used during execution of SPARQL queries, unless specific options (see SPARQL Query Options for Result Tables) are passed in to indicate otherwise (note that the query cache may need to be cleared if the same SPARQL query is to be executed right after creating a result table).
There are three types of result tables based on the type of the query pattern used for producing the results to be stored:
- Star-Pattern tables (also known as Single-Valued Property or SVP tables) hold values
for single-valued RDF properties. A property
p
is single-valued in an RDF model if each resource in the model has at most one value forp
. - Triple-Pattern tables (also known as Multi-Valued Property (MVP) tables) hold values
for individual RDF properties.The property used for a triple-pattern table may be
single-valued or multi-valued. (A property p is multi-valued in an RDF graph if it
contains two triples
(s p o1)
and(s p o2)
witho1
not equal too2
.) - Chain-Pattern tables (also known as Property Chain (PCN) tables) hold paths in the
RDF graph. A sequence of triples form a path if for each consecutive pair of
triples,
Ti
andTj
, the object value ofTi
is equal to the subject value ofTj
.
Star-pattern and chain-pattern tables can be used to reduce joins during SPARQL query execution, while triple-pattern tables allow for more compact representation for triples involving individual properties. Additionally, if lexical values are included in the result tables, then joins needed for looking up lexical values can be avoided as well.
The RDF Server and Query UI web application provides support for creation and management of result tables. You can manage these auxiliary tables by right clicking the RDF graph and selecting the Manage Result Tables menu item as shown:
The Result Tables page displays a table which lists the result tables
present in the RDF graph. If you are a first time user, then this table list will be
empty. In such a case, you need to create the Predicate Info Table that is
required for creating and managing the result tables. The predicate info table stores
information about each property used as predicate in the RDF graph. For each property
(or its inverse), the stored information includes its id
(or negative
id
, for the inverse), name
, and statistics on
cardinality (that is, the number of triples that use this property) per distinct subject
(or, object, for the inverse). A value of one in the MAX_CNT
column
indicates that the property was single-valued when the statistics were last
computed.
To create the predicate info table, click See predicate info table in the table menu bar and then select Create info table. Note that you also have the option to recreate the table at a later time as shown in the following image:
Once the predicate info table is created, you can then create and manage the result tables.
Parent topic: RDF Data Page
14.3.2.10.1 Creating Result Tables
The preceding workflow steps are common when creating any type of result table. However, the following 26ai features are available only for certain types of tables:
- Inverse Property Path: This feature is only available for chain-pattern
or star-pattern tables. It can be enabled individually for each property,
directly from the Set/Reorder properties step. In the following example,
the property
http://purl.org/dc/elements/1.1/date
is shown Reversed. This implies that the subject and object of the triple switch places. See the W3C documentation for more information on inverse property path.Figure 14-51 Configuring Inverse property path
- Multi-Occurrence : This new feature in which the same property can be
replicated multiple times is only available for chain-pattern tables. To
duplicate a property, click the Duplicate property button under the
Actions column on the Set/Reorder step. Note that once the
table is created, for ease of differentiation, each replicated property is
appended an identifier consisting of a “#” followed by a cardinal number.
Parent topic: Support for Result Tables
14.3.2.10.2 Managing Result Tables
Description of the illustration manage_actions_result_table.png
You can then choose to perform any of the following actions:
Parent topic: Support for Result Tables
14.3.2.10.2.1 Creating an Index on a Result Table
Parent topic: Managing Result Tables
14.3.2.11 Advanced Graph View
The RDF Graph Query UI supports an advanced graph view feature that allows users to interact directly with the graph visualization. This is unlike the graph displayed on the RDF model editor or public component where the graph view is just an output of the SPARQL results on the paging table.
This section describes the advanced graph view component, starting from the
execution of a SPARQL CONSTRUCT
or SPARQL DESCRIBE
query to advanced interaction with the graph visualization.
The main user interface (UI) elements of the advanced graph view component are as shown:
Figure 14-62 Advanced Graph View Components

Description of "Figure 14-62 Advanced Graph View Components"
The following describes the UI components seen in the preceding figure:
- SPARQL Query selector contains a text area with
the SPARQL query (must be SPARQL
CONSTRUCT
or SPARQLDESCRIBE
). - A Graphviz area that displays the graph with the RDF vertices and edges.
To access the advanced graph view feature, right-click on the RDF model and select Visualize as shown:
Parent topic: RDF Data Page
14.3.2.11.1 Query Selector Panel
To start using the advanced graph view feature, you must first execute a
SPARQL CONSTRUCT
or SPARQL DESCRIBE
query. The
resulting query output is displayed as an interactive graph in the Graphviz
component.
The system may automatically run additional queries to build the graph before it is displayed. A SPARQL query is executed for each resource in the initial query result set to retrieve values for its datatype properties. These additional queries ensure that each vertex in the graph is fully populated with its attributes. The maximum number of resources that can be expanded in a result set is 2,000. The application will raise an error if this limit is exceeded. In which case, you can reduce the result set size by using a more selective SPARQL query or using a LIMIT clause.
The following figure shows an example SPARQL CONSTRUCT
query that
describes the person named George in a PEOPLE
dataset. The Query
Selector Panel can be collapsed to provide more space for interacting with the
graph.
Parent topic: Advanced Graph View
14.3.2.11.2 Graphviz
The graph is displayed in the Graphviz panel and the visualization is based on the Graph Visualization Library. See Graph Visualization Library Reference in Property Graph Visualization Developer's Guide and Reference for more information.
The displayed graph is constructed from an RDF graph as follows.
- URI and blank node resources are shown as vertices and hold their
rdf:type
class membership information in a labels array, which is used for the graph legend. Each vertex has ashortName
property that shows the local name portion of its URI or its blank node label. ThisshortName
property is used to label the vertex in the display graph. Data type properties for these URIs and blank nodes are shown as vertex properties. - Object properties are shown as edges connecting two vertices. These edges use the local name portion of the RDF predicate URI as the edge label for both the graph legend and the edge display label. Edges hold properties for full predicate URI, source (subject) RDF term and destination (object) RDF term.
The Graphviz panel consists of the following components:
- A toolbar with the following options (described in order from left to right):
- Move/Zoom: This mode allows you to zoom in and out, as well as to move to another part of the visualization.
- Fit to Screen: This mode fits the resulting graph in the graph visualization view.
- Toggles Sticky Mode: This mode allows you to cancel the action of moving the nodes around.
- Graph Manipulation: This mode allows you
to interact with your graph visualization.
The following actions are supported:
- Expand: To expand selected vertices from the visualization.
- Drop: To remove selected vertices from the visualization. Alternatively, you can also execute this from the tooltip.
- Group: To group selected multiple vertices and collapse them into a single one.
- Ungroup: To select a group of collapsed vertices and ungroup them.
- Undo: To undo the last action.
- Redo: To redo the last action.
- Reset: To reset the visualization to the original state after the query.
- A drawing area with the RDF nodes and edges.
- A graph legend on the right side of the panel that displays vertex and edge types and their associated styles in the graph.
- A slider along the bottom of the display area that allows you to control the display
size of the current graph.
Figure 14-67 Managing the Graph Display Size
- A layout selector at the bottom of the display panel that provides various layout options for positioning vertices and edges on the display.
You can interact with the edges and vertices of the graph displayed in the graph view area.
worksFor
edge:
To expand a vertex in the graph, right-click on the vertex and then click the expand icon. New vertices and edges directly connected to the expanded vertex will be added to the graph. For example, in the following figure, vertex Julie is shown expanded:
Parent topic: Advanced Graph View
14.3.2.12 RDF Views from Relational Data
Starting from Graph Server and Client Release 25.3, you can easily create an RDF view graph using the RDF View Wizard in RDF Graph Server and Query UI. You can then run SPARQL queries on the RDF view graph and visualize the query output.
The wizard provides a structured step-by-step approach guiding you to create an R2RML mapping for viewing the contents of the relational tables as RDF triples. However, note that the mapping currently supports the generation of RDF triples only, not RDF quads. Also, the predicates in the mapping must be constants and cannot be based on the content of a row. Additionally, viewing resources as blank nodes is not supported in mappings that are created using the wizard.
Note:
Oracle Graph also provides subprograms to create, export, and drop RDF Views. See API Support for RDF Views for more information. An RDF view graph can be queried using SPARQL queries.The RDF View Wizard is based on the following concepts:
- Resource Maps: These represent the mapping for obtaining the resources (nodes) in the graph structure. Each resource map contains the mapping for viewing the content of each row in a given entity table as a set of RDF triples. These triples use as subject the same resource, representing the entity corresponding to the row, along with all its properties.
- Triple Maps: These represent the mapping for obtaining the relationships (edges) between two resources (nodes) in the graph structure. Each triple map contains the mapping for viewing each binary relationship, captured in a row of the relationship table, as an RDF triple whose predicate reflects the type of relationship and whose subject and object are resources obtained using the referenced (source and target) resource maps.
The following section explains the steps to create, query, and visualize an RDF view graph using the wizard:
Parent topic: RDF Data Page
14.3.2.12.1 Getting Started with the RDF View Wizard
Parent topic: RDF Views from Relational Data
14.3.2.13 Database Views from RDF Models
You can create relational views from RDF models. These views can represent a vertex or an edge view of a graph.
SPARQL query patterns can be used as a declarative language for specifying how to build vertex and edge views from RDF data.
It is important to note the following when creating the vertex and edge views from an RDF model:
- The RDF model must have classes defined and the application uses a
SPARQL query to retrieve the distinct classes defined on an RDF model. For
example:
SELECT DISTINCT ?o WHERE { ?s a ?o } order by ?o
- One or more RDF classes can define a vertex view. A vertex view
consists of:
- Database vertex view name
- Key attribute name
- Vertex properties from RDF class
- One or two vertex views can define an edge view. An edge view consists
of:
- Database edge view name
- Source and destination vertex keys
- Label property from RDF classes
The following sections explain the steps to create a database graph view:
14.3.2.13.1 Creating a Graph View
Parent topic: Database Views from RDF Models
14.3.2.13.2 Creating a Vertex View
Parent topic: Database Views from RDF Models
14.3.2.13.3 Creating an Edge View
To create an edge view:
Parent topic: Database Views from RDF Models