RDF Views in Virtuoso

By default, Virtuoso stores all RDF data in a single "RDF Storage" that consists of one four-column relational table containing all triples of all graphs. System Administrators can extend this basic schema with additional Quad Mapping Storage Types to represent a variety of SQL tables and views stored in Virtuoso or in attached data sources.

Understanding Quad Mapping

Virtuoso uses a layered architecture for mapping relational data to RDF:

  • Quad Mapping Storage Type: Container for quad mappings (e.g., DefaultQuadStorage, DefaultServiceStorage)
  • Quad Map Collection: Configuration that defines how relational data is mapped to RDF
  • Knowledge Graph: The destination where resulting triples are stored
  • Data Sources: The relational tables or SQL queries that provide the source data
DefaultQuadStorage
DefaultQuadMap
DefaultServiceStorage
SyncToQuads
TmpQuadStorage

Quad Mapping Storage Type: DefaultQuadStorage

This pre-defined storage is used by default by all SPARQL queries. It contains 65 top-level quad maps ("RDF Views").

Oracle HR
SQL Server Northwind
Informix Stores

Knowledge Graph: oracle-hr

Quad Map: Countries RDF View

Data sources: Multiple Tables

Click to show SQL data sources

  • "hr"."ora18"."COUNTRIES"
  • "hr"."ora18"."LOCATIONS"
Quad Map: Departments RDF View

Data sources: Multiple Tables

Click to show SQL data sources

  • "hr"."ora18"."DEPARTMENTS"
  • "hr"."ora18"."LOCATIONS"
  • "hr"."ora18"."EMPLOYEES"
Quad Map: Employees RDF View

Data sources: Multiple Tables

Click to show SQL data sources

  • "hr"."ora18"."EMPLOYEES"
  • "hr"."ora18"."JOBS"
  • "hr"."ora18"."DEPARTMENTS"

Knowledge Graph: northwind-sqlserver

Quad Map: Orders RDF View

Data sources: Multiple Tables

Click to show SQL data sources

  • "sqlserver"."northwind"."orders"
  • "sqlserver"."northwind"."customers"
  • "sqlserver"."northwind"."employees"
  • "sqlserver"."northwind"."order_details"
Quad Map: Products RDF View

Data sources: Multiple Tables

Click to show SQL data sources

  • "sqlserver"."northwind"."products"
  • "sqlserver"."northwind"."suppliers"
  • "sqlserver"."northwind"."categories"
  • "sqlserver"."northwind"."order_details"
Quad Map: Region RDF View

Data sources: Multiple Tables

Click to show SQL data sources

  • "sqlserver"."northwind"."region"
  • "sqlserver"."northwind"."territories"

Knowledge Graph: informix-demo

Quad Map: Customer Calls RDF View

Data sources: Single Table

Click to show SQL data sources

  • "informix"."stores"."cust_calls"
Quad Map: Customer RDF View

Data sources: Single Table

Click to show SQL data sources

  • "informix"."stores"."customer"
Quad Map: VoidStatistics RDF View

Data sources: Multiple Tables

Click to show SQL data sources

  • "informix"."stores"."cust_callsCount"
  • "informix"."stores"."customerCount"
  • "informix"."stores"."itemsCount"
  • "informix"."stores"."manufactCount"
  • "informix"."stores"."informix-demo__Total"
  • "informix"."stores"."employeeCount"

Quad Mapping Storage Type: DefaultServiceStorage

This pre-defined storage is used internally for SERVICE {...} clauses of SPARQL queries; not for regular use.

The storage contains no RDF Views.

Default Quad Map Storage Type: DefaultServiceMap

This Quad Map provides triples for various graphs named by format default-iid-nonblank

The data come from system procedure views that compose and send HTTP requests to remote SPARQL service endpoints and then parse answers.

Quad Mapping Storage Type: SyncToQuads

This pre-defined storage is to enumerate quad maps mentioned by triggers based on RDF Views; these triggers track changes in source tables of RDF Views and materialize updated content of views as "physical" triples.

It contains 12 top-level quad maps ("RDF Views") grouped by target Knowledge Graph:

Knowledge Graph: csv_northwind
Quad Map Data Source
Categories "csv"."northwind"."categories"
Customers "csv"."northwind"."customers"
Products "csv"."northwind"."products"

The storage has no default quad map.

Quad Mapping Storage Type: TmpQuadStorage

This storage is created by some application or by system administrator.

The storage contains no RDF Views.

Default Quad Map Storage Type: TmpQuadMap

This Quad Map provides triples for various graphs named by format default-iid-blank

The data come from DB.DBA.RDF_QUAD_TMP

Quad Mapping Storage Type: DefaultQuadMap

This Quad Map Storage Type provides triples for various graphs named by format default-iid-nonblank.

The data come from DB.DBA.RDF_QUAD for physical triples created by loading RDF files or SPARUL updates.

About DefaultQuadMap

This storage type is responsible for physical triples only, while DefaultQuadStorage combines both physical triples and virtual triples from quad mappings.