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").

ACME Insurance
Northwind
Oracle HR
Other Graphs

Knowledge Graph: acme-insurance-test

Quad Map: ACME Insurance RDF View

Data sources: Multiple Tables

Click to show SQL data sources

  • "Demo"."acme"."claim"
  • SELECT ca.claim_identifier, ca.claim_amount_identifier, ca.claim_amount FROM demo.acme.claim_amount ca JOIN demo.acme.loss_payment lp ON ca.claim_amount_identifier = lp.claim_amount_identifier
  • "Demo"."acme"."policy_coverage_detail"
  • "Demo"."acme"."policy"
  • SELECT DISTINCT party_identifier FROM demo.acme.agreement_party_role JOIN demo.acme.policy ON agreement_party_role.agreement_identifier = policy.policy_identifier WHERE agreement_party_role.party_role_code = 'AG'

Knowledge Graph: NorthwindDemo

Quad Map: Northwind Demo RDF View

Data sources: Multiple Tables

Click to show SQL data sources

  • SELECT "CategoryID", "CategoryName", "Description" FROM "Demo"."demo"."categories"
  • SELECT "CustomerID", "CompanyName", "ContactName", "ContactTitle", "Address", "City", "Region", "PostalCode", "Country", "CountryCode", "Phone", "Fax" FROM "Demo"."demo"."customers"
  • SELECT "ProductID", "CategoryID", "SupplierID", "ProductName", "QuantityPerUnit", "UnitPrice", "UnitsInStock", "UnitsOnOrder","ReorderLevel", "Discontinued" FROM "Demo"."demo"."products"

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: kg-demo

Quad Map: Knowledge Graph RDF View

Data sources: Single Table

Click to show SQL data sources

  • "Demo"."kg"."physical"

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: kg-demo
Quad Map Data Source
Knowledge Graph "Demo"."kg"."physical"
Knowledge Graph: fint
Quad Map Data Source
Financial Intelligence "Demo"."fint"."customer", "Demo"."fint"."account", "Demo"."fint"."fraud_label", "Demo"."fint"."transaction"
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