RDF Semantic Graph Developer's Guide

RDF Semantic Graph Developer's Guide

Oracle® Spatial and Graph RDF Semantic Graph Developer's Guide 18c E84309-04 March 2019 Oracle Spatial and Graph RDF Semantic Graph Developer's Guide, 18c E84309-04 Copyright © 2005, 2019, Oracle and/or its affiliates. All rights reserved. Primary Author: Chuck Murray Contributors: Eugene Inseok Chong, Souri Das, Joao Paiva, Matt Perry, Jags Srinivasan, Seema Sundara, Zhe (Alan) Wu, Aravind Yalamanchi This software and related documentation are provided under a license agreement containing restrictions on use and disclosure and are protected by intellectual property laws. Except as expressly permitted in your license agreement or allowed by law, you may not use, copy, reproduce, translate, broadcast, modify, license, transmit, distribute, exhibit, perform, publish, or display any part, in any form, or by any means. Reverse engineering, disassembly, or decompilation of this software, unless required by law for interoperability, is prohibited. The information contained herein is subject to change without notice and is not warranted to be error-free. If you find any errors, please report them to us in writing. If this is software or related documentation that is delivered to the U.S. Government or anyone licensing it on behalf of the U.S. Government, then the following notice is applicable: U.S. GOVERNMENT END USERS: Oracle programs, including any operating system, integrated software, any programs installed on the hardware, and/or documentation, delivered to U.S. Government end users are "commercial computer software" pursuant to the applicable Federal Acquisition Regulation and agency- specific supplemental regulations. As such, use, duplication, disclosure, modification, and adaptation of the programs, including any operating system, integrated software, any programs installed on the hardware, and/or documentation, shall be subject to license terms and license restrictions applicable to the programs. No other rights are granted to the U.S. Government. This software or hardware is developed for general use in a variety of information management applications. It is not developed or intended for use in any inherently dangerous applications, including applications that may create a risk of personal injury. If you use this software or hardware in dangerous applications, then you shall be responsible to take all appropriate fail-safe, backup, redundancy, and other measures to ensure its safe use. Oracle Corporation and its affiliates disclaim any liability for any damages caused by use of this software or hardware in dangerous applications. Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their respective owners. Intel and Intel Xeon are trademarks or registered trademarks of Intel Corporation. All SPARC trademarks are used under license and are trademarks or registered trademarks of SPARC International, Inc. AMD, Opteron, the AMD logo, and the AMD Opteron logo are trademarks or registered trademarks of Advanced Micro Devices. UNIX is a registered trademark of The Open Group. This software or hardware and documentation may provide access to or information about content, products, and services from third parties. Oracle Corporation and its affiliates are not responsible for and expressly disclaim all warranties of any kind with respect to third-party content, products, and services unless otherwise set forth in an applicable agreement between you and Oracle. Oracle Corporation and its affiliates will not be responsible for any loss, costs, or damages incurred due to your access to or use of third-party content, products, or services, except as set forth in an applicable agreement between you and Oracle. Contents Preface Audience xx Documentation Accessibility xx Related Documents xxi Conventions xxi Changes in This Release for Oracle Spatial and Graph RDF Semantic Graph Developer's Guide Changes in Oracle Database Release 18.1 xxii Changes in Oracle Database 12c Release 2 (12.2) xxiii Changes in Oracle Database 12c Release 1 (12.1.0.2) xxv Changes in Oracle Database 12c Release 1 (12.1.0.1) xxvi Changes for RDF Semantic Graph Support for Apache Jena xxviii Part I Conceptual and Usage Information 1 RDF Semantic Graph Overview 1.1 Introduction to Oracle Semantic Technologies Support 1-3 1.2 Semantic Data Modeling 1-4 1.3 Semantic Data in the Database 1-4 1.3.1 Semantic Network 1-5 1.3.2 Metadata for Models 1-5 1.3.3 Statements 1-7 1.3.3.1 Triple Uniqueness and Data Types for Literals 1-8 1.3.4 Subjects and Objects 1-10 1.3.5 Blank Nodes 1-10 1.3.6 Properties 1-10 1.3.7 Inferencing: Rules and Rulebases 1-10 1.3.8 Entailments (Rules Indexes) 1-13 1.3.9 Virtual Models 1-14 iii 1.3.10 Named Graphs 1-17 1.3.10.1 Data Formats Related to Named Graph Support 1-18 1.3.11 Semantic Data Security Considerations 1-19 1.4 Semantic Metadata Tables and Views 1-20 1.5 Semantic Data Types, Constructors, and Methods 1-21 1.5.1 Constructors for Inserting Triples 1-23 1.6 Using the SEM_MATCH Table Function to Query Semantic Data 1-23 1.6.1 Performing Queries with Incomplete or Invalid Entailments 1-30 1.6.2 Graph Patterns: Support for Curly Brace Syntax, and OPTIONAL, FILTER, UNION, and GRAPH Keywords 1-31 1.6.2.1 GRAPH Keyword Support 1-39 1.6.3 Graph Patterns: Support for SPARQL ASK Syntax 1-40 1.6.4 Graph Patterns: Support for SPARQL CONSTRUCT Syntax 1-41 1.6.4.1 Typical SPARQL CONSTRUCT Workflow 1-45 1.6.5 Graph Patterns: Support for SPARQL DESCRIBE Syntax 1-46 1.6.6 Graph Patterns: Support for SPARQL SELECT Syntax 1-47 1.6.7 Graph Patterns: Support for SPARQL 1.1 Constructs 1-52 1.6.7.1 Expressions in the SELECT Clause 1-52 1.6.7.2 Subqueries 1-53 1.6.7.3 Grouping and Aggregation 1-53 1.6.7.4 Negation 1-56 1.6.7.5 Value Assignment 1-58 1.6.7.6 Property Paths 1-61 1.6.8 Graph Patterns: Support for SPARQL 1.1 Federated Query 1-63 1.6.8.1 Privileges Required to Execute Federated SPARQL Queries 1-64 1.6.8.2 SPARQL SERVICE Join Push Down 1-64 1.6.8.3 SPARQL SERVICE SILENT 1-65 1.6.8.4 Using a Proxy Server with SPARQL SERVICE 1-65 1.6.8.5 Accessing SPARQL Endpoints with HTTP Basic Authentication 1-66 1.6.9 Inline Query Optimizer Hints 1-66 1.6.10 Full-Text Search 1-68 1.6.11 Spatial Support 1-71 1.6.11.1 OGC GeoSPARQL Support 1-71 1.6.11.2 Representing Spatial Data in RDF 1-71 1.6.11.3 Validating Geometries 1-73 1.6.11.4 Indexing Spatial Data 1-73 1.6.11.5 Querying Spatial Data 1-74 1.6.11.6 Using Long Literals with GeoSPARQL Queries 1-74 1.6.12 Flashback Query Support 1-75 1.6.13 Best Practices for Query Performance 1-76 1.6.13.1 FILTER Constructs Involving xsd:dateTime, xsd:date, and xsd:time 1-77 iv 1.6.13.2 Function-Based Indexes for FILTER Constructs Involving Typed Literals 1-77 1.6.13.3 FILTER Constructs Involving Relational Expressions 1-77 1.6.13.4 Optimizer Statistics and Dynamic Sampling 1-78 1.6.13.5 Multi-Partition Queries 1-78 1.6.13.6 Compression on Systems with OLTP Index Compression 1-79 1.6.13.7 Unbounded Property Path Expressions 1-79 1.6.13.8 Nested Loop Pushdown for Property Paths 1-79 1.6.13.9 Grouping and Aggregation 1-80 1.6.13.10 Use of Bind Variables to Reduce Compilation Time 1-80 1.6.13.11 Non-Null Expression Hints 1-82 1.6.14 Special Considerations When Using SEM_MATCH 1-83 1.7 Using the SEM_APIS.SPARQL_TO_SQL Function to Query Semantic Data 1-84 1.7.1 Using Bind Variables with SEM_APIS.SPARQL_TO_SQL 1-85 1.7.2 SEM_MATCH and SEM_APIS.SPARQL_TO_SQL Compared 1-89 1.8 Loading and Exporting Semantic Data 1-89 1.8.1 Bulk Loading Semantic Data Using a Staging Table 1-90 1.8.1.1 Loading the Staging Table 1-91 1.8.1.2 Recording Event Traces During Bulk Loading 1-92 1.8.2 Batch Loading N-Triple Format Semantic Data Using the Java API 1-93 1.8.3 Loading Semantic Data Using INSERT Statements 1-94 1.8.3.1 Loading Data into Named Graphs Using INSERT Statements 1-95 1.8.4 Exporting Semantic Data 1-95 1.8.4.1 Retrieving Semantic Data from an Application Table 1-95 1.8.4.2 Retrieving Semantic Data from an RDF Model 1-96 1.8.4.3 Removing Model and Graph Information from Retrieved Blank Node Identifiers 1-97 1.8.5 Exporting or Importing a Semantic Network Using Oracle Data Pump 1-98 1.8.6 Purging Unused Values 1-99 1.9 Using Semantic Network Indexes 1-101 1.9.1 MDSYS.SEM_NETWORK_INDEX_INFO View 1-103 1.10 Using Data Type Indexes 1-103 1.11 Managing Statistics for Semantic Models and the Semantic Network 1-105 1.11.1 Saving Statistics at a Model Level 1-106 1.11.2 Restoring Statistics at a Model Level 1-106 1.11.3 Saving Statistics at the Network Level 1-107 1.11.4 Dropping Extended Statistics at the Network Level 1-107 1.11.5 Restoring Statistics at the Network Level 1-108 1.11.6 Setting Statistics at a Model Level 1-108 1.11.7 Deleting Statistics at a Model Level 1-108 1.12 Support for SPARQL Update Operations on a Semantic Model 1-108 1.12.1 Tuning the Performance of SPARQL Update Operations 1-119 v 1.12.2 Transaction Management with SPARQL Update Operations 1-120 1.12.2.1 Transaction Isolation Levels 1-122 1.12.3 Support for Bulk Operations 1-123 1.12.3.1 Materialization of Intermediate Data (STREAMING=F) 1-124 1.12.3.2 Using SEM_APIS.BULK_LOAD_FROM_STAGING_TABLE 1-124 1.12.3.3 Using Delete as Insert (DEL_AS_INS=T) 1-125 1.12.4 Setting UPDATE_MODEL Options at the Session Level 1-125 1.12.5 Load Operations: Special Considerations for SPARQL Update 1-126 1.12.6 Long Literals: Special Considerations for SPARQL Update 1-127 1.12.7 Blank Nodes: Special Considerations for SPARQL Update 1-127 1.13 RDF Support for Oracle Database In-Memory 1-128 1.13.1 Enabling Oracle Database In-Memory

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    608 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us