• Topic
  • Discussion
  • VOS.VOSSQL2RDF(1.1) -- DAVWikiAdmin? , 2017-06-13 05:41:13 Edit WebDAV System Administrator 2017-06-13 05:41:13

    Mapping SQL Data to Linked Data Views


    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

    • View an example of mapping the phpBB3 SQL schema to the classes defined by the SIOC and FOAF ontologies.

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

    • View how to perform linking across several supported targets, including Oracle, SQL Server, DB2, Sybase, Informix, Ingres, MySQL, PostgreSQL, and other ODBC and JDBC data sources.

    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