What is the difference between an Ontology and a Business Rule?
This is a question we often get. In this article we will explain both concepts, and show you how they are interrelated. In short, an Ontology defines the structure and meaning of the type of things (entities) within a domain, whereas Business Rules define or constrain the behavior of those things.
Before we will go into the details, let’s first try to define both topics.
What is an Ontology?
An Ontology is: a model that defines the type of things (entities) that exist in a domain, the properties (attributes) that can be used to describe them, and the relationships between those things. An Ontology is quite static and abstract by nature. For instance, an Ontology does not contain actual data about instances of entities. That is where the term Knowledge Graph comes into play. When you build a data set containing actual instances of the type of things defined in an Ontology, you end up with a Knowledge Graph! But a Knowledge Graph only passively stores data; when data is added there is no reaction to be expected, and the structure of the Ontology is not actively guaranteed. This is where Business Rules come in the picture.
What is a Business Rule?
A Business Rule is: a definition of the behavior of the type of things (entities) in a domain that is expected or prohibited under specified conditions. So a Business Rule is more dynamic by nature, but still quite abstract. If you don’t have a system that automatically executes the Business Rules for you, still nothing happens when you enter data into your Knowledge Graph. So we need to add a Business Rule Engine that can add dynamic behavior, and guarantee that the data of our domain follows the structure as defined in our Ontology.
Combining an Ontology with Business Rules
Hapsah is an Ontology driven Knowledge Graph and Business Rule Engine in one. So you can define both an Ontology and a set of Business Rules for a domain.
Define your Ontology
Defining your Ontology in Hapsah is done in three steps:
Define your Business Rules
Writing a Business Rule in Hapsah is done in four steps:
If you are interested in more detailed explanations, we have tutorials for each of the steps mentioned above: https://www.hapsah.org/tutorials/
We also have a Quick start tutorial, Hello world style: https://www.hapsah.org/hello-world/