10.6.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 both a one-click as well as a structured step-by-step guided approach allowing you to create an R2RML mapping for viewing the contents of the relational tables as RDF triples. Note that 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. A resource map contains the mapping for viewing the content of each row in an 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.
- Link Maps: These represent the mapping for obtaining the relationships (edges) between two resources in the graph structure. A link 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.
- Template Maps: These are named, reusable templates for generating IRIs (International Resource Identifiers) or CURIEs (compact URIs), allowing you to apply a consistent identifier pattern across mappings without retyping it.
The following section explains the steps to create, query, and visualize an RDF view graph using the wizard:
- Getting Started with the RDF View Wizard
- Creating Resource Maps Manually
- Creating Link Maps Manually
- About Template Maps
- Defining a Template Map
Parent topic: RDF Data Page
10.6.12.1 Getting Started with the RDF View Wizard
As seen in the preceding diagram, the schema RDFU
comprises three tables: EMP, JOB_HIST, and
DEPT. The single-column primary keys for the three tables are
EMPNO, JOBNO, and DEPTNO,
respectively. The JOB_HIST table contains ENO and
DNO as the foreign keys for referencing the
EMP and DEPT tables respectively.
Parent topic: RDF Views from Relational Data
10.6.12.2 Creating Resource Maps Manually
Parent topic: RDF Views from Relational Data
10.6.12.3 Creating Link Maps Manually
Parent topic: RDF Views from Relational Data
10.6.12.4 About Template Maps
Template Maps are named, reusable template expressions. They allow you to define a pattern once and reuse it consistently across your mappings. You can find them under Namespaces & Templates.
The difference between Template Maps and a plain template string is:
- A plain template string is a one-off expression that you enter directly in a field.
- A Template Map is a saved, named template that you can select and reuse anywhere templates are supported.
Use Template Maps to:
- Define a template pattern once and then reuse the same pattern across subjects, predicates, graphs, and objects.
- Enforce a single pattern for formatting for table keys and IRI construction.
- Create mappings faster by selecting a saved template instead of retyping the same expression.
In any field that supports templates (for example: Subject IRI, Class, Graph, Predicate, or Object), switch to Template mode and select a Template Map from the drop-down.
To help you get started, the RDF View Wizard includes a small set of built-in template maps. These are applied by default to the most common template-enabled fields (such as Subject IRI, Class, and Predicate) so you can get started with consistent, working patterns. You can customize them later or replace them with your own template maps.
The following shows the list of default template maps provided by the RDF View wizard:
SUBJ_TMPL: Default subject IRI patternCLASS_FROM_TABLE_TMPL: Default class IRI pattern derived from the table nameRMAP_PRED_TMPL: Default predicate pattern for column-based propertiesREF_PRED_TMPL: Default predicate pattern for referenced object properties
You can choose to edit a default template if required, or create a new one. See Defining a Template Map to define a new template map.
Parent topic: RDF Views from Relational Data
10.6.12.5 Defining a Template Map
Parent topic: RDF Views from Relational Data





















