Chapter16.RDF Data Access and Data Management

Abstract

Starting with version 4.5, Virtuoso provides built-in support for SPARQL, the standard query language for RDF and the semantic web. Adoption of SPARQL with Virtuoso is effortless, as any existing SQL client applications and stored procedures can take advantage of SPARQL simply by using it in the place of or inside SQL queries. Additionally, Virtuoso offers the standard SPARQL protocol to HTTP clients. From version 5.0.7, Virtuoso can be used as the RDF store/query processor of the Jena and Sesame RDF frameworks.

This chapter discusses Virtuoso's RDF triple storage and query capabilities. This discusses storing RDF data as well as mapping existing relational data into RDF for SPARQL access. Numerous SPARQL language extensions and standard compliance are covered.

In this chapter SPARQL and SPASQL are used as siblings.

Table of Contents

16.1. Data Representation
16.1.1. IRI_ID Type
16.1.2. RDF_BOX Type
16.1.3. RDF_QUAD and other tables
16.1.4. Short, Long and SQL Values
16.1.5. Programatically resolving DB.DBA.RDF_QUAD.O to SQL
16.1.6. Special Cases and XML Schema Compatibility
16.1.7. SQL Compiler Support - QUIETCAST option
16.1.8. Dynamic Renaming of Local IRI's
16.2. SPARQL
16.2.1. SPARQL Implementation Details
16.2.2. Query Constructs
16.2.3. SPARQL Web Services & APIs
16.2.4. Troubleshooting SPARQL Queries
16.2.5. SPARQL Inline in SQL
16.2.6. API Functions
16.2.7. Useful Internal Functions
16.2.8. Default and Named Graphs
16.2.9. Calling SQL from SPARQL
16.2.10. SPARQL DESCRIBE
16.2.11. Transitivity in SPARQL
16.2.12. Supported SPARQL-BI "define" pragmas
16.2.13. Built-in bif functions
16.2.14. Sending SOAP Requests to Virtuoso SPARQL Endpoint
16.2.15. Use of Hash Join With RDF
16.3. Extensions
16.3.1. Using Full Text Search in SPARQL
16.3.2. SPARUL -- an Update Language For RDF Graphs
16.3.3. Business Intelligence Extensions for SPARQL
16.4. RDF Graphs Security
16.4.1. RDF Graph Groups
16.4.2. NOT FROM and NOT FROM NAMED Clauses
16.4.3. Graph-Level Security
16.4.4. Graph-Level Security and SQL
16.4.5. Understanding Default Permissions
16.4.6. Initial Configuration of SPARQL Security
16.4.7. Application Callbacks for Graph Level Security
16.4.8. Graph-level security and sponging
16.5. Linked Data Views over RDBMS Data Source
16.5.1. Introduction
16.5.2. Rationale
16.5.3. Quad Map Patterns, Values and IRI Classes
16.5.4. Configuring RDF Storages
16.5.5. Translation Of SPARQL Triple Patterns To Quad Map Patterns
16.5.6. Describing Source Relational Tables
16.5.7. Function-Based IRI Classes
16.5.8. Connection Variables in IRI Classes
16.5.9. Lookup Optimization -- BIJECTION and RETURNS Options
16.5.10. Join Optimization -- Declaring IRI Subclasses
16.5.11. RDF Metadata Maintenance and Recovery
16.5.12. Split Linked Data View
16.5.13. Linked Data Views and recursive FK relationships
16.6. Automated Generation of Linked Data Views over Relational Data Sources
16.6.1. Introduction
16.6.2. One Click Linked Data Generation & Deployment
16.6.3. Manual Linked Data Generation & Deployment using the Conductor's HTML-based wizard
16.6.4. Manual Linked Data Generation & Deployment using iSQL command-line
16.7. Virtuoso R2RML Support
16.7.1. What is R2RML?
16.7.2. Why use it?
16.7.3. How do I use it with Virtuoso?
16.7.4. Known Limitations
16.7.5. Generating an R2RML based Linked Data View from iSQL command-line
16.7.6. Virtuoso Conductor R2RML Import Wizard
16.7.7. Generate Transient and/or Persistent Linked Data Views atop Remote Relational Data Sources Using Conductor
16.8. Examples of Linked Data Views
16.8.1. Simple Mapping Example -- Northwind Linked Data View
16.8.2. BSBM to RDF
16.8.3. TPCH to RDF
16.8.4. TPCD to RDF
16.8.5. Thalia to RDF
16.8.6. Musicbrainz to RDF
16.8.7. Virtuoso ODS to RDF
16.8.8. Sybase using demonstration 'pubs2' database
16.8.9. Virtuoso's Northwind based Demo Database (Tutorials variant) to RDF
16.8.10. SQL Server's Northwind Demo Database
16.8.11. Oracle Demonstration 'HR' Database
16.8.12. Oracle using the demonstration 'Human Resources' database
16.8.13. DB2 using the demonstration 'Sample' database
16.8.14. Informix using demonstration 'Stores' database
16.8.15. Ingres using demonstration 'Tutorial' database
16.8.16. Progress (SQL-89) using demonstration 'iSports' database
16.8.17. Progress (SQL-92) using demonstration 'iSports' database
16.9. RDF Insert Methods in Virtuoso
16.9.1. Using API functions
16.9.2. SPARQL endpoint REST API
16.9.3. HTTP PUT using Content-Type: application/rdf+xml
16.9.4. SPARQL Insert using LOAD
16.9.5. SPARQL Insert via /sparql endpoint
16.9.6. SPARQL Insert via SPARQL endpoint REST API and ODS wiki
16.9.7. Using WebDAV
16.9.8. Using Virtuoso Crawler
16.9.9. Using SPARQL Query and Sponger (i.e. we Fetch the Network Resources in the FROM Clause or values for the graph-uri parameter in SPARQL protocol URLs)
16.9.10. Using Virtuoso PL APIs
16.9.11. Using SIMILE RDF Bank API
16.9.12. Using RDF NET
16.9.13. Using the RDF Proxy (Sponger) Service
16.10. RDFizer Middleware (Sponger)
16.10.1. What Is The Sponger?
16.10.2. Why is it Important?
16.10.3. How Does It Work?
16.10.4. Installation Steps
16.10.5. Using The Sponger
16.10.6. Consuming the Generated RDF Structured Data
16.10.7. RDF Cartridges Use Cases
16.10.8. Cartridge Architecture
16.10.9. Sponger Programmers Guide
16.10.10. Sponger and Nanotations
16.10.11. Sponger Usage Examples
16.11. Virtuoso Faceted Browser Installation and configuration
16.11.1. Prerequisites
16.11.2. Pre Installation
16.11.3. VAD Package Installation
16.11.4. Post Installation
16.11.5. URI Labels
16.11.6. Usage Statistics
16.11.7. Examples
16.12. Virtuoso Faceted Web Service
16.12.1. Customizing
16.12.2. Examples
16.12.3. WebService Interface
16.13. Linked Data
16.13.1. IRI Dereferencing For FROM Clauses, "define get:..." Pragmas
16.13.2. IRI Dereferencing For Variables, "define input:grab-..." Pragmas
16.13.3. URL rewriting
16.13.4. Examples of other Protocol Resolvers
16.13.5. Faceted Views over Large-Scale Linked Data
16.14. Inference Rules & Reasoning
16.14.1. Introduction
16.14.2. Making Rule Sets
16.14.3. Changing Rule Sets
16.14.4. Subclasses and Subproperties
16.14.5. OWL sameAs Support
16.14.6. Implementation
16.14.7. Enabling Inferencing
16.14.8. Examples
16.14.9. Identity With Inverse Functional Properties
16.14.10. Inference Rules and SPARQL with Transitivity Option
16.14.11. Inference Rules, OWL Support and Relationship Ontology
16.15. RDF and Geometry
16.15.1. Programmatic Manipulation of Geometries in RDF
16.15.2. Creating Geometries From RDF Data
16.15.3. Using Geometries With Existing Databases
16.15.4. GEO Spatial Examples
16.16. RDF Replication
16.17. RDF Performance Tuning
16.17.1. General
16.17.2. RDF Index Scheme
16.17.3. Index Scheme Selection
16.17.4. Manage Public Web Service Endpoints
16.17.5. Erroneous Cost Estimates and Explicit Join Order
16.17.6. Using "swappiness" parameter ( Linux only )
16.17.7. Get All Graphs
16.17.8. Rename RDF Graph and RDF Graph Groups
16.17.9. Dump and Reload Graphs
16.17.10. RDF dumps from Virtuoso Quad store hosted data into NQuad dumps
16.17.11. Dump Linked Data View Graph to n3
16.17.12. Loading RDF
16.17.13. Using SPARUL
16.17.14. DBpedia Benchmark
16.17.15. RDF Store Benchmarks
16.17.16. Fast Approximate RDF Graph Diff and Patch
16.17.17. RDB2RDF Triggers
16.18. RDF Data Access Providers (Drivers)
16.18.1. Virtuoso Jena Provider
16.18.2. Virtuoso Sesame Provider
16.18.3. Virtuoso Redland Provider
16.19. RDF Graph Replication
16.19.1. Replication Scenarios
16.19.2. Replication Topologies
16.19.3. Set up RDF Replication via procedure calls