OpenLink Software · Medium · Kingsley Uyi Idehen · Apr 27, 2018 · 12 min read

Conceptual Relational Data Virtualization,
for SQL and RDF

"One engine, both worlds, zero impedance." — query the same live data as tables or as a knowledge graph, with open standards and no rip-and-replace.

One multi-model RDBMS can represent every relation as a SQL Table, an RDF sentence collection, or both - and let you query either view with ANSI SQL or W3C SPARQL, no impedance, no data copies. OpenLink Virtuoso turns R2RML mappings into virtual RDF views over live relational tables, so enterprises keep their existing tools and add knowledge-graph exploration, ontology inference, and Linked Data super keys on top.

The payoff: serendipitous discovery and richer data quality without ripping and replacing a single existing technology investment..

0 (zero-replication)
2 (Tables & RDF Graphs)
12 min (Apr 27, 2018)
HTTP, SQL, SPARQL, RDF, R2RML, ODBC, JDBC
4 (Storage, Mapping, Graph, Consumption)
TABLES ↔ GRAPHS · R2RML · QUAD MAPS · ZERO REPLICATIONSQL Tablestabular relationsRDF Graphssentence collectionsR2RML · Quad MapsSPARQL · Linked Data
KG curated by kg-generator and rdf-infographic-skill on behalf of Kingsley Uyi Idehen
01 · article section

Situation Analysis

Data is observation expressed as entity-relationship types (relations), which can take tabular or graphical form. SQL RDBMS vendor marketing conflates the application with its query language, obscuring that other representations and query languages exist.

"Data is how we express 'Observation' in reusable form. The 'Observation' being expressed is one or more entity relationship types (relations)."
Kingsley Uyi Idehen
02 · article section

Virtuoso Relational Data Virtualization Example

A step-by-step Northwind demo generates RDF Views from SQL Tables using the RDB2RDF Wizard, an R2RML document, Virtuoso's R2RML processor, and a URI rewrite rule - all existing open standards.

03 · article section

Understanding RDF View Generation Output

Quad Maps are Virtuoso's native R2RML equivalent: data transformation rules providing RDF Views when SPARQL queries run. Every table becomes an RDF class, every column a property, every row a subject - decomposing coarse-grained tabular relations into fine-grained graph relations.

"All data managed by a Virtuoso RDBMS is represented internally as relational Tables, implicitly contradicting the notion that SQL and SPARQL are mutually exclusive."
Kingsley Uyi Idehen
1. Explore R2RML Quad Maps via SPARQL (Basic)
PREFIX virtrdf: <http://www.openlinksw.com/schemas/virtrdf#>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>

SELECT DISTINCT ?s1 AS ?quadMap
       ?s3 AS ?rdfPredicate
       ?s2 AS ?sqlTable
WHERE {
  ?s1 a virtrdf:QuadMap .
  ?s1 virtrdf:qmTableName ?s2 .
  ?s1 virtrdf:qmPredicateRange-rvrFixedValue ?s3 .
  FILTER (! contains(str(?s2), "/csv"))
  FILTER (! contains(str(?s2), 'csv.'))
  FILTER (contains(str(?s2), "supplier"))
}
LIMIT 200

Endpoint: demo.openlinksw.com · Run live ↗

2. Map Tables to RDF Predicates, Subjects, and Values (Detailed)
PREFIX virtrdf: <http://www.openlinksw.com/schemas/virtrdf#>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>

SELECT DISTINCT ?s2 AS ?sqlTable
       ?s1 AS ?rdfQuadMap
       ?s6 AS ?rdfSubjectURITemplate
       ?s3 AS ?rdfPredicate
       ?s10 AS ?rdfObjectValue
       ?s8 AS ?rdfObjectDataType
WHERE {
  ?s1 a virtrdf:QuadMap .
  ?s1 virtrdf:qmTableName ?s2 .
  ?s1 virtrdf:qmPredicateRange-rvrFixedValue ?s3 .
  ?s1 virtrdf:qmSubjectMap ?s4 .
  ?s4 virtrdf:qmvFormat ?s5 .
  ?s5 virtrdf:qmfCustomString1 ?s6 .
  ?s1 virtrdf:qmObjectMap ?s7 .
  ?s7 virtrdf:qmvFormat ?s8 .
  ?s7 virtrdf:qmvColumns ?s9 .
  ?s9 rdf:_1 ?s10
  FILTER (! contains(str(?s2), "/csv"))
  FILTER (! contains(str(?s2), 'csv.'))
  FILTER (contains(str(?s2), '"northwind"."suppliers"'))
}

Endpoint: demo.openlinksw.com · Run live ↗

3. Explore R2RML Mapping Declarations
PREFIX r2rml: <http://www.w3.org/ns/r2rml#>

SELECT ?mapping ?dbQualifier ?dbSchema ?dbTableName ?tableColumn
       ?rdfPredicateURI ?subjectURITemplate ?targetNamedGraph ?derivedClass
FROM <https://kidehen3.solid.openlinksw.com:8443/public/R2RML/northwind-8890-tables.ttl>
WHERE {
  ?mapping a r2rml:TriplesMap ;
           r2rml:logicalTable [ r2rml:tableOwner ?dbQualifier ;
                                r2rml:tableSchema ?dbSchema ;
                                r2rml:tableName ?dbTableName ] ;
           r2rml:subjectMap [ r2rml:template ?subjectURITemplate ;
                              r2rml:graph ?targetNamedGraph ;
                              r2rml:class ?derivedClass ] ;
           r2rml:predicateObjectMap [ r2rml:objectMap [ r2rml:column ?tableColumn ] ;
                                      r2rml:predicateMap [ r2rml:constant ?rdfPredicateURI ] ] .
  FILTER (contains(?dbSchema, 'Demo'))
  FILTER (?dbTableName = 'Suppliers')
}

Endpoint: linkeddata.uriburner.com · Run live ↗

04 · article section

Deploying RDF using Linked Data Principles

RDF and Linked Data are not synonyms. Linked Data is an RDF deployment method whose three principles demand HTTP URIs for every subject, predicate, and object, turning data into a Web where entities are lookup-able.

"Contrary to common misconceptions, RDF and Linked Data are not terms that denote the same thing; i.e., they aren't synonyms."
Kingsley Uyi Idehen
05 · article section

From Linked Data to a Semantic Web

A Semantic Web builds on Linked Data by requiring human- and machine-readable vocabularies in sentence construction, so each predicate declares the expected types of its subjects and objects.

06 · article section

Live Examples

RDF Views generated from SQL-oriented Northwind tables are served live: an organization entity (customer) and a person entity (employee), each dereferenceable via an HTTP URI super key.

1. Live Northwind: Entity Types in the Virtual RDF Graph
SELECT  ?o
        (SAMPLE(?s) AS ?sample)
        (COUNT(*) AS ?count)
FROM    <urn:demo.csv:northwind:data>
WHERE
  {
    ?s a ?o .
  }
GROUP BY ?o
ORDER BY DESC(?count)
LIMIT 50

Endpoint: demo.openlinksw.com · Run live ↗

2. Live Northwind: Organizations (Customers) from Virtual RDF Views
PREFIX nw: <http://demo.openlinksw.com/schemas/csv_northwind/>
SELECT ?org ?id ?name ?city ?country
FROM <urn:demo.csv:northwind:data>
WHERE {
  ?org a nw:customers ;
       nw:customerid ?id ;
       nw:companyname ?name ;
       nw:city ?city ;
       nw:country ?country .
}
LIMIT 10

Endpoint: demo.openlinksw.com · Run live ↗

3. Live Northwind: People (Employees) from Virtual RDF Views
PREFIX nw: <http://demo.openlinksw.com/schemas/csv_northwind/>
SELECT ?emp ?first ?last ?title
FROM <urn:demo.csv:northwind:data>
WHERE {
  ?emp a nw:employees ;
       nw:firstname ?first ;
       nw:lastname ?last ;
       nw:title ?title .
}
LIMIT 10

Endpoint: demo.openlinksw.com · Run live ↗

4. Live Northwind: DESCRIBE a Supplier via its HTTP URI Super Key
DESCRIBE <http://demo.openlinksw.com/csv_northwind/suppliers/supplierID/12#this>
FROM <urn:demo.csv:northwind:data>

Endpoint: demo.openlinksw.com · Run live ↗

5. Live Northwind: Customers x Orders Join across Virtual Tables
PREFIX nw: <http://demo.openlinksw.com/schemas/csv_northwind/>
SELECT ?org ?orgName (COUNT(?order) AS ?orderCount)
FROM <urn:demo.csv:northwind:data>
WHERE {
  ?org a nw:customers ; nw:customerid ?cid ; nw:companyname ?orgName .
  ?order a nw:orders ; nw:customerid ?cid .
  FILTER(CONTAINS(STR(?org), "/customerID/"))
}
GROUP BY ?org ?orgName
ORDER BY DESC(?orderCount)
LIMIT 10

Endpoint: demo.openlinksw.com · Run live ↗

07 · article section

Conclusion

A single multi-model RDBMS enhances data access, integration, conceptual virtualization, and management across tables and graphs. HTTP URI super keys plus machine-readable relation semantics deliver serendipitous discovery - all with existing tools, no rip-and-replace.

"You do not need to 'rip and replace' existing technology investments to benefit from current or future digital transformations!"
Kingsley Uyi Idehen
Head-to-Head

Three worldviews, one winner for open data

The article's central claim, tabulated: the SQL-only RDBMS worldview, the dedicated graph store ('NoSQL') worldview, and the multi-model conceptual virtualization approach delivered by Virtuoso - across eight evaluation dimensions.

DimensionSQL-Only RDBMSGraph Store ('NoSQL')Multi-Model Virtualization
Data RepresentationTabular relations only (Tables)Graphical relations only (RDF sentence collections)Both: SQL Tables and RDF Graphs, natively
Declarative Query LanguageSQL only (ANSI/ISO)SPARQL, Cypher, GraphQLSQL, SPARQL 1.1, and SPASQL hybrids in one statement
Rules DeclarationSQL ViewsSPARQL CONSTRUCT / custom rules (partial)SQL Views and RDF Views, custom inference rules, and ABAC for data security
Data Movement & ReplicationETL pipelines into warehouses or lakesFull re-platforming into a standalone triple storeZero replication: virtual RDF views over live tables
Entity Identity & Super KeysPrimary keys scoped to a single table or instanceStore-local node identifiersDereferenceable HTTP URI super keys (Linked Data)
Schema Evolution & Semantic MappingRigid tabular schemas; changes ripple through consumersFlexible graphs, but migration tooling requiredDeclarative R2RML / Quad Map remapping, ontology-driven
Existing Tool & BI IntegrationNative ODBC/JDBC to its own tablesGraph-specific drivers; breaks existing SQL toolingFull ODBC/JDBC/ADO.NET/OLE DB plus SPARQL endpoints
Total Cost of Ownership & Lock-inProprietary worldview; migration lock-inNew stack, duplicated storage, sync lagOpen standards only; no rip-and-replace; pay-as-you-go
SQL-Only RDBMS
Tabular relations only (Tables)
SQL only (ANSI/ISO)
ETL pipelines into warehouses or lakes
Primary keys scoped to a single table or instance
Rigid tabular schemas; changes ripple through consumers
Native ODBC/JDBC to its own tables
Proprietary worldview; migration lock-in
Graph Store ('NoSQL')
Graphical relations only (RDF sentence collections)
SPARQL, Cypher, GraphQL
SPARQL CONSTRUCT / custom rules (partial)
Full re-platforming into a standalone triple store
Store-local node identifiers
Flexible graphs, but migration tooling required
Graph-specific drivers; breaks existing SQL tooling
New stack, duplicated storage, sync lag
Multi-Model Virtualization
Both: SQL Tables and RDF Graphs, natively
SQL, SPARQL 1.1, and SPASQL hybrids in one statement
SQL Views and RDF Views, custom inference rules, and ABAC for data security
Zero replication: virtual RDF views over live tables
Dereferenceable HTTP URI super keys (Linked Data)
Declarative R2RML / Quad Map remapping, ontology-driven
Full ODBC/JDBC/ADO.NET/OLE DB plus SPARQL endpoints
Open standards only; no rip-and-replace; pay-as-you-go
How-To

Virtualize relational data as RDF graphs in 7 steps

The article's Northwind walkthrough, generalized into a four-tier engineering pipeline: store, map, reason, consume.

TIER 1 · PHYSICAL RELATIONAL STORAGEODBC / JDBC · Virtual Database federation · local RDF_QUAD coreTIER 2 · CONCEPTUAL MAPPING & VIRTUALIZATIONR2RML · RDB2RDF Wizard · Quad Maps · named graphsTIER 3 · SEMANTIC GRAPH & INFERENCESPARQL 1.1 · URI rewrite rules · SPARQL DESCRIBETIER 4 · UNIVERSAL CONSUMPTIONSQL · SPARQL · BI dashboards · AI agents · Linked Data1Attach data sources2Generate R2RML3Save R2RML doc4Load into graph5Run processor6URI rewrite rules7Query & consume7Zero replicationLIVE DATA · SQL & SPARQL · NO RIP-AND-REPLACE
  1. 1

    Attach ODBC/JDBC data sources to Virtuoso

    Link target relational databases into Virtuoso's Virtual Database (VDB) engine using standard ODBC drivers; if a source has only a JDBC driver, add an ODBC-to-JDBC bridge driver.

  2. 2

    Generate R2RML mappings with the RDB2RDF Wizard

    Use the SQL Tables to RDF Sentence Relations Wizard to select the SQL tables from which RDF Views are to be generated.

  3. 3

    Save the R2RML document

    Copy the generated R2RML sentences into a text/plain or text/turtle document (e.g., northwind-8890-tables-r2rml.ttl) instead of executing them directly.

  4. 4

    Load R2RML into a named graph

    Use SPARQL 1.1 LOAD (or INSERT, or the Virtuoso Sponger with no-sponge) to load the R2RML document into a target named graph, e.g., urn:northwind:8890:tables:r2rml:mappings.

  5. 5

    Run the R2RML processor to create Quad Maps

    Execute Virtuoso's built-in R2RML processor DB.DBA.R2RML_MAKE_QM_FROM_G over the named graph to instantiate the Quad Maps that provide virtual RDF Views to the query engine.

  6. 6

    Create HTTP URI rewrite rules

    Use DB.DBA.URLREWRITE_CREATE_REGEX_RULE so an HTTP lookup of any entity URI (e.g., http://demo.openlinksw.com/Demo/suppliers/SupplierID/12#this) triggers a SPARQL DESCRIBE returning the entity's description document.

  7. 7

    Query and consume the virtualized graph

    Query the virtual RDF Views with SPARQL or SPASQL, explore them in BI dashboards via ODBC/JDBC, and dereference entities as Linked Data - all against live relational data with zero replication.

FAQ

Frequently Asked Questions

Twelve questions on conceptual data virtualization, R2RML, Quad Maps, super keys, and open standards.

Q1

Conceptual data virtualization maps structured relational database tables into virtual RDF knowledge graphs in real time. Instead of physically copying data via batch ETL, a multi-model engine like Virtuoso executes query rewrites on the fly, so developers can query relational data as a knowledge graph using SPARQL, or query graph data as tables using SQL.

Q2

RDF is a W3C standard family for representing information as subject-predicate-object sentences. Linked Data is an RDF deployment method based on specific principles: every subject and predicate identified by an HTTP URI, and every object by an HTTP URI or literal. All Linked Data is RDF; not all RDF is Linked Data.

Q3

'NoSQL' is better expressed as 'Not only SQL': SQL is not the only query language for operating on relations managed by an RDBMS. Calling graph databases 'non-relational' is technically illogical once the nature of data - entity-relationship types - is properly understood.

Q4

Traditional ETL pipelines suffer data latency, high storage duplication cost, fragile schema maintenance, and rigid downstream models. Conceptual virtualization eliminates ETL, delivers real-time live data, enables schema agility via ontology mappings, and reduces total cost of ownership - with no rip-and-replace of existing investments.

Q5

Relational databases enforce fixed tabular schemas and tuple calculus, while graphs model flexible, interconnected entities. One engine eliminates the tension by treating tables and graphs as dual mathematical projections of the same underlying relations, letting users choose the optimal query language (SQL or SPARQL) without altering storage.

Q6

By relying exclusively on recognized standards - ANSI SQL, W3C SPARQL, W3C RDF, W3C R2RML, IETF HTTP, and ISO/IEC ODBC - organizations are not tied to proprietary graph models or custom middleware. Mappings and queries remain portable across compliant platforms, and existing tooling is preserved.

Q7

Relational primary keys are scoped to a single table or database instance. HTTP URIs are 'super keys': globally unique, network-resolvable identifiers that can name an entity across disparate databases, departments, and the global Web.

Q8

R2RML (RDB to RDF Mapping Language) is a W3C-standard declarative language expressing customized mappings from relational databases to RDF datasets. Virtuoso compiles R2RML documents into internal Quad Map definitions that translate incoming SPARQL queries into SQL query plans executed against the underlying tables.

Q9

No. It is zero-replication: relational data stays in its native tables (local or remote). Virtuoso performs dynamic query transformation at query time, so graph queries always access the freshest live transactional state.

Q10

SPASQL (SPARQL embedded in SQL) lets SPARQL queries execute directly inside SQL statements, e.g., 'SPARQL SELECT ...' or SQL FROM (SPARQL SELECT ...). Existing SQL tools, reporting software, and BI dashboards gain graph traversal and inference without needing a dedicated SPARQL client.

Q11

Yes. Virtuoso's Virtual Database (VDB) layer links remote databases such as Oracle, SQL Server, PostgreSQL, MySQL, and Db2 via ODBC/JDBC. Once linked, their tables can be mapped to virtual RDF graphs with R2RML, creating a unified semantic layer across the enterprise.

Q12

Quad Maps are Virtuoso's native equivalent of R2RML: collections of data transformation rules that provide RDF Views to the engine when processing SPARQL queries. They are the end product of passing an R2RML document through the Virtuoso R2RML processor.

Glossary

Defined Terms

Twelve foundational terms, each linked to its knowledge-graph entity and primary DBpedia description.

An approach to data management that lets an application retrieve and manipulate data without needing technical details about how it is formatted or where it is physically located.

A unique string of characters identifying a network resource or abstract concept, used in Linked Data as global identifiers and dereferenceable super keys.

A structured representation of real-world entities, concepts, and their interrelationships modeled as nodes and edges with formal semantic descriptions and ontologies.

A set of design principles for publishing structured data on the Web using HTTP URIs as names, standard formats (RDF), and hyperlinks to interconnect disparate data silos.

A database management system designed to support multiple data models against a single, integrated backend.

Standard application programming interfaces for accessing database management systems across diverse operating systems and programming languages.

The W3C-standard declarative language for expressing customized mappings from relational databases to RDF datasets.

The W3C standard family for data interchange on the Web, representing information as subject-predicate-object triples that form directed labeled knowledge graphs.

A database based on the relational model, organizing information into tables (relations) of rows (tuples) and columns (attributes) linked by primary and foreign keys.

Linked Data plus human- and machine-readable vocabularies that enable automated reasoning and serendipitous discovery over the Web of data.

The W3C-standard RDF query language for querying and manipulating directed labeled graph data stored in RDF.

A domain-specific language standardized by ANSI and ISO for managing data held in a relational database management system.

Knowledge Graph

KG Explorer

The argument as a graph: 39 nodes, 51 links, zero orphans. Drag a node to pin it (double-click to unpin); click a node or an edge label to open its resolver description.

39 nodes / 51 links
Physics
Predicates
Nodes & Literals
Resolver & Arrows
SPARQL

Query the Knowledge Graph

Run recipes against the collection graph - including the article's own Quad Map and R2RML exploration queries - or edit the query and open it live in URIBurner.

SPARQL workbench
Result formats: SELECT → text/x-html+tr · DESCRIBE/CONSTRUCT → text/x-html-nice-turtle
About

About This Page

This knowledge graph overview was generated from the companion Turtle (679 triples) using kg-generator and rdf-infographic-skill. The original Medium post was transformed into RDF - article sections, concepts, glossary, FAQ, HowTo, comparison matrix, and executable SPARQL recipes - then rendered as this HTML infographic powered by DeepSeek V4 Flash, running on Virtuoso.

AI Agent: DeepSeek V4 Flash (DeepSeek Harness)

Skills: kg-generator, rdf-infographic-skill

Language Model: DeepSeek V4 Flash

Server Platform: Virtuoso

Knowledge Graph: URIBurner

People

Kingsley Uyi Idehen

Organizations

OpenLink Software