48

Introduction to RDF Graph for Oracle Database 19c · 2019-12-19 · RDF Graph for Oracle Database 19c Features •Fast bulk-load and indexing •RDF view of Relational data •Manages

  • Upload
    others

  • View
    114

  • Download
    1

Embed Size (px)

Citation preview

Page 1: Introduction to RDF Graph for Oracle Database 19c · 2019-12-19 · RDF Graph for Oracle Database 19c Features •Fast bulk-load and indexing •RDF view of Relational data •Manages
Page 2: Introduction to RDF Graph for Oracle Database 19c · 2019-12-19 · RDF Graph for Oracle Database 19c Features •Fast bulk-load and indexing •RDF view of Relational data •Manages

Matthew PerryCMTSOracle Graph TechnologiesOctober 2019

Introduction to RDF Graph for Oracle Database 19c

Architecture and Overview

Page 3: Introduction to RDF Graph for Oracle Database 19c · 2019-12-19 · RDF Graph for Oracle Database 19c Features •Fast bulk-load and indexing •RDF view of Relational data •Manages

Safe harbor statement

The following is intended to outline our general product direction. It is intended for information purposes only, and may not be incorporated into any contract. It is not a commitment to deliver any material, code, or functionality, and should not be relied upon in making purchasing decisions.

The development, release, timing, and pricing of any features or functionality described for Oracle’s products may change and remains at the sole discretion of Oracle Corporation.

3 Copyright © 2019, Oracle and/or its affiliates. All rights reserved.

Page 4: Introduction to RDF Graph for Oracle Database 19c · 2019-12-19 · RDF Graph for Oracle Database 19c Features •Fast bulk-load and indexing •RDF view of Relational data •Manages

Introduction to RDF Graph

Agenda

1

2

3

4

5

Core Database FeaturesMid-tier Components and Tools

Performing Analytics with RDF Graph DataNew Features in Recent Releases

4 Copyright © 2019, Oracle and/or its affiliates. All rights reserved.

Page 5: Introduction to RDF Graph for Oracle Database 19c · 2019-12-19 · RDF Graph for Oracle Database 19c Features •Fast bulk-load and indexing •RDF view of Relational data •Manages

Introduction to RDF Graph

Agenda

1

5 Copyright © 2019, Oracle and/or its affiliates. All rights reserved.

Page 6: Introduction to RDF Graph for Oracle Database 19c · 2019-12-19 · RDF Graph for Oracle Database 19c Features •Fast bulk-load and indexing •RDF view of Relational data •Manages

A Little About our Team

First release of RDF Knowledge Graph was Oracle 10g R2 (2005) Active in standards development – team members have been …

Member of W3C SPARQL 1.1 WG Member of W3C RDF 1.1 WG Co-editor of W3C OWL 2 Web Ontology Language Profiles spec. Co-editor of W3C R2RML: RDB to RDF Mapping Language spec. Co-editor of OGC GeoSPARQL spec.

Several research papers in this area VLDB, ICDE, EDBT, ISWC, etc.

Copyright © 2019, Oracle and/or its affiliates. All rights reserved.6

Page 7: Introduction to RDF Graph for Oracle Database 19c · 2019-12-19 · RDF Graph for Oracle Database 19c Features •Fast bulk-load and indexing •RDF view of Relational data •Manages

Oracle Supports Two Graph Data ModelsRDF Knowledge

Graph• Data Federation• Knowledge

Representation• Metadata Management

Graph Analytics

Financial Retail, Marketing Social Media Smart Manufacturing

Linked DataKnowledge

Graph

Property Graph• Path Analytics• Social Network Analysis• Entity Analytics

Life Sciences Health Care Publishing Finance

Use Case Graph Model Industry Domain

Copyright © 2019, Oracle and/or its affiliates. All rights reserved.7

Page 8: Introduction to RDF Graph for Oracle Database 19c · 2019-12-19 · RDF Graph for Oracle Database 19c Features •Fast bulk-load and indexing •RDF view of Relational data •Manages

Database Version for RDF Knowledge Graph

On-premise Oracle Database Enterprise and

Standard Edition Oracle Database Cloud

Services DBCS (Bare Metal & VM) Exadata Cloud Service Exadata Cloud at Customer ATP-Dedicated (planned)

https://blogs.oracle.com/oraclespatial has a 3-part series on getting started with RDF on DBCS

“Using RDF Knowledge Graphs in the Oracle Public Cloud”

Copyright © 2019, Oracle and/or its affiliates. All rights reserved.8

Page 9: Introduction to RDF Graph for Oracle Database 19c · 2019-12-19 · RDF Graph for Oracle Database 19c Features •Fast bulk-load and indexing •RDF view of Relational data •Manages

RDF Graph for Oracle Database 19c Features

• Fast bulk-load and indexing• RDF view of Relational data• Manages over a trillion quads

• OBIEE• Oracle Advanced Analytics• PGX

• SPARQL-Jena/Fuseki• SPARQL-in-SQL query & update• Federated query• GeoSPARQL

• RDFS, OWL2 RL, EL, SKOS• Ladder-based inference• Incremental, parallel reasoning• User-defined rules• Plug-in architecture

Load / Storage

Query

Reasoning

Analytics

RDF Knowledge GraphLeverages Oracle capabilities:• RAC & Exadata scalability• Compression & partitioning• In-Memory Column Store• SQL*Loader direct path load• Parallel DDL, DML, and query• RMAN Backup and Recovery• High Availability• Oracle Label security• Enterprise Manager• Logical Standby

Copyright © 2019, Oracle and/or its affiliates. All rights reserved.9

Page 10: Introduction to RDF Graph for Oracle Database 19c · 2019-12-19 · RDF Graph for Oracle Database 19c Features •Fast bulk-load and indexing •RDF view of Relational data •Manages

RDF Graph for Oracle Database 19c Architecture

Generic Relational Schema for Storing RDF Data RDF Views of Relational Data

SPARQL-to-SQL Query Translator

Forward-chaining OWL ReasonerRDF Bulk Loader SPARQL Update

Processor

SQL and PL/SQL API

Support for Apache Jena (Java API)

Protégé Plugin Cytoscape PluginFuseki Endpoint SQL Developer RDF Support

Enterprise Manager and Other DB Tools

Copyright © 2019, Oracle and/or its affiliates. All rights reserved.10

Page 11: Introduction to RDF Graph for Oracle Database 19c · 2019-12-19 · RDF Graph for Oracle Database 19c Features •Fast bulk-load and indexing •RDF view of Relational data •Manages

Agenda

2 Core Database Features

11 Copyright © 2019, Oracle and/or its affiliates. All rights reserved.

Page 12: Introduction to RDF Graph for Oracle Database 19c · 2019-12-19 · RDF Graph for Oracle Database 19c Features •Fast bulk-load and indexing •RDF view of Relational data •Manages

RDF Bulk Loader

Staging Table

Client DB Server

RDF Relational Schema

Parallel RDF Bulk Load

• Value Checking• Canonicalization• Duplicate Elimination• Internal ID Generation• Index Creation

Step 2

N-Triple N-Quad

N-Triple

N-Quad

Turtle

RDF/XML

Trig

JSON-LD

Others

External Table

Oracle Protégé Plugin

Jena Adapter Java API

Step 1

OracleSQL*Loader

Copyright © 2019, Oracle and/or its affiliates. All rights reserved.12

orardfldr

Page 13: Introduction to RDF Graph for Oracle Database 19c · 2019-12-19 · RDF Graph for Oracle Database 19c Features •Fast bulk-load and indexing •RDF view of Relational data •Manages

Core Inference Features in Oracle Database Oracle provides native inference in the database for

RDFS, RDFS++ OWLPRIME, OWL2RL, OWL2EL, SKOSCORE User-defined rules User-defined inferencing

Inference done using forward chaining Triples inferred and stored ahead of query time Removes on-the-fly reasoning and results in fast query times

Proof generation Shows one deduction path

Copyright © 2019, Oracle and/or its affiliates. All rights reserved.13

Page 14: Introduction to RDF Graph for Oracle Database 19c · 2019-12-19 · RDF Graph for Oracle Database 19c Features •Fast bulk-load and indexing •RDF view of Relational data •Manages

Native Inference Engine in Oracle: APIs

SEM_APIS.CREATE_ENTAILMENT(entailment_namesem_models(‘GraphTBox’, ‘GraphABox’, …), sem_rulebases(‘OWL2RL’),passes,inf_components,Options,…)

Use “PROOF=T” to generate inference proof

SEM_APIS.VALIDATE_ENTAILMENT(sem_models((‘GraphTBox’, ‘GraphABox’, …), sem_rulebases(‘OWL2RL’),Criteria,Max_conflicts,Options)

Java API: performInference, deleteInference, setInferenceOption, analyze methods in• GraphOracleSem, DatasetGraphOracleSem (Jena Adapter)

Typical Usage:• First load RDF/OWL data• Call create_entailment to generate

inferred graph• Query both original graph and

inferred data• Inferred graph contains only new

triples! Saves time & resources

Typical Usage:• First load RDF/OWL data• Call create_entailment to generate

inferred graph• Call validate_entailment to find

inconsistencies

Copyright © 2019, Oracle and/or its affiliates. All rights reserved.14

Page 15: Introduction to RDF Graph for Oracle Database 19c · 2019-12-19 · RDF Graph for Oracle Database 19c Features •Fast bulk-load and indexing •RDF view of Relational data •Manages

Enabling Advanced Inference Capabilities Parallel inference option

EXECUTE sem_apis.create_entailment('M_IDX',sem_models('M'),

sem_rulebases('OWL2RL'), null, null, 'DOP=x');

Where ‘x’ is the degree of parallelism (DOP)

Incremental inference option EXECUTE sem_apis.create_entailment ('M_IDX',sem_models('M'),

sem_rulebases('OWL2RL'),null,null, 'INC=T');

Enabling owl:sameAs option to limit duplicates EXECUTE sem_apis.create _entailment('M_IDX',sem_models('M'),

sem_rulebases('OWL2RL'),null,null,'OPT_SAMEAS=T');

Control of individual inference rules used EXECUTE sem_apis.create _entailment('M_IDX',sem_models('M'),

sem_rulebases('OWL2RL'),null,'SAM-,SCOH-',null,null);

For example, disable sameAs generation for individuals and disable subClassOfhierarchy

Copyright © 2019, Oracle and/or its affiliates. All rights reserved.15

Page 16: Introduction to RDF Graph for Oracle Database 19c · 2019-12-19 · RDF Graph for Oracle Database 19c Features •Fast bulk-load and indexing •RDF view of Relational data •Manages

SPARQL Query and Update

Copyright © 2019, Oracle and/or its affiliates. All rights reserved.16

Page 17: Introduction to RDF Graph for Oracle Database 19c · 2019-12-19 · RDF Graph for Oracle Database 19c Features •Fast bulk-load and indexing •RDF view of Relational data •Manages

What is SPARQL?

SPARQL Protocol and RDF Query Language W3C standard for querying and manipulating RDF content Queries/updates and corresponding results are communicated via HTTP

with a SPARQL endpoint

A SPARQL endpoint implements the SPARQL protocol and serves RDF data from a RDF triplestore or RDF view

Copyright © 2019, Oracle and/or its affiliates. All rights reserved.17

Page 18: Introduction to RDF Graph for Oracle Database 19c · 2019-12-19 · RDF Graph for Oracle Database 19c Features •Fast bulk-load and indexing •RDF view of Relational data •Manages

SPARQL Graph Pattern Basic unit of SPARQL queries

univ:Student

univ:student123univ:student456

"John Green"

"1999-06-15"^^xsd:date

"male"

"Susan Blue"

"2000-02-10"^^xsd:date

"female"

rdf:type

rdf:type

foaf:name

vcard:BDAY

foaf:gender

foaf:name

vcard:BDAY

foaf:gender

univ:Student

univ:student123

"John Green"

"1999-06-15"^^xsd:date

"male"

rdf:type

foaf:name

vcard:BDAY

foaf:gender

?t

?p

?n

?b

?g

Result 1: {?t=univ:Student, ?p=univ:student123, ?n="John Green", ?g="male", ?b="1999-06-15"^^xsd:date}

Result 2: {?t=univ:Student, ?p=univ:student456, ?n="Susan Blue", ?g="female", ?b="2000-02-10"^^xsd:date}

Copyright © 2019, Oracle and/or its affiliates. All rights reserved.18

Page 19: Introduction to RDF Graph for Oracle Database 19c · 2019-12-19 · RDF Graph for Oracle Database 19c Features •Fast bulk-load and indexing •RDF view of Relational data •Manages

?t

?p

?n

?b

?g

SPARQL Graph Pattern Basic unit of SPARQL queries

rdf:type

foaf:name

vcard:BDAY

foaf:gender

PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>

PREFIX foaf: <http://xmlns.com/foaf/0.1/>

PREFIX vcard: <http://www.w3.org/2001/vcard-rdf/3.0#>

SELECT ?t ?n ?b ?g

WHERE

{ ?p rdf:type ?t .

?p foaf:name ?n .

?p vcard:BDAY ?b .

?p foaf:gender ?g }

How do we express this with SPARQL?

Basic GraphPattern (BGP)

Copyright © 2019, Oracle and/or its affiliates. All rights reserved.19

Page 20: Introduction to RDF Graph for Oracle Database 19c · 2019-12-19 · RDF Graph for Oracle Database 19c Features •Fast bulk-load and indexing •RDF view of Relational data •Manages

SPARQL and SPARQL in SQL Architecture

Support for Apache Jena

Standard SPARQL EndpointEnhanced with query management control

SEM_MATCHSEM_APIS.UPDATE_MODELSEM_APIS.SPARQL_TO_SQ

LSQL

Java

HTTP

SPARQL-to-SQL Core Logic

Apache Jena

Copyright © 2019, Oracle and/or its affiliates. All rights reserved.20

Page 21: Introduction to RDF Graph for Oracle Database 19c · 2019-12-19 · RDF Graph for Oracle Database 19c Features •Fast bulk-load and indexing •RDF view of Relational data •Manages

SEM_MATCH: Adding SPARQL to SQL

Extends SQL with full SPARQL 1.1 query constructs Benefits:

Integrates graph data with existing enterprise data JOINs with other relational (and object-relational) data Allows SQL constructs/functions DDL Statements: create tables/views Allows use of enterprise SQL development tools

Copyright © 2019, Oracle and/or its affiliates. All rights reserved.21

Page 22: Introduction to RDF Graph for Oracle Database 19c · 2019-12-19 · RDF Graph for Oracle Database 19c Features •Fast bulk-load and indexing •RDF view of Relational data •Manages

SEM_MATCH: Adding SPARQL to SQLSELECT n1, n2

FROM

TABLE(

SEM_MATCH(

'PREFIX foaf: <http://...>

SELECT ?n1 ?n2

FROM <http://g1>

WHERE {?p foaf:name ?n1

OPTIONAL {?p foaf:knows ?f .

?f foaf:name ?n2 }

FILTER (REGEX(?n1, "^A")) }

ORDER BY ?n1 ?n2',

SEM_MODELS('M1'),…));

Copyright © 2019, Oracle and/or its affiliates. All rights reserved.22

Page 23: Introduction to RDF Graph for Oracle Database 19c · 2019-12-19 · RDF Graph for Oracle Database 19c Features •Fast bulk-load and indexing •RDF view of Relational data •Manages

SEM_MATCH: Adding SPARQL to SQLSELECT n1, n2

FROM

TABLE(

SEM_MATCH(

'PREFIX foaf: <http://...>

SELECT ?n1 ?n2

FROM <http://g1>

WHERE {?p foaf:name ?n1

OPTIONAL {?p foaf:knows ?f .

?f foaf:name ?n2 }

FILTER (REGEX(?n1, "^A")) }

ORDER BY ?n1 ?n2',

SEM_MODELS('M1'),…));

SQL Table Function

n1 n2

Alex Jerry

Alex Tom

Alice Bill

Alice Jill

Alice John

Copyright © 2019, Oracle and/or its affiliates. All rights reserved.23

Page 24: Introduction to RDF Graph for Oracle Database 19c · 2019-12-19 · RDF Graph for Oracle Database 19c Features •Fast bulk-load and indexing •RDF view of Relational data •Manages

SPARQL 1.1 Update

SPARQL 1.1 Update is intended to be a standard language for specifying and executing updates to RDF graphs in a Graph Store.

Graph Update operations

INSERT DATA Adds some triples, given inline in therequest, into a graph.

DELETE DATA Removes some triples, given inlinein the request, if the respective graph containsthose.

DELETE/INSERT Perform pattern-based actions forgraph updates

LOAD Reads the contents of a documentrepresenting a graph into a graph in the GraphStore.

CLEAR Removes all the triples in (one or more)graphs.

Graph Management operations

CREATE Creates a new graph in stores that supportempty graphs.

DROP Removes a graph and all of its contents.

COPY Modifies a graph to contain a copy of another.

MOVE Moves all of the data from one graph intoanother.

ADD Reproduces all data from one graph intoanother.

Copyright © 2019, Oracle and/or its affiliates. All rights reserved.24

Page 25: Introduction to RDF Graph for Oracle Database 19c · 2019-12-19 · RDF Graph for Oracle Database 19c Features •Fast bulk-load and indexing •RDF view of Relational data •Manages

Top-level Procedure: SEM_APIS.UPDATE_MODEL

begin

sem_apis.update_model(

apply_model=>'M1',

update_stmt=>'INSERT {?s :mbox ?n}

WHERE {?s :email ?n}'

);

end;

/

Copyright © 2019, Oracle and/or its affiliates. All rights reserved.25

Page 26: Introduction to RDF Graph for Oracle Database 19c · 2019-12-19 · RDF Graph for Oracle Database 19c Features •Fast bulk-load and indexing •RDF view of Relational data •Manages

W3C RDB2RDF – RDF Views

Use virtual RDF data Benefits

Existing relational data stays in place and corresponding applications do not need to change

Use of virtual mapping eliminates synchronization issues

Common vocabulary helps with data integration issues

Database Server

HR Database Sales DatabaseInventory Database

HR Schema Inventory Schema Sales Schema

Mid-Tier ServerApplication 1

Application 2 Application 3

SQL RDB2RDFInventory Graph Sales Graph

Shared Ontologies

SPARQL

Copyright © 2019, Oracle and/or its affiliates. All rights reserved.26

Page 27: Introduction to RDF Graph for Oracle Database 19c · 2019-12-19 · RDF Graph for Oracle Database 19c Features •Fast bulk-load and indexing •RDF view of Relational data •Manages

Relational Data to RDF (W3C RDB2RDF)

Direct Mapping Automatically generates a mapping based on an input relational schema

R2RML (RDB to RDF Mapping Language) Language for expressing customized mappings

Two types of mapping: Direct and R2RML

Copyright © 2019, Oracle and/or its affiliates. All rights reserved.27

Page 28: Introduction to RDF Graph for Oracle Database 19c · 2019-12-19 · RDF Graph for Oracle Database 19c Features •Fast bulk-load and indexing •RDF view of Relational data •Manages

Tools Make Things Easier

SQL Developer RDF Plugin Jena Fuseki Web Application

Copyright © 2019, Oracle and/or its affiliates. All rights reserved.28

Page 29: Introduction to RDF Graph for Oracle Database 19c · 2019-12-19 · RDF Graph for Oracle Database 19c Features •Fast bulk-load and indexing •RDF view of Relational data •Manages

Agenda

3 Mid-tier Components and Tools

29 Copyright © 2019, Oracle and/or its affiliates. All rights reserved.

Page 30: Introduction to RDF Graph for Oracle Database 19c · 2019-12-19 · RDF Graph for Oracle Database 19c Features •Fast bulk-load and indexing •RDF view of Relational data •Manages

Support for Apache Jena

30 Copyright © 2019, Oracle and/or its affiliates. All rights reserved.

Page 31: Introduction to RDF Graph for Oracle Database 19c · 2019-12-19 · RDF Graph for Oracle Database 19c Features •Fast bulk-load and indexing •RDF view of Relational data •Manages

Implements Apache Jena APIs Popular Java APIs for semantic web

based applications Adds Oracle-specific extensions

Jena support provides three core features:

Java APIs for RDF Semantic Graph Data loading, querying, inferencing

SPARQL Endpoint for Oracle with SPARQL 1.1 support

Oracle-specific extensions for query execution control and management

Oracle Database

Support for Apache Jena(Load, Query, Inferencing, SPARQL

Web Service endpoint, Query execution control, S2S, Fallback...)

Tools(Protégé, TopBraid, OBIEE, TrOWL, …)

Applications

Support for Apache Jena

Copyright © 2019, Oracle and/or its affiliates. All rights reserved.31

Page 32: Introduction to RDF Graph for Oracle Database 19c · 2019-12-19 · RDF Graph for Oracle Database 19c Features •Fast bulk-load and indexing •RDF view of Relational data •Manages

“Proxy” like design Data not cached in memory for scalability SPARQL query converted into SQL and executed inside DB Inference pushed down to the database for execution

Various data loading methods Bulk/Incremental load RDF or OWL (stored in FS/HDFS/Website) in a variety of

formats with strict syntax verification and long literal support N3 Turtle RDF/XML N-TRIPLE N-Quads TriG

Provide Convenient Java API for RDF Knowledge Graph

Copyright © 2019, Oracle and/or its affiliates. All rights reserved.32

Page 33: Introduction to RDF Graph for Oracle Database 19c · 2019-12-19 · RDF Graph for Oracle Database 19c Features •Fast bulk-load and indexing •RDF view of Relational data •Manages

Support for Protégé 5

33 Copyright © 2019, Oracle and/or its affiliates. All rights reserved.

Page 34: Introduction to RDF Graph for Oracle Database 19c · 2019-12-19 · RDF Graph for Oracle Database 19c Features •Fast bulk-load and indexing •RDF view of Relational data •Manages

Protégé plug-in

Two key goals Integrate all the powerful

ontology editing capabilities of Protégé

Use the same GUI as a unified interface to manage semantic data stored in Oracle Database

RDF Graph Support for Protégé 5

Copyright © 2019, Oracle and/or its affiliates. All rights reserved.34

Page 35: Introduction to RDF Graph for Oracle Database 19c · 2019-12-19 · RDF Graph for Oracle Database 19c Features •Fast bulk-load and indexing •RDF view of Relational data •Manages

Key Features for Protégé Support

Incremental Edit SavingAdvanced Bulk LoadingXML Catalog – Ontology Libraries Support owl:import of ontologies stored in

Oracle Database

Models ManagerEntailments ManagerSPARQL Query WorksheetSQL Query Worksheet

Copyright © 2019, Oracle and/or its affiliates. All rights reserved.35

Page 36: Introduction to RDF Graph for Oracle Database 19c · 2019-12-19 · RDF Graph for Oracle Database 19c Features •Fast bulk-load and indexing •RDF view of Relational data •Manages

Oracle SQL Developer RDF Support

36 Copyright © 2019, Oracle and/or its affiliates. All rights reserved.

Page 37: Introduction to RDF Graph for Oracle Database 19c · 2019-12-19 · RDF Graph for Oracle Database 19c Features •Fast bulk-load and indexing •RDF view of Relational data •Manages

Oracle SQL Developer RDF Support Since SQL Dev. Version

18.1 Primary Goals

Serve as the primary GUI for RDF Knowledge Graph SQL and PL/SQL APIs

Single GUI for both Knowledge Graph and general database operations

Provide a familiar interface to Oracle Database users

Provide a friendly interface for Sem Web experts

RDF Semantic Graph

Copyright © 2019, Oracle and/or its affiliates. All rights reserved.37

Page 38: Introduction to RDF Graph for Oracle Database 19c · 2019-12-19 · RDF Graph for Oracle Database 19c Features •Fast bulk-load and indexing •RDF view of Relational data •Manages

Oracle SQL Developer RDF Support

Expand RDF Semantic Graph to see various menu items Models, Rulebases,

Entailments, …

Right-Click for operations Forms to build up

argument lists for PL/SQL APIs

Copyright © 2019, Oracle and/or its affiliates. All rights reserved.38

Page 39: Introduction to RDF Graph for Oracle Database 19c · 2019-12-19 · RDF Graph for Oracle Database 19c Features •Fast bulk-load and indexing •RDF view of Relational data •Manages

Oracle SQL Developer RDF Support SPARQL Editor

Opens after selecting a model, virtual model, or RDF view

Provides a pure-SPARQL query interface

Several query templates are available (e.g., distinct predicates)

Syntax highlighting and auto-completion

Copyright © 2019, Oracle and/or its affiliates. All rights reserved.39

Page 40: Introduction to RDF Graph for Oracle Database 19c · 2019-12-19 · RDF Graph for Oracle Database 19c Features •Fast bulk-load and indexing •RDF view of Relational data •Manages

Oracle SQL Developer RDF Support

R2RML Mapping Editor Shows a tree view of an

R2RML mapping

Allows drill down from Triples Map -> Subject Map -> Predicate-Object Map

You can edit or delete existing elements or add new ones

“Commit Mapping” refreshes the associated RDF view

Copyright © 2019, Oracle and/or its affiliates. All rights reserved.40

Page 41: Introduction to RDF Graph for Oracle Database 19c · 2019-12-19 · RDF Graph for Oracle Database 19c Features •Fast bulk-load and indexing •RDF view of Relational data •Manages

Agenda

4 Performing Analytics with RDF Graph Data

41 Copyright © 2019, Oracle and/or its affiliates. All rights reserved.

Page 42: Introduction to RDF Graph for Oracle Database 19c · 2019-12-19 · RDF Graph for Oracle Database 19c Features •Fast bulk-load and indexing •RDF view of Relational data •Manages

Oracle RDF KG as an Integration / Analytics Platform

My SQL

SQL Server

DB2

Oracle Big Data

Connectors

External Table /

DB Link

Oracle Database Gateways

Oracle Advanced Analytics

OBIEE

Relational Table/ViewProperty

Graph View

Property Graph View of

RDF

RDF View

PGX

CREATE VIEW

SEM_MATCH

Copyright © 2019, Oracle and/or its affiliates. All rights reserved.42

Page 43: Introduction to RDF Graph for Oracle Database 19c · 2019-12-19 · RDF Graph for Oracle Database 19c Features •Fast bulk-load and indexing •RDF view of Relational data •Manages

Creating Property Graph Views on an RDF Graph

public static void createPropertyGraphViewOnRDF(Connection conn,String pgGraphName,String rdfModelName,boolean virtualModel,PGUtils.RDFPredicate[] predListForVertexAttrs,PGUtils.RDFPredicate[] predListForEdges)

This method creates the property graph views (vertex and edge views) for the given RDF model.

Parameters:conn - a connection instance to Oracle databasepgGraphName - the name of the property graph to be createdrdfModelName - the name of the RDF modelvirtualModel - a flag represents if the RDF model is virtual model or notpredListForVertexAttrs - an array of RDFPredicate objects specifying how to create vertex view using these

predicatespredListForEdges - an array of RDFPredicate specifying how to create edge view using these predicates

Copyright © 2019, Oracle and/or its affiliates. All rights reserved.43

Page 44: Introduction to RDF Graph for Oracle Database 19c · 2019-12-19 · RDF Graph for Oracle Database 19c Features •Fast bulk-load and indexing •RDF view of Relational data •Manages

Agenda

5 New Features in Recent Releases

44 Copyright © 2019, Oracle and/or its affiliates. All rights reserved.

Page 45: Introduction to RDF Graph for Oracle Database 19c · 2019-12-19 · RDF Graph for Oracle Database 19c Features •Fast bulk-load and indexing •RDF view of Relational data •Manages

12c Release 2 New Features Usability

SQL Developer RDF support

Standards support In-database SPARQL Update support

Improved performance Schema changes for more efficient number, timestamp, spatial geometry processing More efficient RDF View query execution Support for in-memory columnar representation of RDF data

Integration RDF views of Property Graph data / Property Graph views of RDF data

Copyright © 2019, Oracle and/or its affiliates. All rights reserved.45

Page 46: Introduction to RDF Graph for Oracle Database 19c · 2019-12-19 · RDF Graph for Oracle Database 19c Features •Fast bulk-load and indexing •RDF view of Relational data •Manages

18c New Features Usability

Enhanced CLOB support in bulk load CLOB loading allowed in sem_apis.bulk_load_from_staging_table External Table based bulk-load now supports VC_ONLY, CLOB_ONLY, and VIEW options

Support for Turtle and Trig formats in PL/SQL APIs

Improved performance Composite partitioning of semantic networks Support for in-memory virtual columns to eliminate value table joins Hybrid strategy for SPARQL OPTIONAL evaluation Better optimizer statistics with column groups and larger histograms Compile-time value substitution for BIND

Copyright © 2019, Oracle and/or its affiliates. All rights reserved.46

Page 47: Introduction to RDF Graph for Oracle Database 19c · 2019-12-19 · RDF Graph for Oracle Database 19c Features •Fast bulk-load and indexing •RDF view of Relational data •Manages

19c New Features

Usability, Security, and Availability Support for schema-private semantic networks

Stores RDF data in user schema instead of MDSYS Allows multiple semantic networks in the same database Enables compatibility with Oracle Database Vault (a requirement for Autonomous DB)

Logical standby for RDF

Tool Support Bring open-source based tools up to latest version ORARDFLDR command-line utility

Copyright © 2019, Oracle and/or its affiliates. All rights reserved.47

Page 48: Introduction to RDF Graph for Oracle Database 19c · 2019-12-19 · RDF Graph for Oracle Database 19c Features •Fast bulk-load and indexing •RDF view of Relational data •Manages

48