Importing Data into RDFox

Felicity Mulford
May 13, 2020 · 3 min read

RDFox ingests data in the open standard RDF-triple format which can be imported, written from scratch, or easily converted to from SQL or CSV sources.

Once triples have been imported, they are available for querying and reasoning. Additionally, triples can be scheduled for incremental addition and incremental deletion, which makes them available for incremental reasoning.

Thus, triples can be added programatically, read from files of certain formats, or extracted from an OWL 2 DL ontology.

Converting data to RDF-triple format

Converting data to RDF-triple format requires establishing a mapping pattern between the data source and the desired graph structure. The following provides an example of a mapping pattern for data in sql/csv format:

This mapping is done in a two stage process using rules:

  • The first step is to attach the datasource to RDFox as a relation. For example, each row of a table would become a table “type” relation and each column would become an argument of the relation.
  • The second step is to map the arguments of the relation to the desired graph structure with rules.

In the following example, a company’s employee table is first converted to an employee relation and then mapped to the desired graph structure using a rule.

The materialisation of the following rule will generate the graph from the relation:

[?x, a,         :employee] , 
[?x, :worksfor, :company] ,
[?x, :hasName, ?y] ,
[?x, :hasJob, ?z] :-
fg:employee(?x , ?y , ?z) .

The flexibility of rules means it is possible to import data from different data sources into a the graph by first populating the binary relations in the graph as well as creating new ones.

THE MANDATORY ATTRIBUTE PATTERN

Data can sometimes be incomplete especially when importing it from new data sources. RDFox can identify missing values or fill them in using a user defined strategy. This strategy can be applied during or after the import which improves the quality of the data.

For converting data to RDF-triples from XML or Json, contact us at info@oxfordsemantic.tech. For more information, to request a demo, or to start a free trial, click here.

Team and Resources

The team behind Oxford Semantic Technologies started working on RDFox in 2011 at the Computer Science Department of the University of Oxford with the conviction that flexible and high-performance reasoning was a possibility for data intensive applications without jeopardising the correctness of the results. RDFox is the first market-ready knowledge graph designed from the ground up with reasoning in mind. Oxford Semantic Technologies is a spin out of the University of Oxford and is backed by leading investors including Samsung Venture Investment Corporation (SVIC), Oxford Sciences Innovation (OSI) and Oxford University’s investment arm (OUI). The author is proud to be a member of this team.

Photo credit: Chuttersnap

Oxford Semantic Technologies

A high performance knowledge graph and semantic reasoning engine

Oxford Semantic Technologies

Oxford Semantic Technologies develop RDFox, the first market-ready high-performance knowledge graph designed from ground up with semantic reasoning in mind. Founded in 2017 as a spin-out of the University of Oxford with a mission to bring cutting-edge research to industry.

Felicity Mulford

Written by

Employee at Oxford Semantic Technologies and Ox Mountain. OST have developed RDFox, a high performance knowledge graph and semantic reasoning engine.

Oxford Semantic Technologies

Oxford Semantic Technologies develop RDFox, the first market-ready high-performance knowledge graph designed from ground up with semantic reasoning in mind. Founded in 2017 as a spin-out of the University of Oxford with a mission to bring cutting-edge research to industry.