Building A Knowledge Graph With TypeDB
Building A Knowledge Graph With TypeDB
Building A Knowledge Graph With TypeDB
Abstract
• Reasoner : An engine that can perform deductive logic over the knowl-
edge database to infer knowledge that would otherwise be hidden.
1
Building a Knowledge Graph With TypeDB
2
Building a Knowledge Graph With TypeDB
3
Building a Knowledge Graph With TypeDB
4
Building a Knowledge Graph With TypeDB
Figure 2 This type hierarchy describes an entity of type person that is sub-
typed by the types student and teacher. There are two types of students,
undergrads and postgrads, and there are two types of teachers, supervisors,
and professors.
5
Building a Knowledge Graph With TypeDB
6
Building a Knowledge Graph With TypeDB
7
Building a Knowledge Graph With TypeDB
Figure 4 In this figure, the person “Alice” plays the role of wife and the person
“Bob” plays the role of husband in a marriage relation. Marriage is a nested
relation, as it also plays the role of located in a location relation, where the
city “London” plays the role of locating in that same relation
8
Building a Knowledge Graph With TypeDB
rule transitive-location:
when {
(located: $x, locating: $y) isa location;
(located: $y, locating: $z) isa location;
} then {
(located: $x, locating: $z) isa location;
};
Figure 5 In this example, the borough “Camden” is located in the city “Lon-
don”, which is located in the country “UK”.
Even though camden and uk are not directly connected, TypeDB will
infer that since camden is located in london, that also means that camden is
located in the uk with this query:
(located: $camden, locating: $uk) isa location;
9
Building a Knowledge Graph With TypeDB
10
Building a Knowledge Graph With TypeDB
5 Conclusion
TypeDB’s expressive data model allows it to serve as a knowledge database
that captures context and semantics when storing knowledge, while its built-
in reasoner enables it to discover new facts by creating logical abstractions
of data. Therefore, it meets our definitions of a true Knowledge Graph, and
is built with commercial usability in mind.
11