What is a rule?

In the context of knowledge graphs and semantic reasoners, a rule is a declaration of a logic that adds meaning to the graph database.

Example: as humans, we know that our mothers and fathers are our parents.
So we could represent data like this:

:charlie :hasMother :alice .
:charlie :hasFather :bob .

A rule would then tell us that :hasFatherand :hasMother imply :hasParent.
There are various syntaxes in which to express this logic such as Datalog.

There are also many other concepts that can be expressed with rules, and the study of what can and cannot be expressed with rules is a well researched topic. This applies to RDFox where rules can be utilised extensively.

So why is this useful?

A rules engine (software that implements rules) allows you to reason over your data. Reasoning is an incredibly useful tool that essentially adds meaning to a graph database, allowing users to query it in easier ways and at the same time have more scope to ask more complex (and useful) questions of the data.

As it happens, reasoning makes RDFox faster too, though this is not the case with all reasoners and knowledge graphs.

Down arrow icon.