You are on page 1of 15

The SDL Library: Querying a Relational Database with an Ontology, Rules and the Jess Engine

RuleML Challenge 2011

Jarosaw Bk, Maciej Falkowski, Czesaw Jdrzejek Institute of Control and Information Engineering Poznan University of Technology

1. Introduction 2. What is the SDL library? 3. The Architecture and the Integration scheme 4. Demo time! 5. Conclusions and Future Work

We Integrated an OWL ontology, SWRL rules, a relational
database and the Jess (Rete-based) engine

Why? Because it:

describes data at concept (ontological) level introduces strictly defined semantics to relational databases enables to use ontology terms in queries simplifies to pose a query than using structural constructions from SQL allows for representing queries as directed graphs (RDF) increases the scalability of the Rete-based engine (facts are stored in DB) handles semantic queries and semantic answers

Description of SDL?
Enables to pose a semantic query into a relational database Consists of two modules: SDL-API and SDL-GUI Supports transformation methods of an OWL+SWRL ontology: simple and Horn-SHIQ Implements approaches that concern rules for:
forward chaining, backward chaining, forward chaining with extended rules

It is a prototype implemented in Java 4

The architecture of the SDL library

Rule-based knowledge

Relational Database

Ontology-based knowledge transformed into rules

Jess engine(s)

Mapping rules



The integration scheme (ExR transformation)

Transform all to Jess OWL+SWRL ontology Ontology and SWRL rules in the Jess language Generate extended rules

Extended rules in the Jess language Load rules

Create Mapping

Save as rules

Load rules Mapping rules in the Jess language Jess Engine

Relational Database

Test case
On a complete crime typology fraudulent disbursement

Test case - a complete model of crime typology - fraudulent disbursement

Economic crime classification
Current functionality

Source: Association of Certified Fraud Examiners, 2010 Report to the Nations

Generation of the simulated input data

Information about employees and their position in a company Invoices with all obligatory elements (payer, seller, product, etc.) Work approval documents (or the lack of them) Signatures on documents Goods and services Companies and their legal form Money turnovers: money transfers, payments and withdrawals Legal articles (name, ID and content) Information about illicit personal gains and damages to companies (with values) Other facts, like who knows about what (Person knowsAbout document) these data come from 9 testimonies.

Fraudulent Disbursement
invoice 976 z

The Hydra Case

service/goods invoice 854 wire 854 fictitious work statement Single person Comp.C

Money Laundering


service/goods invoice 450 wire 450 Single person Comp. D

Comp. A

wire 976

Comp. B

fictitious work statement

no work statement

CEO of Comp. A

work done by Comp. A itself

difference between transfers 122 (commission) CEO of Comp. B Owner of Comp. C

attempt of withdrawal of 450 cash Owner of Comp. D

intended cash flow




Example queries
IllicitPersonal Gain



rdf:type ?p worksFor Person



fallsU n der


hasValue ?h rdf:type ?d rdf:type

Caused DamageIn
?c rdf:type

Art.2961 Query 1


?a Query 4


84 HighValue DamageTo Company Company

ls fal d Un er



Companys Principal Query 5 ?a2 rdf:type


inComplicity With

rdf:type Companys Principal Art.2991


11 worksFor rdf:type worksFor


Query 2 ?c rdf:type Company ?d

isSignedBy ?p rdf:type Query 3

rdf:type Person


FalsifiedComplex InternalLegalDocument


We presented the new version of the SDL library SDL contains implementation of all our approaches achieved so far We tested SDL with our minimal model ontology SDL improves the scalability of the Jess engine (compared to pure Jess) SDL is useful in rule-based systems which need to handle DB, OWL, SWRL 13 and Jess

Future work
More optimizations in the query answering method Comparison with other approaches (OWLim, DLEJena, O-Device etc.) Test more ontologies (LUBM, UOBM) Graphical user interface for queries execution, rules creation and data (facts) analysis Integration with the award-winning the Palantir Government application 14


Thank you for your attention! 15