# Ontop lets you query a relational database with SPARQL and move nothing

> Ontop is a virtual knowledge graph system. It exposes the content of arbitrary relational databases as RDF knowledge graphs, and translates SPARQL queries over those graphs into SQL that the database itself runs. The data stays where it is, which is the whole point, and the mapping from tables to triples is written in R2RML rather than in a data migration script.

**ontop/ontop** — Ontop is a platform to query relational databases as Virtual RDF Knowledge Graphs using SPARQL

- Repository: https://github.com/ontop/ontop
- Website: https://ontop-vkg.org
- Stars: 1,016 · Forks: 212
- Language: Java
- License: Apache-2.0
- Published: 2026-10-20 · Updated: 2026-10-20 · Language: en
- Canonical page: https://hysenlabs.com/projects/ontop-ontop

## A knowledge graph that is really a view over your tables

The one line definition in the README is that Ontop is a virtual knowledge graph system, and it exposes the content of arbitrary relational databases as knowledge graphs. The adjective that matters is virtual, and the documentation explains it by saying the data remains in the data sources instead of being moved to another database. So when you write a SPARQL query against a virtual graph, you are not reading a triple store, you are reading the operational database through a translation layer. That framing explains the shape of everything else. There is no ingestion pipeline to run, no copy to keep in sync, and no separate backup story, because the authoritative copy was never duplicated. It also explains the performance profile. A virtual graph is only as fast as the SQL it generates, so the interesting engineering is in how well the query planner can push your graph pattern down into the database rather than materialising triples in memory.

## SPARQL on the way in, SQL on the way out

The translation is the product. Ontop takes SPARQL queries expressed over the knowledge graphs and converts them into SQL queries executed by the relational data sources. The queries are the standard W3C SPARQL 1.1 queries, so the language is not a dialect, and the output is ordinary SQL that the database optimises as it would any other statement. The mapping between the two worlds is done with R2RML, the W3C standard for describing how relational rows become RDF triples, and Ontop can also take advantage of lightweight ontologies, which is how a schema with a small vocabulary gets better inference and better query rewriting than a schema with none. The combination is what makes this an OBDA system rather than a query translator, since the mapping says what a table column means in graph terms and the ontology says what those terms mean to each other.

## Building it is Maven, and the wrapper is in the repository

The project is a Maven project, and the documentation says that compiling, running the unit tests and building the release binaries can all be done with Maven, currently using Maven 3.6 or newer and Java 11 to build. The repository carries the Maven wrapper in the form of `mvnw` and `mvnw.cmd`, so a contributor does not need a matching Maven installation, and there are `build-release.sh` and `build-release.cmd` scripts at the top level for the packaging step. The release artefacts are published to Maven Central under the group `it.unibz.inf.ontop` and the artefact `ontop`, so the system is consumable as an ordinary Java dependency, and there is also a Docker image published to Docker Hub as `ontop/ontop`. The presence of a `.sdkmanrc` file is a small and friendly detail, since it pins a JDK version for anyone who uses SDKMAN.

## The module layout shows where the work actually happens

The top level of the repository is a list of the parts of the system, and it is a useful map. There is a `core/` directory for the shared foundations, an `engine/` for the query processing, a `mapping/` directory for the R2RML handling, an `ontology/` directory for the ontology reasoning, a `binding/` directory for the API bindings, a `client/` directory for the clients, a `db/` directory for the database support, a `protege/` directory for the Protégé plugin, a `test/` directory, a `documentation/` directory and a `build/` directory, plus a `licenses/` directory that records the third party licences. The `db/` directory is equally important in practice, since the quality of the generated SQL depends on how well each dialect is handled.

## Two branches, two build pipelines, one project

The README carries a table of branches with their build status, and there are two of them, `master` and `version5`, each with its own build badge. That is unusual for a project of this size and tells you the maintainers are carrying a development line and a released line at the same time, so an adopter has to choose which one to build from. The default branch for the repository is `version5`, which suggests the version 5 line is where the current work is, and the release list supports that reading, with Ontop 5.5.0 published on 2026-02-14, 5.4.0 in September 2025 and 5.3.1 a day later. Downloads are offered from a SourceForge project that predates the GitHub repository, and the Docker Hub image is the easiest way to try the thing without a JVM toolchain, while the Maven Central artefact is the right one for embedding.

## An academic project with a commercial arm, and two licences

The organisational section is short and unusual for a repository README. Ontop is backed by the Free University of Bozen-Bolzano, the research group behind the project, and by Ontopic s.r.l., a company that works on the technology, and it also receives regular and important contributions from Birkbeck, University of London, and from Southeast University. So the governance is a university group, a company and two academic contributors, which is a good description of how much of the knowledge graph and OBDA world still gets built. The licence section has two parts, and the code is under the Apache License 2.0, with the notice in the README reading:

```
  Copyright (C) 2009 - 2025 Free University of Bozen-Bolzano

  Licensed under the Apache License, Version 2.0 (the "License");
```

The documentation is separately licensed under Creative Commons Attribution 4.0, which is the sensible split for a project whose written material is often more useful than its code, since a query tutorial can be reused with attribution. The long copyright range, 2009 to 2025, is the other thing worth noticing, since it tells you this is a project with a long history rather than a recent arrival.

## Conclusion

Ontop suits an organisation that has a large relational estate and a need for a semantic layer over it, since the alternative is duplicating every table into a triple store and keeping the two in step, and it suits a data science team that wants to hand a SPARQL endpoint to people who do not write SQL. It is a poor fit for a small schema with no ontology ambitions, since a query layer that translates to SQL adds planning work for a problem a view would solve, and it is a poor fit if you want the data to leave the database, because that is the one thing it is built not to do. Before you deploy it, check three things: whether your database dialect is supported, which the documentation covers in detail, how the query planner pushes filters down, because an OBDA system that cannot push a predicate into SQL will read the whole table, and where the mapping files live, since they are the artefact you will actually maintain.

## FAQ

### What is Ontop and what does it do?

Ontop is a virtual knowledge graph system that exposes the content of arbitrary relational databases as knowledge graphs without moving the data. It translates SPARQL queries over those graphs into SQL executed by the relational data sources, relying on R2RML mappings and able to use lightweight ontologies.

### How do I build Ontop?

It is a Maven project built with Maven 3.6 or newer and Java 11, and the repository includes the Maven wrapper scripts, so `mvnw` and `mvnw.cmd` are there for contributors. The release artefacts are published to Maven Central under the group it.unibz.inf.ontop and the artefact ontop, and there is a Docker image on Docker Hub as ontop/ontop.

### What are R2RML mappings in Ontop?

They are the W3C standard descriptions of how rows in relational tables correspond to RDF triples, and Ontop relies on them to translate SPARQL into SQL. Combined with lightweight ontologies, they are what let a query over a virtual graph produce sensible SQL against an ordinary database.

### Which licence applies to Ontop?

The framework is under the Apache License 2.0, with the notice reading Copyright (C) 2009 - 2025 Free University of Bozen-Bolzano, and the documentation is separately licensed under Creative Commons Attribution 4.0.

### Who maintains Ontop?

It is backed by the Free University of Bozen-Bolzano and by Ontopic s.r.l., and it receives regular contributions from Birkbeck, University of London, and from Southeast University. The release list shows Ontop 5.5.0 from 2026-02-14, with the repository's default branch being version5.

## Sources

- [License: Apache-2.0](https://github.com/ontop/ontop/blob/version5/LICENSE)
- [ontop/ontop on GitHub](https://github.com/ontop/ontop)
- [Project website](https://ontop-vkg.org)
- [README](https://github.com/ontop/ontop/blob/version5/README.md)
- [Releases](https://github.com/ontop/ontop/releases)

---

Hysen Labs editorial analysis, written from the project's own repository and release notes. Cite the canonical page: https://hysenlabs.com/projects/ontop-ontop
