
 
Expert (JBoss Community, 2012) is used to describe 
the integrity rules as an alternative approach. 
However, the conceptual schema is still the ORM. 
This paper presents a method for managing 
enterprise integrity constraints using ORM 
constraints combined with the Drools Expert to 
model a domain conceptual schema and its relevant 
business rules. These rules are stored separately 
from the applications. Other rules which are not 
already modeled in ORM conceptual schema can be 
defined using separate production rules. In order to 
encourage more users to adopt this approach in 
practice, we present some mapping from ORM 
constraints to production rules as well as 
implementation details of the rules in the Drools 
environment.
 
2 OBJECT-ROLE MODELING 
(ORM) 
Object-Role Modeling (ORM) is a method used to 
model information systems at the conceptual level. 
For simplicity, it uses natural language to build a 
formal model of universe of discourse (UoD) of the 
application area. In addition, in the ORM model, the 
information is expressed in elementary relationships 
(fact types or reference types) which cannot be split 
up into two or more simpler relationships without 
information loss. Therefore, transformation from 
ORM model into Fifth Normal Form (5NF) of 
relational schemas is guaranteed (Halpin and Carver, 
2008). There is no explicit use of attributes in ORM 
model. For example, the relationship type “Supplier 
lives in City” (Figure 1) is used instead of using City 
as an attribute of the entity type Supplier.
 
 
Figure 1: An ORM model for the relationship type 
“Supplier lives in City”. 
In ORM model, object types are classified into 
entity types and value types. An entity type, depicted 
as a named soft rectangle, is the set of all possible 
instances, meanwhile a value type, represented by a 
named dotted soft rectangle, is used to denote a 
lexical object type such as a number or a character 
string. There are two kinds of relationship type in 
ORM diagram; fact type and reference type. Fact 
types are relationships between entity types. 
Reference types, on the other hand, are the 
relationships between entity types and value types. 
A predicate is simply a declarative sentence with 
object holes which are filled by object terms. Each 
role is represented by one object hole; n role(s) (n>0) 
equals a sentence with n object hole(s) are called n-
ary predicates. The value of n is the degree or the arity 
of the predicate. Any arity is allowed in ORM 
diagram. Each object type has at least one predicate 
reading which can be forward or inverse predicate 
reading or both. Figure 2 shows a fact type with 
binary predicate and two directions predicate reading. 
 
Figure 2: A binary associated fact type with forward and 
inverse predicate reading. 
A way to identify an instance of an entity type is 
required.  A basic 1:1 reference scheme consists of a 
reference predicate between an entity type and a 
value type, where each entity is associated with 
exactly one value, and vice versa. This particular 
kind of reference type is called a unique identifier. 
Reference mode or manner in which the value type 
relates to the entity type is parenthesized next to the 
entity type name to represent this kind of scheme. 
For instance, Teacher(Tname) means Tname is the 
unique identifier of Teacher. It is shown in Figure 2.
 
In this paper, our major focus is dedicated to 
ORM constraints. According to the role-based 
notation characteristic of the ORM diagram, a rich 
variety of constraints can be specified. 
3 DROOLS EXPERT 
Drools (JBoss Community, 2012) is an open source 
business rule management system (BRMS) with a 
number of components. Drools Expert, one of the 
Drools’ components, is a business rule engine that 
uses the rule-based approach to implement an expert 
system and is more correctly classified as a 
production rules system. It uses the Rete algorithm 
and Drools Rule Language (DRL) to perform 
reasoning.
 
A production rules system expresses a set of 
rules in a concise, non-ambiguous and declarative 
manner. The inference engine matches facts and data 
against production rules to infer conclusions which 
lead to actions. A production rule consists of two 
parts; the condition (when) and the action (then). In 
Drools, the inference engine uses the Rete algorithm 
to perform the process of matching the new or 
existing facts against production rules called pattern 
matching.
 
EnterpriseIntegrityConstraintsManagementusingProductionRulesandConceptualSchema
151