Inferensys

Glossary

Ontology-Based Data Access (OBDA)

Ontology-Based Data Access (OBDA) is a semantic data integration architecture where a global ontology provides a unified conceptual view over multiple, heterogeneous data sources, enabling querying using the ontology's vocabulary via declarative mappings.
Developer reviewing semantic search engine results on laptop, relevance scores visible, technical search demo.
ONTOLOGY ENGINEERING

What is Ontology-Based Data Access (OBDA)?

A semantic data integration architecture that provides a unified, conceptual query interface over disparate, heterogeneous data sources.

Ontology-Based Data Access (OBDA) is a semantic data integration architecture where a formal, global ontology provides a unified conceptual view over multiple, heterogeneous underlying data sources. Users and applications query this virtual layer using the ontology's vocabulary (e.g., via SPARQL), while a system of declarative mappings translates these queries into the native query languages (like SQL) of the source databases. This decouples the logical business model from the physical data storage, enabling integrated access without costly data migration.

The core components are the ontology (the global schema), the data sources (relational databases, CSV files, etc.), and the mapping definitions that link ontology concepts to source data. An OBDA reasoner uses description logic to perform query rewriting and optimization. This architecture enforces the open-world assumption, distinguishing it from traditional federated databases, and is foundational for building enterprise knowledge graphs and semantic data fabrics that require agile data virtualization.

ARCHITECTURE

Core Components of an OBDA System

An Ontology-Based Data Access (OBDA) system is a layered architecture that provides a unified, conceptual query interface over multiple, heterogeneous data sources. Its core components work together to translate high-level ontological queries into executable queries against the underlying databases.

01

Global Ontology

The global ontology is a formal, domain-specific conceptual model that provides a unified vocabulary for querying. It defines the classes, properties, and relationships relevant to the business domain (e.g., Customer, Product, purchases). This ontology acts as the single, integrated schema that users and applications query against, insulating them from the complexity and heterogeneity of the source data structures. It is typically authored in a language like OWL 2 QL, a profile chosen for OBDA due to its favorable computational properties for query rewriting.

02

Data Sources

Data sources are the underlying, heterogeneous repositories where the actual instance data resides. These are typically relational databases (e.g., PostgreSQL, Oracle), but can also include CSV files, XML documents, or REST APIs. In an OBDA architecture, these sources remain in their native formats and locations; they are not physically integrated or replicated into a central warehouse. This preserves existing investments, governance, and performance characteristics while enabling virtual integration through the ontology layer.

03

Mapping Assertions

Mapping assertions are the critical bridge that defines how the concepts in the global ontology relate to the schemas of the data sources. They specify how to populate ontology classes and properties with data from source tables, columns, and joins. Mappings are expressed in a declarative language (e.g., R2RML, Ontop's native mapping syntax) and follow a pattern:

  • Class Mapping: :Customer is populated from rows in a CUSTOMERS table.
  • Property Mapping: :purchases links a customer ID to an order ID via a SQL join between CUSTOMERS and ORDERS tables. These mappings enable the system to rewrite ontological queries into source-specific queries.
04

OBDA Engine / Reasoner

The OBDA engine is the core software component that processes queries. It performs two key functions:

  • Query Rewriting: It takes a user's query expressed in terms of the ontology (e.g., a SPARQL query) and uses the mapping rules to rewrite it into a union of SQL queries (or other target query languages) executable against the original data sources.
  • Reasoning: It performs limited ontological reasoning (e.g., exploiting subclass hierarchies defined in the ontology) during the rewriting phase to ensure all relevant data is retrieved. For example, a query for :Vehicle will also retrieve data mapped to its subclass :Car. Engines like Ontop and Mastro are specialized for this task.
05

Query Interface (SPARQL Endpoint)

The query interface is the access point for users and applications. In OBDA systems, this is most commonly a SPARQL endpoint—a standardized HTTP service that accepts queries in the SPARQL language. Users formulate queries using the vocabulary of the global ontology, without any knowledge of the underlying source schemas or SQL. The OBDA engine intercepts these SPARQL queries, rewrites them, executes the resulting source queries, and returns the unified results in a standard SPARQL results format (e.g., JSON). This provides a virtual RDF graph view of all connected data.

06

Virtual ABox / Virtual RDF Graph

The Virtual ABox (or Virtual RDF Graph) is the logical layer presented to the user. It is the set of all instance data (ABox assertions) that appears to exist as a single, queryable RDF graph. This graph is not materialized; it is generated on-the-fly by the OBDA engine through the mapping definitions. When a SPARQL query is executed, the engine dynamically retrieves data from the sources and presents it as if it were a native RDF knowledge base. This virtual approach avoids the massive ETL overhead of physical integration while providing the same unified query capability.

ARCHITECTURE

How Ontology-Based Data Access Works

Ontology-Based Data Access (OBDA) is a semantic integration architecture that provides a unified, conceptual view over disparate and heterogeneous data sources.

Ontology-Based Data Access (OBDA) is a semantic integration architecture where a global ontology provides a unified conceptual view over multiple, heterogeneous data sources. A mapping layer defines declarative correspondences between the ontology's vocabulary and the schemas of the underlying sources, which can be relational databases, CSV files, or APIs. A query engine then rewrites high-level queries expressed in terms of the ontology (e.g., using SPARQL) into a series of optimized queries over the native data sources, executing them and returning integrated results. This decouples the logical business model from the physical data storage, enabling users to query 'what' they need without knowing 'where' or 'how' the data is stored.

The core mechanism relies on query rewriting and reasoning. When a user submits a conceptual query, the OBDA system uses the ontology's axioms (like subclass hierarchies) and the mappings to unfold the query into a union of source-specific queries. This process can infer implicit facts, such as retrieving all subclasses of a requested concept. The architecture operates under the open-world assumption, meaning missing data is not assumed false. This is crucial for integrating incomplete sources. OBDA is foundational for building Enterprise Knowledge Graphs and enabling semantic data fabrics, providing deterministic, logic-based access to an organization's entire data landscape.

ARCHITECTURAL COMPARISON

OBDA vs. Traditional Data Integration

This table contrasts the core architectural principles, implementation processes, and operational characteristics of Ontology-Based Data Access (OBDA) with traditional Extract, Transform, Load (ETL) and data warehousing approaches.

Architectural FeatureOntology-Based Data Access (OBDA)Traditional ETL / Data Warehousing

Core Paradigm

Virtual Integration via Mappings

Physical Consolidation via Pipelines

Primary Output

Unified Conceptual View (Ontology)

Physical Data Store (Warehouse/Lake)

Query Processing

Query Rewriting & Decomposition

Direct Execution on Stored Data

Data Freshness

Real-time / On-Demand

Batch / Scheduled Refresh

Schema Evolution

Low Impact; Mappings Updated

High Impact; Pipelines & Schemas Redesigned

Reasoning & Inference

Open-World Assumption

Primary Development Artifact

Ontology & Declarative Mappings

ETL Code & Physical Schema DDL

Initial Implementation Complexity

High (ontology & mapping design)

Medium (pipeline & schema design)

Long-Term Maintenance Complexity

Low (centralized logic)

High (distributed pipeline logic)

Handling Source Heterogeneity

High (abstracted by ontology)

Medium (requires homogenization)

PRACTICAL APPLICATIONS

Enterprise Use Cases for Ontology-Based Data Access (OBDA)

Ontology-Based Data Access (OBDA) provides a unified semantic layer over disparate data sources. These cards detail its core enterprise applications, demonstrating how OBDA solves specific integration and intelligence challenges.

01

Regulatory Compliance & Reporting

OBDA systems streamline complex regulatory reporting (e.g., Basel III, GDPR, MiFID II) by providing a single, authoritative conceptual model for risk and customer data scattered across legacy systems. Competency questions like "Show all transactions for customer X involving high-risk jurisdictions in the last quarter" can be expressed in the ontology's terms. The OBDA engine uses mappings to rewrite this into queries against the underlying transaction databases, CRM, and KYC systems, automating report generation and ensuring consistency. This reduces manual reconciliation and audit preparation time from weeks to days.

70%
Reduction in manual reconciliation
02

Unified Customer 360 View

Enterprises use OBDA to create a holistic customer profile without physically migrating data from siloed sources. A domain ontology defines concepts like Customer, Product, SupportTicket, and Purchase. R2RML mappings link these to tables in the CRM (Salesforce), support desk (Zendesk), and e-commerce database. A business analyst can then query for "customers who purchased product Y, opened a high-priority ticket within 30 days, but did not receive a follow-up call." The OBDA query rewriting process federates queries across the live source systems, presenting a virtual, integrated view that powers personalized marketing and proactive customer service.

03

Semantic Data Integration for M&A

During mergers and acquisitions, OBDA accelerates the integration of disparate IT landscapes. Instead of a costly, multi-year ETL project to create a single physical data warehouse, companies deploy a global ontology that abstracts the core business entities of both organizations. Ontology alignment techniques create mappings between each company's legacy schemas and this new unified model. This allows for immediate cross-company reporting and analysis (e.g., comparing supply chain performance or product portfolios) through semantic queries, providing business value during the critical post-merger integration phase while a longer-term technical consolidation proceeds.

04

Intelligent Supply Chain Visibility

OBDA provides real-time, contextual visibility across complex supply chains involving multiple ERPs (SAP, Oracle), warehouse management systems, IoT sensor streams, and partner data. An upper ontology for Event, Location, and Material is extended with a domain ontology for logistics. SPARQL queries ask "Find all shipments containing component A that are delayed due to a port closure and identify alternative suppliers within 500km of the destination." The OBDA system reasons over the ontology, understands the relationships between delays, locations, and parts, and retrieves answers from the mapped sources, enabling dynamic rerouting and risk mitigation.

05

Clinical & Biomedical Research

In healthcare and pharma, OBDA enables federated querying over heterogeneous clinical databases, genomic repositories (like dbGaP), and published literature, all while respecting data sovereignty. A rich biomedical ontology (e.g., SNOMED CT, HPO) serves as the global schema. Researchers can pose complex queries such as "Find patients diagnosed with condition C, who have genetic variant V, and were prescribed drug D, along with reported outcomes from clinical trials." The OBDA engine, operating under a federated learning-like privacy paradigm, executes sub-queries against each authorized source, returning aggregated, anonymized results that accelerate cohort discovery and translational research without moving sensitive patient data.

06

Enhanced Graph-Based RAG

OBDA acts as a deterministic grounding layer for Retrieval-Augmented Generation (RAG) architectures. Instead of a vector database retrieving potentially hallucinated text chunks, the knowledge graph populated via OBDA provides verified facts and relationships. A user asks a natural language question, which is translated into a SPARQL query over the enterprise ontology. The OBDA system retrieves precise, structured answers from the underlying mapped data sources. This context, rich with entities and their formal relationships, is then passed to the LLM for synthesis, ensuring the generated response is factually accurate and traceable back to source systems, dramatically reducing hallucinations.

ONTOLOGY-BASED DATA ACCESS

Frequently Asked Questions

Ontology-Based Data Access (OBDA) is a semantic integration architecture that provides a unified, conceptual query interface over disparate, heterogeneous data sources. These questions address its core mechanisms, benefits, and implementation for enterprise data architects and CTOs.

Ontology-Based Data Access (OBDA) is a semantic data integration architecture where a global, formal ontology provides a unified conceptual view over multiple, heterogeneous data sources, enabling users to query all data using the ontology's vocabulary while a system automatically translates queries into the native query languages of the underlying sources.

In practice, an enterprise might have customer data in a SQL database, product specifications in XML files, and supplier information in a NoSQL store. Instead of writing complex, source-specific join logic, a data architect defines an ontology that models core concepts like Customer, Order, and Product. Mappings are then created that link ontology classes and properties (e.g., purchasedProduct) to the actual fields in each source (e.g., ORDERS.PROD_ID). A user or application submits a SPARQL query asking for "all customers who purchased products from a high-risk supplier." The OBDA system (or reasoner) uses the mappings to rewrite this high-level query into a set of optimized source-specific queries (SQL, XQuery, etc.), executes them, and integrates the results back into the ontology's conceptual framework for a unified answer.

Prasad Kumkar

About the author

Prasad Kumkar

CEO & MD, Inference Systems

Prasad Kumkar is the CEO & MD of Inference Systems and writes about AI systems architecture, LLM infrastructure, model serving, evaluation, and production deployment. Over 5+ years, he has worked across computer vision models, L5 autonomous vehicle systems, and LLM research, with a focus on taking complex AI ideas into real-world engineering systems.

His work and writing cover AI systems, large language models, AI agents, multimodal systems, autonomous systems, inference optimization, RAG, evaluation, and production AI engineering.