Ontology Design for Data Integration

Ontology Design for Data Integration

An ontology is an explicit, shared specification of the concepts and relationships in a domain. In a data integration project it does two jobs: it gives independently produced datasets a common vocabulary, and it states the constraints that make the combined data coherent. Neither job is served by a large diagram that nobody uses. The useful ontology is the smallest set of terms and axioms that answers the project's questions and can be maintained.

Design is a sequence of decisions about scope, reuse, identity, constraints and versioning. This article applies them to an alignment between two datasets and lists the mistakes that most often make an integration ontology unworkable.

What ontology data integration requires

Integration happens at three layers: lexical (labels, definitions and examples), conceptual (classes, properties and relationships) and axiomatic (disjointness, cardinality, domain, range and keys). A vocabulary with only the first layer is a glossary; one with all three can support validation and inference.

The integration scenario determines how much of the ontology is needed. A data warehouse can centralise the model and transform sources into it. A federation keeps sources in place and maps queries. A linked data publication exposes its own terms and aligns them to external ones. The last case needs stable IRIs and alignment statements more than it needs a single global schema.

Reuse is the default. RDF, RDFS and OWL provide the base vocabulary; SKOS covers concept schemes, Dublin Core bibliographic metadata, FOAF people, ORG organisational structure, PROV-O provenance and GeoSPARQL geometry. schema.org supplies widely understood terms for web data. Minting a local term is justified when no reused term has the right meaning, not when the local term is merely more convenient.

Design decisions for ontology data integration

  1. Scope and competency questions. Write the questions the ontology must support and the expected answer shape. A competency question that cannot be expressed as a query over the proposed terms is either out of scope or evidence that a term is missing.
  2. Reuse before invention. Check existing vocabularies before defining a class or property. If a reused term is close but not exact, a subclass or subproperty can express the local refinement without changing the external meaning.
  3. IRI policy. Choose a namespace the organisation controls and can keep resolving. Separate the ontology IRI from the term IRIs and give each release a version IRI. Never encode mutable facts in an identifier.
  4. Class or individual. Model stable kinds as classes and particular things as individuals. A state such as "available" is usually a property value or a status individual, not a class whose membership changes every hour.
  5. Open-world constraints. OWL axioms support inference under the open world assumption. They do not reject an incomplete record in the way a database constraint does. Use SHACL or SPARQL constraints for closed validation, and keep the OWL axioms for meaning.
  6. Identity and equivalence. Decide when two resources are the same. owl:sameAs asserts full identity and is symmetric and transitive. skos:exactMatch links equivalent concepts across schemes and is also transitive; skos:closeMatch is a weaker, non-transitive link. A probable match should not be promoted to identity without evidence.
  7. Versioning, deprecation and documentation. Publish version IRIs, keep old terms resolvable, mark withdrawn terms as deprecated, and record the scope, examples and known limitations. A consumer that cites a term should not discover the meaning changed silently.

A worked alignment

A university publishes a staff directory with ex:Employee, ex:staffId, ex:name, ex:department and ex:email. A publisher publishes an author database with ex:Author, ex:authorId, ex:fullName and ex:affiliation. The integration goal is to answer which departments have authors publishing with a given publisher.

The alignment reuses FOAF for people, ORG for organisations and Dublin Core for identifiers. Subclass and subproperty statements connect the local terms to the reused ones, so a query written against FOAF or ORG can see the local data without rewriting the source.

@prefix ex: <http://example.org/> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix org: <http://www.w3.org/ns/org#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .

ex:Employee rdfs:subClassOf foaf:Person .
ex:fullName rdfs:subPropertyOf foaf:name .
ex:department rdfs:subPropertyOf org:memberOf .
ex:staffId a owl:DatatypeProperty ;
    rdfs:domain ex:Employee ;
    rdfs:range xsd:string .

Under RDFS entailment, the subclass statement means that every employee is inferred to be a person, and the subproperty statement means that a query for foaf:name also returns values asserted with ex:fullName. The domain and range statements are inference rules in OWL, not validation constraints: they allow a reasoner to infer the type of a subject or object, and they do not reject a record that omits a type. If the project needs a hard check, it belongs in a SHACL shape.

Email requires care. foaf:mbox expects an IRI, typically a mailto: IRI, while the source may store an address as a plain string. Either mint a mailto: IRI during mapping or keep a local datatype property and align it later. Mapping a string directly to foaf:mbox produces a literal where an IRI is required, which is a conformance error that a reasoner may not report.

Identity is the dangerous part. A staff member and an author are the same person only with evidence such as an ORCID, an institutional email or a staff identifier present in the publication record. If the evidence is conclusive, owl:sameAs is appropriate. If it is probable, a local ex:probableMatch with a confidence value and provenance keeps the claim reviewable. A false sameAs merges every statement about two people, including their publications and affiliations.

Name-based matching alone produces false positives. Two people called J. Smith in the same department are not necessarily the same person, and a shared name across institutions is weaker evidence still. Blocking on email domain and ORCID, followed by manual review, is slower but defensible. The resulting graph can answer the department query with a join across org:memberOf and the publication's publisher link, counting distinct people rather than rows.

Common modelling mistakes

  • Class explosion. Defining a class for every combination of type and status makes queries brittle. Prefer a small number of classes with properties for the varying dimensions.
  • OWL restrictions as database constraints. A cardinality restriction does not behave like NOT NULL under the open world assumption. Use SHACL for closed validation.
  • sameAs sprawl. Linking every similar resource to every other merges distinct entities and creates expensive chains. Reserve identity for confirmed matches.
  • Encoding hierarchy in IRIs. A path such as /employee/senior/ is not a subclass relation. Use rdfs:subClassOf so that queries and reasoners can use the hierarchy.

Validating the design

Validation has two targets: the ontology and the data that uses it. For the ontology, run a reasoner to detect unsatisfiable classes and unintended inferences, and write the competency questions as SPARQL queries with expected results on a sample. For the data, use SHACL shapes or SPARQL constraints to test required properties, datatypes and cardinalities. Review the terms with domain experts, because a technically valid ontology can still use the wrong word for a concept.

Keep the tests with the ontology and run them at every release. A query that returned results and now returns none is a regression even if every file parses. Record why a term was reused, why a local term was minted, and which alignment was rejected. The data quality process supplies the measurements; the ontology supplies the meaning against which they are measured.

An ontology is an agreement about meaning. The diagram is only a representation of that agreement; the tests, mappings and documentation are what make it hold. The linked data principles determine how the terms are published, RDF and SPARQL determine how they are queried, and the knowledge graph is where the agreement is tested against real data.


Testimonials

Dr. Mateja Verlič (Zemanta d.o.o., R&D)

We read a lot about people doing important things, however this time we – LOD2 partners – are the ones changing the history of Web by revolutionizing information use and reuse, contributing to semantic data standards and pushing the limits of almost every WWW-related aspect (sc… read

Dr. Jens Lehmann (Universität Leipzig, Research Group Leader)

The size and number of Semantic Web knowledge bases published as Linked Open Data has been growing tremendously over the past years. The LOD2 project will be a key factor for sustaining this momentum. More importantly, the quality of knowledge bases and the scalability of methods accessing… read

Jindřich Mynarz (University of Economics, Czech Republic)

Apart from being legally open, linked open data is an open technology. Due to its non-exclusive, non-proprietary, well-formalized, and standards-based nature, linked open data supports a wide spectrum of uses. It does not exclude any application from using it and thus it is open to be mixe… read

Dr. Mladen Stanojevic (Institute Mihajlo Pupin, Serbia)

The richness of any semantic model and the usability of represented data is dependent on the links between them. LOD2 is an important step in this direction that will enable an efficient exploration and processing of vast quantity of open data on the Web.

read

Mun Yong Yi (Korea Advanced Institute of Science and Technology (KAIST))

Data becomes more meaningful and powerful as they are linked and integrated. As I learn more about what LOD can do, I am convinced that it will not only change the future of the Internet but also the quality of human life. I am glad that I am participating in this project, which will defin… read

Orri Erling (OpenLink Software, Virtuoso Program Manager)

Value from information increasingly depends on integration. RDF is a great model for this. LOD2 will make RDF a cost competitive alternative in the database space, without compromising ad hoc flexibility and expressive power. read

Vojtech Svatek (University of Economics, Czech Republic)

As researcher in ontological engineering, I am excited to see LOD2 provide tools that make the generation of semantically structured data easy and thus widespread. I believe that ontological research is deemed to build upon the world views already expressed by means of simpl… read

Andreas Blumauer (Semantic Web Company, CEO)

15 years ago we all were excited when we published HTML for the first time and it didn't take a long time until all of us were "on the internet". Now we are starting to publish data on the web. Based on semantic web technologies professional data management will be possible in distributed … read

Kingsley Idehen (OpenLink Software, CEO)

Three years ago, OpenLink Software enthusiastically contributed the prowess of Virtuoso to the grassroots effort that lead to DBpedia and the Linked Open Data cloud that coalesced around it. Today, we are both honored and enthusiastic about Virtuoso's critical infrastructure role in this n… read

Bastiaan Deblieck (TenForce, Partner and Business Development Manager)

An internet of data opens up tremendous opportunities for our corporate and government customers. We intend to be on the forefront of this evolution. read

Christian Dirschl (Wolters Kluwer, Content Architect)

Linked (Open) Data will change the existing publishing paradigms! Creating high quality content for professional usage will remain an important factor in future publishing, but additional access points and new usage environments will equally define its success. read

Dr. Giovanni Tummarello (National University of Ireland, Galway, Research Unit Leader)

Semantic Markups on the Web could drive information reuse to enable scenarios and applications which we can now only dream of. The idea is extraordinarely compelling, but we know now it won't simply realize itself. The LOD2 project is now a great opportunity for inspired and coordinated re… read

Gregory Grefenstette (Exalead, Chief Science Officer)

Enterpise search is all about providing correct, complete, and appropriate information to the employee and decision maker. LOD2 promises to not only allow internal company information to be linked up to the growing amount of Open Data on the web, but to also provide the mechanisms for val… read

Hugh Williams (OpenLink Software)

It is exciting to see the LOD2 project finally kick off in its quest to take the Linked Open Data cloud to the next level of scalability, performance and integration for the exploitation of the Web as a viable platform for enterprise level data and information integration. read

Martin Kaltenböck (Semantic Web Company, CFO)

Linked (Open) Data technologies offer a new way of data integration for the enterprise! Smooth interoperability between internal data sets can reduce costs as well as the enrichment of these data sets by external data can support new market intelligence paradigms for a better decision making. read

Dr. Peter Boncz (Centrum Wiskunde & Informatica)

The publishing of ever more datasets by e.g. governments adds value for many key applications including business intelligence, which will drive the Linked Open Data (LOD) paradigm going forward. In the LOD2 project, CWI is working to increase the scalability and performance of querying int… read

Dr. Sören Auer (Universität Leipzig, LOD2 coordinator)

The Linked Data paradigm is a simple and efficient way for integration of heterogeneous information on the Web. Ultimately, we will, for example, be able to search for a new appartment and a close-by available spot in child care in one go. read

Tassilo Pellegrini (Semantic Web Company, R&D)

Semantic interoperability changes the technological and economic nature of metadata opening up exciting opportunities for value creation in various comercial and non-commercial areas. Linked Data is the blueprint for this new ecosystem and it will change the way we think about and use the web today. read

Wouter Dewanckel (TenForce, WP Project Leader)

It is an honor to take part in this challenging integration project to create solutions that can generate business value out of emerging technologies. read