Virtuoso Open-Source Wiki
Virtuoso Open-Source, OpenLink Data Spaces, and OpenLink Ajax Toolkit
Advanced Search
Help?
Location: / Dashboard / Main / VirtRdb2RDFViewsGeneration

Automated Generation of Linked Data Views over Relational Data Sources with Virtuoso

The proliferation of relational databases across enterprises and behind Web sites makes them a vital data source for the burgeoning Linked Data Web. The process of publishing Linked Data from these sources needs to be as unobtrusive as possible, and must preserve and enhance the traditional virtues of relational database management systems (RDBMS) such as:

  • Scalability
  • Security
  • Analytical Expressiveness of SQL
  • Separation of Data Storage from Data Access via ODBC, JDBC, ADO.NET, and other call level interfaces (CLIs)

To this end, Virtuoso includes an HTML-based Wizard interface for dynamically generating & publishing RDF-based Linked Data -- essentially RDF-based VIEWs -- from relational data sources.

Note: In the Open Source Edition, this can only be used over locally-stored, Virtuoso-based SQL data. With the Commercial Edition, local or remote ODBC- or JDBC-accessible data sources can also be exposed as RDF-based Linked Data.

How to Publish RDF-based Linked Data VIEWs of Relational Data

  1. Check to ensure the cartridges_dav.vad and fct_dav.vad VAD packages are installed using the System Admin -> Packages tab of the Virtuoso Conductor.
    • If not yet present, use the Install button to the right of the package to install now.
  2. If the data is hosted in the same Virtuoso instance, skip to the next step.
    1. Identify the ODBC or JDBC data sources that host the data you seek to publish.
    2. Attach/Link TABLEs and/or VIEWs from the external data sources into Virtuoso via their Data Source Names (DSNs).
  3. In the Virtuoso schema, locate the local and/or linked TABLEs and/or VIEWs that hold the data you wish to publish.
  4. Use the Linked Data publishing Wizard to produce a Data Source Ontology and associated Instance Data.
  5. Configure Endpoints and Re-write Rules to disambiguate data object (resource) identity and description through HTTP-based content negotiation.
  6. Expose the Data Source Ontology and associated Instance Data in Linked Data form through those Endpoints and Re-write Rules.

These steps may be largely automated (the One-Click Deployment below), or performed manually (Using the Conductor's HTML-based Wizard further down).

One-Click Linked Data Generation & Deployment

  1. Go to http://<cname>:port/conductor. Note, the appropriate cname (hostname) and port number for dereferencing URIs must be set for the URIQA DefaultHost Virtuoso configuration parameter before creating the Linked Data RDF views.
  2. Log in as user dba (or another user with DBA privileges)
  3. Follow menu path RDF -> Linked Data Views



  4. In the form presented, perform the following steps:



    1. Select the Database Name Qualifier (e.g., "Demo") that exposes the Tables / Views for this exercise
    2. Enter the Base URL to which your URL rewrite rules will be bound (e.g., http://<cname>:8890/Demo)
    3. Select the specific Tables containing the data to be published (e.g., Demo.demo.Shippers and Demo.demo.Suppliers)
    4. Click the Generate & Publish button
  5. Virtuoso will perform the entire process of ontology generation, instance data generation, and linked data deployment (re-write rules generation and application).
  6. Error messages will be presented if the Wizard encounters problems. If there are no error messages, your RDF view declarations and Linked Data publishing activities will have completed successfully.



  7. Optionally, you can also perform one of the following tasks:
    • Save Data Mappings when clicked, offers to save the generated Definitions to local file system
    • Save Ontology Mappings when clicked, offers to save the generated Ontology to local file system
    • Click on the "Cancel" button to return to the initial Linked Data View Generation form.

Manual Linked Data Generation & Deployment using the Conductor's HTML-based wizard

  1. Go to http://<cname>:port/conductor
  2. Log in as user dba (or another user with DBA privileges)
  3. Follow menu path Database -> Linked Data Views



  4. In the form presented, perform the following steps:



    1. Select the Database Name Qualifier (e.g., "Demo") that exposes the Tables / Views for this exercise
    2. Enter the Base URL to which your URL rewrite rules will be bound (e.g., http://<cname>:8890/Demo)
    3. Select the specific Tables containing the data to be published (e.g., Demo.demo.Shippers and Demo.demo.Suppliers)
    4. Click the Generate via Wizard button
  5. At this point, you are presented with the option to edit your column selection. Select the "Edit" link, for example, for table Demo.demo.Shippers.



  6. For images or other binary data in MIME formats to be revealed as anything other than generic "binary objects", you must map large varbinary types to the appropriate MIME types like image/gif. To do so, select the Edit link for Binding/MIME Type of the relevant table columns. You can:
    • Leave the Binding/MIME Type literal; or
    • Set to skip, such that the column will not be used in RDF generation; or
    • Select the binary object value in order for the column to be referenced as binary.



  7. After finishing with your changes click the Save button, or cancel the changes and go back by clicking the Cancel button.
  8. Make sure you click the "Next" button.
  9. At this point, the Linked Data View Definition form will let you Select Generation Targets options:



    • Data Source Ontology Mappings
    • Instance Data View Mappings
    • VoID statistic
  10. Make sure you click the "Next" button.
  11. Based on your selections in the prior form, the Linked Data View Definition Deployment Options form will be offered:
    • Data Source Ontology Rules
    • Instance Data Rules



  12. Select the desired option(s) and click the "Prepare to Execute" button which unveils a generated Instance Data and/or Ontology form.



  13. Click the Execute button and Virtuoso will:
    1. Apply the generated declarations (instance data and ontology) to your Virtuoso instance
    2. Publish / Deploy declarations that expose the Wizard-generated Rewrite Rules and associated endpoints.



  14. Optionally, you can also perform one of the following tasks:
    1. Save Data Mappings: when clicked, offers to save the generated Definitions to local file system
    2. Save Ontology Mappings: when clicked, offers to save the generated Ontology to local file system
    3. Export as WebDAV resource: exports the selected objects/items as a WebDAV resource:
      1. Click Browse
      2. Enter a WebDAV resource and click the Select button.



        Note, the WebDAV resource path value will be shown in the WebDAV location field.
      3. Then click the "Save Data Mappings" or "Save Ontology Mappings" button, to complete the option task of saving your generated (or edited) view declarations.



  15. Error messages will be presented if the Wizard encounters problems. If there are no error messages, your RDF view declarations and Linked Data publishing activities will have completed successfully.



  16. Click on Cancel to return to the initial Linked Data View Generation form.

Creating Linked Data Views over Remote Data Sources (Virtuoso Commercial Edition only!)

Related

Powered By Virtuoso