Mapping and knowledge graphs
Photo by Tomas Sobek on Unsplash
by Benjamin Cogrel, last update: 19 April 2023 (3 min read)

Why using mappings for building a knowledge graph

Benjamin Cogrel, co-founder and CTO of Ontopic. Benjamin has 8 years of practical and research experience in building and deploying knowledge graphs. He is also one of the core developers of Ontop, the leading open-source virtual knowledge graph engine.

Learn about the opportunities mappings open for data integration and what we are missing when we don’t use them in the process of building a knowledge graph.

If you are designing knowledge graphs and not using the mapping approach, you might be missing something.

Data integration projects, building knowledge graphs included, always get to the milestone challenge of combining data from different sources into a semantic layer.

Mappings are great for building semantic layers, which are essentially unified schemas tailored for presenting data to business users in terms they are familiar with.

In this article, you will find an explanation of why mappings are beneficial for your knowledge graph projects.

What Is The Role Of Mappings?

In the case of a relational data source, a mapping connects tables and columns from the data source to the components of the semantic layer; for a knowledge graph as a semantic layer, these components are classes and properties.

When you map a table to a class, each row in this table corresponds to an element in the knowledge graph.

You can use the same class to map other tables from other data sources, and this way, data is getting integrated. The class can then be used to query data coming from different sources, and you do not need to know where it comes from.

For instance, the user does not need to know that measurements are coming from 125 different tables provided by 32 data providers. Instead, they simply ask for instances of the class Measurement.

Key benefits of the mapping approach

Mappings are a solid foundation for integrating data. They offer three essential benefits to make knowledge graph construction more productive and agile:

  • Trace back data quality issues faster

    Mapping is metadata you can search and explore. It contains provenance information, which is key for tracing sources of data quality issues. You want to know if data quality issues come from the data sources or if they have been introduced later in the knowledge graph building process.

    For example, you observe that the names of persons are not always consistent in your knowledge graph, as the surname sometimes appears before the first name.

    With a mapping, you can easily search for the definitions of names in your knowledge graphs and only keep the ones corresponding to persons (e.g., no organizations and products).

    Then you can check them individually to see if the problem lies in the mapping (e.g., the first and surname are concatenated in the wrong order) or comes from the source (e.g., the full name column it provides is not consistently ordered). Previewing data is key for quickly diagnosing these issues.

    Without a mapping, tracing data quality issues is more challenging because searching into imperative code is difficult and data previewing is not always possible.

  • Build a hybrid or a virtual knowledge graph

    When the knowledge graph is built with imperative code, it can only be materialized.

    You are basically missing the opportunity to keep the knowledge graph virtual, as having a mapping is the foundation of a virtual knowledge graph.

    The mapping approach gives you the opportunity to have a hybrid approach to knowledge graphs; you can decide which part of your data to materialize into a triplestore and which part to keep virtual.

  • Deploy on the platform of your choice

    When you map with standard mapping syntax like R2RML, you are not bound to a specific platform.

    In the case of R2RML (the W3C standard for mapping relational databases to knowledge graphs), you have a wide choice of deployment platforms spanning from virtual platforms like Ontop to triplestores and hybrid platforms.

An environment for mapping

With proper environment, the mapping approach will boost productivity when integrating data into large knowledge graphs.

At Ontopic, we have developed Ontopic Studio precisely for this purpose. It is an environment where you can design your knowledge graph through mappings with no code.

In the next post of this series, you will see a list of key criteria for choosing the mapping solution that suits you the best.

Afterward, you will learn how to build a mapping through the list of the most common patterns.

Register for a trial version of Ontopic Studio and start designing your knowledge graph.

Get a demo access of Ontopic Studio

Ready to do mapping with a no-code approach? Let us help you. Get a demo access:


We'll never share your email with anyone else.
Please supply a valid email address

From time to time we send updates.