Mapping SQL Data to Linked Data Views

Introduction

Virtuoso uses a SPARQL-based Meta Schema Language to provide RDBMS-to-RDF mapping functionality (also described as, Linked Data Views of SQL data). The language is an extension of the SPARQL query language, meshed with Virtuoso's SPASQL (SPARQL-inside-SQL) functionality. The language enables you to declaratively map relational database schema tables, columns, rows, and foreign key relationships to Classes, Attributes, Relationships, and Instances (Objects/Entities/Individuals) defined by RDF Schemas or OWL Ontologies. The mapping process uses a special built-in Virtuoso function to generate IRIs / URIs in "Subject" or "Object" position of a SPARQL graph pattern, en route to building a set of SQL compiler rules and optimizations for translating SPARQL queries into SQL on the fly.

While the full power of the Meta Schema Language is always available to the advanced user, many users (both beginners and experts) will find that the more recently enabled Automated Generation of Linked Data Views is more than sufficient.

Generating Linked Data Views from SQL data

Automated Generation of Linked Data Views over Relational Data Sources

Manual Mapping Process

The basic steps are as follows:

  1. Identify the tables, views, and procedure views to be mapped.
  2. Decide if you are performing a 1:1 mapping or a more customized mapping to a specific RDF Schema or Ontology.
  3. Declare Virtuoso-URI-Generator functions for each Class in the target RDF Schema or Ontology.
  4. Use the Virtuoso-URI-Generator functions in SPARQL graph patterns within the ALTER QUAD STORAGE part of a SPASQL-based mapping statement.
  5. Check to ensure the cartridges VAD package is installed using the System Admin -> Packages tab of the Virtuoso Conductor, and if not select the install button to the right of the package to install for use.
  6. Use Virtuoso's built-in URL-Rewrite Rules APIs (or Conductor UI) to publish the Linked Data URIs which result from the mapping above.

Manual Mapping Example

More Examples, Linking Remote Tables into Virtuoso (Commercial Edition only)

Sample Mapping Scripts for Various Purposes

Enterprise Data Access & Integration

Linked Data Views of ODS Application Data

Business Intelligence

Semi-Structured Content Examples

Web 2.0 Platforms

How Do I ...?

Technical White Papers & Advanced Tutorials

Screencast Demos