Towards Ontology-based OLAP -...

39
Towards Ontology-based OLAP Datalog-based Reasoning over Multidimensional Ontologies Bernd Neumayr , Stefan Anderlik, Michael Schrefl DOLAP 2012, Maui, Hawaii, USA, November 2nd, 2012 Supported by the Austrian Ministry of Transport, Innovation, and Technology in program FIT-IT Semantic Systems and Services under grant FFG-829594: Semantic Cockpit: an ontology-driven, interactive business intelligence tool for comparative data analysis

Transcript of Towards Ontology-based OLAP -...

Page 1: Towards Ontology-based OLAP - unibo.itbias.csr.unibo.it/golfarelli/dolap2012/Slides/DOLAP2012-Neumayr.pdf · Layered Approach to MDOs Decompose multidimensional schema to reusable

1Bernd Neumayr et al. Towards Multidimensional Ontologies

Towards Ontology-based OLAP

Datalog-based Reasoning over Multidimensional Ontologies

Bernd Neumayr, Stefan Anderlik, Michael Schrefl

DOLAP 2012, Maui, Hawaii, USA, November 2nd, 2012

Supported by the Austrian Ministry of Transport, Innovation, and Technology in program FIT-IT Semantic Systems and Services under grant FFG-829594:

Semantic Cockpit: an ontology-driven, interactive business intelligence tool for comparative data analysis

Page 2: Towards Ontology-based OLAP - unibo.itbias.csr.unibo.it/golfarelli/dolap2012/Slides/DOLAP2012-Neumayr.pdf · Layered Approach to MDOs Decompose multidimensional schema to reusable

2Bernd Neumayr et al. Towards Multidimensional Ontologies

Agenda

■ General Idea□ Problem/Motivation□ Multidimensional Ontologies (MDOs)□ Architecture: Ontology-based OLAP

■ Technical Details (very short, see paper)□ MDO Metamodel□ Mapping to Datalog□ Datalog-based Reasoning over MDO Concepts

■ Ongoing and Future Work

Page 3: Towards Ontology-based OLAP - unibo.itbias.csr.unibo.it/golfarelli/dolap2012/Slides/DOLAP2012-Neumayr.pdf · Layered Approach to MDOs Decompose multidimensional schema to reusable

3Bernd Neumayr et al. Towards Multidimensional Ontologies

Problem

How to ■ reuse, ■ maintain, ■ understand, ■ share and ■ organize large sets of multidimensional queries?

(we focus on boolean predicates of selection clauses)

Page 4: Towards Ontology-based OLAP - unibo.itbias.csr.unibo.it/golfarelli/dolap2012/Slides/DOLAP2012-Neumayr.pdf · Layered Approach to MDOs Decompose multidimensional schema to reusable

4Bernd Neumayr et al. Towards Multidimensional Ontologies

Running Example

treatingDoctor

cityOfPractice

provinceOfPractice

inhabitants

popDensity

cityOfPractice

provinceOfPractice

inhabitants

popDensity

insurant

cityOfResidence

provinceOfResidence

quantitycosts

Treatment

prescribingDoctor

age

inhabitants

popDensity

Problem

Treatment( insurant, prescribingDoctor, treatingDoctor,;insurant.age>65, insurant.cityOfResidence.inhabitants>100000, treatingDoctor.cityOfPractice.inhabitants > 50000

).costs

Query1:

Query2:

Treatment( insurant, prescribingDoctor, treatingDoctor,; insurant.age>65, insurant.cityOfResidence.inhabitants>50000

).costs

Page 5: Towards Ontology-based OLAP - unibo.itbias.csr.unibo.it/golfarelli/dolap2012/Slides/DOLAP2012-Neumayr.pdf · Layered Approach to MDOs Decompose multidimensional schema to reusable

5Bernd Neumayr et al. Towards Multidimensional Ontologies

Partial Solution

■ Define business terms and use them for querying ■ implement business terms as

□ SQL: Views □ MDX: Named Sets

■ Lack of:□ reasoning support: consistency checking, subsumption checking□ organization of business terms

Page 6: Towards Ontology-based OLAP - unibo.itbias.csr.unibo.it/golfarelli/dolap2012/Slides/DOLAP2012-Neumayr.pdf · Layered Approach to MDOs Decompose multidimensional schema to reusable

6Bernd Neumayr et al. Towards Multidimensional Ontologies

Running Example

treatingDoctor

cityOfPractice

provinceOfPractice

inhabitants

popDensity

cityOfPractice

provinceOfPractice

inhabitants

popDensity

insurant

cityOfResidence

provinceOfResidence

quantitycosts

Treatment

prescribingDoctor

age

inhabitants

popDensity

Partial Solution

Treatment( insurant, prescribingDoctor, treatingDoctor,;insurant.old, insurant.cityOfResidence.largeCity, treatingDoctor.cityOfPractice.mediumToLargeCity

).costs

Query1:

Query2:

Treatment( insurant, prescribingDoctor, treatingDoctor,; insurant.old, insurant.cityOfResidence.mediumToLargeCity

).costs

mediumToLargeCity== inhabitants > 50000

largeCity== inhabitants > 100000

old== age > 65

Page 7: Towards Ontology-based OLAP - unibo.itbias.csr.unibo.it/golfarelli/dolap2012/Slides/DOLAP2012-Neumayr.pdf · Layered Approach to MDOs Decompose multidimensional schema to reusable

7Bernd Neumayr et al. Towards Multidimensional Ontologies

Ontologies to the Rescue

■ Ontologies: □ formal conceptual domain models with □ richly defined concepts organized in subsumption hierarchies

■ use ontologies ‘as high-level, conceptual view over data repositories’ for querying, as in OBDA:

Diego Calvanese et al.: The MASTRO system for ontology-based data access. Semantic Web (SEMWEB) 2(1):43-53 (2011)

Page 8: Towards Ontology-based OLAP - unibo.itbias.csr.unibo.it/golfarelli/dolap2012/Slides/DOLAP2012-Neumayr.pdf · Layered Approach to MDOs Decompose multidimensional schema to reusable

8Bernd Neumayr et al. Towards Multidimensional Ontologies

Multidimensional Ontologies (MDOs)

■ Conceptual Multidimensional Model (Schema + Individuals)+ Defined Concepts (Views)+ Subsumption Reasoning over Defined Concepts

■ Separation between Primitive Concepts (Schema) and Defined Concepts (Views) as in:

Martin Buchheit, Francesco M. Donini, Werner Nutt, Andrea Schaerf: A Refined Architecture for Terminological Systems: Terminology = Schema + Views. Artif. Intell. (AI) 99(2):209-260 (1998)

Page 9: Towards Ontology-based OLAP - unibo.itbias.csr.unibo.it/golfarelli/dolap2012/Slides/DOLAP2012-Neumayr.pdf · Layered Approach to MDOs Decompose multidimensional schema to reusable

9Bernd Neumayr et al. Towards Multidimensional Ontologies

Open-world MDO vs. closed-world DWH

MDO

DWH

Mapping

Grounded MDO closed world – high level

open world – high level

closed world – low level

Other than in OBDA we assume - as a prerequisite for correct aggregation results - that data in a data warehouse is always complete.

A Grounded MDO can be regarded as a model (valid interpretation) of the MDO. Some of the Datalog rules and constraints defining structure and semantics of MDOs only apply to Grounded MDOs.

Page 10: Towards Ontology-based OLAP - unibo.itbias.csr.unibo.it/golfarelli/dolap2012/Slides/DOLAP2012-Neumayr.pdf · Layered Approach to MDOs Decompose multidimensional schema to reusable

10Bernd Neumayr et al. Towards Multidimensional Ontologies

Architecture: Ontology-based OLAP

DWH

Ontology Based OLAP Frontend

MDO-DWH Mapper

Multi-Dimensional Ontology (MDO) Engine

MDO ManagerMDO Reasoner

MDO Measures

Mapping & Grounding

BI Analysis Graphs

MDOFlat

HierarchicalMultidimensional

Business Analyst

Page 11: Towards Ontology-based OLAP - unibo.itbias.csr.unibo.it/golfarelli/dolap2012/Slides/DOLAP2012-Neumayr.pdf · Layered Approach to MDOs Decompose multidimensional schema to reusable

11Bernd Neumayr et al. Towards Multidimensional Ontologies

Why don’t we use OWL for defining MDOs?

■ Worldview of business analysts difficult to represent in OWL: □ Business analyst: focus on highly-aggregated numbers describing

some abstract points in a multidimensional space.□ Blurring between ABox and TBox: dimension members (nodes)

and cells are individuals and classes, thus, classes of dimension members or cells are metaclasses

■ OWL does not exploit structural specifities of MDOs■ Future work: MDOs in OWL

Extend/Restrict OWL for MDOs or build MDOs on top of OWL?

■ OWL ontologies in the SemCockpit project: Stefan Anderlik, Bernd Neumayr, Michael Schrefl: Using Domain Ontologies as Semantic Dimensions in Data Warehouses. ER 2012: 88-101

Page 12: Towards Ontology-based OLAP - unibo.itbias.csr.unibo.it/golfarelli/dolap2012/Slides/DOLAP2012-Neumayr.pdf · Layered Approach to MDOs Decompose multidimensional schema to reusable

12Bernd Neumayr et al. Towards Multidimensional Ontologies

Running ExampleDuality of Nodes

provinceOfResidence

cityOfResidence

insurant

tyrol viennaupperAustria

Node as Individual

Page 13: Towards Ontology-based OLAP - unibo.itbias.csr.unibo.it/golfarelli/dolap2012/Slides/DOLAP2012-Neumayr.pdf · Layered Approach to MDOs Decompose multidimensional schema to reusable

13Bernd Neumayr et al. Towards Multidimensional Ontologies

Running ExampleDuality of Nodes

provinceOfResidence

cityOfResidence

insurant

tyrol viennaupperAustria

Node as Class

Page 14: Towards Ontology-based OLAP - unibo.itbias.csr.unibo.it/golfarelli/dolap2012/Slides/DOLAP2012-Neumayr.pdf · Layered Approach to MDOs Decompose multidimensional schema to reusable

14Bernd Neumayr et al. Towards Multidimensional Ontologies

Layered Approach to MDOs

■ Decompose multidimensional schema to reusable chunks (primitive concepts) at different layers:□ Flat: Datatype, Entity types□ Hierarchical: Hierarchies with Levels□ Multidimensional: MD-Base, MD-Space

■ Different kinds of defined concepts (defined local to primitives)□ Flat: Datarange, Entity Concept□ Hierarchical: H-Concept □ Multidimensional: MD-Concept

■ interpreted by different kinds of individuals□ Flat: Value, Entity □ Hierarchical: Node □ Multidimensional: Point

Page 15: Towards Ontology-based OLAP - unibo.itbias.csr.unibo.it/golfarelli/dolap2012/Slides/DOLAP2012-Neumayr.pdf · Layered Approach to MDOs Decompose multidimensional schema to reusable

15Bernd Neumayr et al. Towards Multidimensional Ontologies

Running ExampleDFM as starting point

treatingDoctor

cityOfPractice

provinceOfPractice

inhabitants

popDensity

cityOfPractice

provinceOfPractice

inhabitants

popDensity

insurant

cityOfResidence

provinceOfResidence

quantitycosts

Treatment

prescribingDoctor

age

inhabitants

popDensity

Page 16: Towards Ontology-based OLAP - unibo.itbias.csr.unibo.it/golfarelli/dolap2012/Slides/DOLAP2012-Neumayr.pdf · Layered Approach to MDOs Decompose multidimensional schema to reusable

16Bernd Neumayr et al. Towards Multidimensional Ontologies

Running ExampleDecompose DFM to reusable chunks: MDO Schema

cityOfPractice

provinceOfPractice

doctor

cityOfResidence

provinceOfResidence

insurant

popDensity : Number

Province

inhabitants : Number

Municipality

Doctor

age : Number

Insurant

treatingDoctorprescribingDoctor

insurant

Treatment

Page 17: Towards Ontology-based OLAP - unibo.itbias.csr.unibo.it/golfarelli/dolap2012/Slides/DOLAP2012-Neumayr.pdf · Layered Approach to MDOs Decompose multidimensional schema to reusable

17Bernd Neumayr et al. Towards Multidimensional Ontologies

Running ExampleMDO Schema Language Constructs

cityOfResidence

provinceOfResidence

insurantinhabitants : Number

Municipality

treatingDoctorprescribingDoctor

insurant

Treatment

MDBase

Dimension

Hierarchy

LevelAttribute

EntitytypeDatatype

treatingDoctorcityOfPractice

insurantcityOfResidence

prescribingDoctordoctor

treatingDoctor

insurant

prescribingDoctor

Granularity

MDSpace

Page 18: Towards Ontology-based OLAP - unibo.itbias.csr.unibo.it/golfarelli/dolap2012/Slides/DOLAP2012-Neumayr.pdf · Layered Approach to MDOs Decompose multidimensional schema to reusable

18Bernd Neumayr et al. Towards Multidimensional Ontologies

Running Example

provinceOfResidenceupperAustria

cityOfResidencelinz

cityOfResidencesteyr

insurantmrMueller

insurantmrsMaier

inhabitants = 191000

linz:Municipality

treatingDoctorcityOfPracticelinz

insurantcityOfBirth

linz

prescribingDoctordoctor

drHuber

cityOfResidence

provinceOfResidence

insurantinhabitants : Number

Municipality

treatingDoctorprescribingDoctor

insurant

Treatment

MDO Individuals

Point

Node

Entity

Value

Page 19: Towards Ontology-based OLAP - unibo.itbias.csr.unibo.it/golfarelli/dolap2012/Slides/DOLAP2012-Neumayr.pdf · Layered Approach to MDOs Decompose multidimensional schema to reusable

19Bernd Neumayr et al. Towards Multidimensional Ontologies

Running Example

cityOfResidence

provinceOfResidence

insurantinhabitants : Number

Municipality

treatingDoctorprescribingDoctor

insurant

Treatment

Flat Concepts DefinitionENTITYTYPE municipality

ENTITYCONCEPT largeCity== (inhabitants => (from:100000) )

ENTITYCONCEPT mediumToLargeCity== (inhabitants => (from:50000) )

Page 20: Towards Ontology-based OLAP - unibo.itbias.csr.unibo.it/golfarelli/dolap2012/Slides/DOLAP2012-Neumayr.pdf · Layered Approach to MDOs Decompose multidimensional schema to reusable

20Bernd Neumayr et al. Towards Multidimensional Ontologies

Running ExampleFlat ConceptsSubsumption Hierarchies

treatingDoctor

cityOfPractice

provinceOfPractice

inhabitants

popDensity

cityOfPractice

provinceOfPractice

inhabitants

popDensity

insurant

cityOfResidence

provinceOfResidence

quantitycosts

Treatment

prescribingDoctor

age

inhabitants

popDensity

smallVillage

mediumToLargeCity

largeCity

Municipality⊤

old

Insurant⊤

childadult

urban

Province⊤

ruralurban

Province⊤

rural

urban

Province⊤

rural

smallVillage

mediumToLargeCity

largeCity

Municipality⊤

smallVillage

mediumToLargeCity

largeCity

Municipality⊤

Page 21: Towards Ontology-based OLAP - unibo.itbias.csr.unibo.it/golfarelli/dolap2012/Slides/DOLAP2012-Neumayr.pdf · Layered Approach to MDOs Decompose multidimensional schema to reusable

21Bernd Neumayr et al. Towards Multidimensional Ontologies

Running Example

cityOfResidence

provinceOfResidence

insurantinhabitants : Number

Municipality

treatingDoctorprescribingDoctor

insurant

Treatment

Hierarchical ConceptsDefinition

HIERARCHY insurant

HCONCEPT livingInRuralArea== (provinceOfResidence=> rural)

HCONCEPT adultInMediumToLargeCity == (cityOfResidence => mediumToLargeCity,

insurant => adult )

HCONCEPT oldInLargeCity== (cityOfResidence=> largeCity,

insurant => old)

HCONCEPT oldInLargeCityInRuralArea== ( provinceOfResidence=>rural,

cityOfResidence=> largeCity,insurant => old)

Page 22: Towards Ontology-based OLAP - unibo.itbias.csr.unibo.it/golfarelli/dolap2012/Slides/DOLAP2012-Neumayr.pdf · Layered Approach to MDOs Decompose multidimensional schema to reusable

22Bernd Neumayr et al. Towards Multidimensional Ontologies

Running ExampleInterpretation of Hierarchical Concepts

provinceOfResidence

cityOfResidence

insurant

tyrol vienna

livingInRuralAreaoldInLargeCityInRuralArea

upperAustria

Page 23: Towards Ontology-based OLAP - unibo.itbias.csr.unibo.it/golfarelli/dolap2012/Slides/DOLAP2012-Neumayr.pdf · Layered Approach to MDOs Decompose multidimensional schema to reusable

23Bernd Neumayr et al. Towards Multidimensional Ontologies

Running ExampleHierarchical ConceptsSubsumption Hierarchies

treatingDoctor

cityOfPractice

provinceOfPractice

inhabitants

popDensity

cityOfPractice

provinceOfPractice

inhabitants

popDensity

insurant

cityOfResidence

provinceOfResidence

quantitycosts

Treatment

prescribingDoctor

age

inhabitants

popDensity

smallVillage

mediumToLargeCity

largeCity

Municipality⊤

old

Insurant⊤

childadult

urban

Province⊤

rural

Doctor⊤

practisingInMediumToLargeCity

Insurant⊤

adultInMediumToLargeCity

oldInLargeCityInRuralArea

livingInRuralArea

oldInLargeCity

adultInMediumToLargeCityInRuralArea

urban

Province⊤

rural

urban

Province⊤

rural

smallVillage

mediumToLargeCity

largeCity

Municipality⊤

smallVillage

mediumToLargeCity

largeCity

Municipality⊤

Page 24: Towards Ontology-based OLAP - unibo.itbias.csr.unibo.it/golfarelli/dolap2012/Slides/DOLAP2012-Neumayr.pdf · Layered Approach to MDOs Decompose multidimensional schema to reusable

24Bernd Neumayr et al. Towards Multidimensional Ontologies

Running Example

cityOfResidence

provinceOfResidence

insurantinhabitants : Number

Municipality

treatingDoctorprescribingDoctor

insurant

Treatment

Multidimensional ConceptsDefinition

MDBASE Treatment

MDCONCEPT forAdultInsurantsLivingInMediumToLargeCities== (insurant=> adultInMediumToLargeCity )

MDCONCEPT forOldInsurantsLivingInLargeCitiesBy-DoctorsPractisingInMediumToLargeCities

== (insurant=> oldInLargeCity,treatingDoctor => practisingInMediumToLargeCity)

Page 25: Towards Ontology-based OLAP - unibo.itbias.csr.unibo.it/golfarelli/dolap2012/Slides/DOLAP2012-Neumayr.pdf · Layered Approach to MDOs Decompose multidimensional schema to reusable

25Bernd Neumayr et al. Towards Multidimensional Ontologies

Running ExampleMultidimensional ConceptsSubsumption Hierarchy

treatingDoctor

cityOfPractice

provinceOfPractice

inhabitants

popDensity

cityOfPractice

provinceOfPractice

inhabitants

popDensity

insurant

cityOfResidence

provinceOfResidence

quantitycosts

Treatment

prescribingDoctor

age

inhabitants

popDensity

smallVillage

mediumToLargeCity

largeCity

Municipality⊤

old

Insurant⊤

childadult

urban

Province⊤

rural

Doctor⊤

practisingInMediumToLargeCity

Insurant⊤

adultInMediumToLargeCity

oldInLargeCityInRuralArea

livingInRuralArea

oldInLargeCity

adultInMediumToLargeCityInRuralArea

Treatment

forAdultInsurantsLivingInMediumT

oLargeCities

forOldInsurantsLivingInLargeCitiesByDoctorsPractisi

ngInLargeCities

urban

Province⊤

rural

urban

Province⊤

rural

smallVillage

mediumToLargeCity

largeCity

Municipality⊤

smallVillage

mediumToLargeCity

largeCity

Municipality⊤

Page 26: Towards Ontology-based OLAP - unibo.itbias.csr.unibo.it/golfarelli/dolap2012/Slides/DOLAP2012-Neumayr.pdf · Layered Approach to MDOs Decompose multidimensional schema to reusable

26Bernd Neumayr et al. Towards Multidimensional Ontologies

Agenda

■ General Idea□ Problem/Motivation□ Multidimensional Ontologies (MDOs)□ Architecture: Ontology-based OLAP

■ Technical Details (very short, see paper)□ MDO Metamodel□ Mapping to Datalog□ Datalog-based Reasoning over MDO Concepts

■ Ongoing and Future Work

Page 27: Towards Ontology-based OLAP - unibo.itbias.csr.unibo.it/golfarelli/dolap2012/Slides/DOLAP2012-Neumayr.pdf · Layered Approach to MDOs Decompose multidimensional schema to reusable

27Bernd Neumayr et al. Towards Multidimensional Ontologies

MDO Metamodel

Datatype Entitytype

Entityconcept

Entity

Attribute

Hierarchy

Node

parent

MDConcept

Dimension

Point

parent

*

* *

*

**

*

*

* *

HConcept*

*

Indi

vidu

als

Sche

ma

Def

ined

C

once

pts

*

*

**

*

*

*

*

*

*

tofrom

*

*

**

**

Level

top

MDSpace**

*

*

Flat Hierarchical Multidimensional

Value

MDBaseGranularity

finestcoarsest

0..10..1*

*

*

*

Datarange

*

*

*

*

0..1 0..1

Canonical form of MDOs

Page 28: Towards Ontology-based OLAP - unibo.itbias.csr.unibo.it/golfarelli/dolap2012/Slides/DOLAP2012-Neumayr.pdf · Layered Approach to MDOs Decompose multidimensional schema to reusable

28Bernd Neumayr et al. Towards Multidimensional Ontologies

MDO Metamodel: Derived Information

Datatype Entitytype

Entityconcept

Entity

Attribute

Hierarchy

Node

parent

MDConcept

Dimension

Point

parent

*

* *

*

**

*

*

* *

HConcept*

*

Indi

vidu

als

Sche

ma

Def

ined

C

once

pts

*

*

**

*

*

*

*

*

*

tofrom

*

*

**

**

Level

top

MDSpace**

*

*

Flat Hierarchical Multidimensional

Value*

*

member

rollup* *

**subsumedby

**subsumedby

**subsumedby

**subsumedby

*member

*

member*

member*

* *

MDBaseGranularity

finestcoarsest

0..10..1*

*

*

*

Datarange

*

*

*

*

0..1 0..1

Page 29: Towards Ontology-based OLAP - unibo.itbias.csr.unibo.it/golfarelli/dolap2012/Slides/DOLAP2012-Neumayr.pdf · Layered Approach to MDOs Decompose multidimensional schema to reusable

29Bernd Neumayr et al. Towards Multidimensional Ontologies

MDO in Datalog

■ Why Datalog? □ concise syntax□ simple semantics□ very mature reasoning procedures

■ We use standard Datalog with □ constraints (rules without heads)□ stratified negation as failure

Page 30: Towards Ontology-based OLAP - unibo.itbias.csr.unibo.it/golfarelli/dolap2012/Slides/DOLAP2012-Neumayr.pdf · Layered Approach to MDOs Decompose multidimensional schema to reusable

30Bernd Neumayr et al. Towards Multidimensional Ontologies

MDO in Datalog

■ MDO language construts → Datalog predicates■ Structure and Semantics of MDO → Datalog rules / constraints

(some rules only apply to closed-world Grounded MDOs ! )■ User-defined MDO → Datalog constants and facts

■ Stratification along MDO layers: flat, hierarchical, multidim

Page 31: Towards Ontology-based OLAP - unibo.itbias.csr.unibo.it/golfarelli/dolap2012/Slides/DOLAP2012-Neumayr.pdf · Layered Approach to MDOs Decompose multidimensional schema to reusable

31Bernd Neumayr et al. Towards Multidimensional Ontologies

Running ExampleMDO in Datalog

ENTITYTYPE cityATTRIBUTE inhabitants -> intENTITY linz(inhabitants => 191000)

et(et_city).

a(a_city_inhabitants, dt_int,et_city).

e(et_city_linz,et_city).

av(et_city_linz,a_city_inhabitants,191000).

191000 : Value int : Datatype

linz : Entity city : Entitytype

inhabitants : Attribute

Datatype

EntitytypeEntity

Attribute

Value

*

*

*

*

*

*

<e>

<v>

<av>

[3]<dt>

<a>

<et>

[2]

[1]

[2]

[3]

Page 32: Towards Ontology-based OLAP - unibo.itbias.csr.unibo.it/golfarelli/dolap2012/Slides/DOLAP2012-Neumayr.pdf · Layered Approach to MDOs Decompose multidimensional schema to reusable

32Bernd Neumayr et al. Towards Multidimensional Ontologies

MDO Metamodel: Mapping to Datalog (EDB)

Datatype Entitytype

Entityconcept

Entity

Attribute

Hierarchy

Node

parent

MDConcept

Dimension

Point

parent

*

* *

*

**

*

*

* *

HConcept*

*

Indi

vidu

als

Sche

ma

Def

ined

C

once

pts

*

*

**

*

*

*

*

*

*

tofrom

*

*

**

**

Level

top

MDSpace**

*

*

Flat Hierarchical Multidimensional

Value

MDBaseGranularity

finestcoarsest

0..10..1*

*

*

*

Datarange

*

<mc>

<mb>

<ms>

<g>

<p>

<pc>

<gc>

<pc>

*

<mcub>

<mclb>

<mb_p>

*

*

<ms_d><d>

<hc>

<h>

<l>

<l_h>

<n_h><n>

<lr><ar>

<av>

<rub>

<rlb>

0..1 0..1

<ec>

<et>

<e>

<a>

<r>

<dt>

<v>

Page 33: Towards Ontology-based OLAP - unibo.itbias.csr.unibo.it/golfarelli/dolap2012/Slides/DOLAP2012-Neumayr.pdf · Layered Approach to MDOs Decompose multidimensional schema to reusable

33Bernd Neumayr et al. Towards Multidimensional Ontologies

MDO Metamodel: Mapping to Datalog (EDB)

Datatype Entitytype

Entityconcept

Entity

Attribute

Hierarchy

Node

parent

MDConcept

Dimension

Point

parent

*

* *

*

**

*

*

* *

HConcept*

*

Indi

vidu

als

Sche

ma

Def

ined

C

once

pts

*

*

**

*

*

*

*

*

*

tofrom

*

*

**

**

Level

top

MDSpace**

*

*

Flat Hierarchical Multidimensional

Value

MDBaseGranularity

finestcoarsest

0..10..1*

*

*

*

Datarange

*

<mc>

<mb>

<ms>

<g>

<p>

<pc>

<gc>

<pc>

*

<mcub>

<mclb>

<mb_p>

*

*

<ms_d><d>

<hc>

<h>

<l>

<l_h>

<n_h><n>

<lr><ar>

<av>

<rub>

<rlb>

0..1 0..1

<ec>

<et>

<e>

<a>

<r>

<dt>

<v>

[1]

[2]

[3]

[1]

[2]

[2] [1]

[1]

[2]

[3]

[1]

[2]

[3]

[2]

[3]

[1]

[2]

[3]

[1]

[2]

[3]

[2] [3]

(order of single-valued properties)

Page 34: Towards Ontology-based OLAP - unibo.itbias.csr.unibo.it/golfarelli/dolap2012/Slides/DOLAP2012-Neumayr.pdf · Layered Approach to MDOs Decompose multidimensional schema to reusable

34Bernd Neumayr et al. Towards Multidimensional Ontologies

MDO Metamodel: Mapping to Datalog (IDB)

<r_s>

Datatype Entitytype

Entityconcept

Entity

Attribute

Hierarchy

Node

parent

MDConcept

Dimension

Point

parent

*

* *

*

**

*

*

* *

HConcept*

*

Indi

vidu

als

Sche

ma

Def

ined

C

once

pts

*

*

**

*

*

*

*

*

*

tofrom

*

*

**

**

Level

top

MDSpace**

*

*

Flat Hierarchical Multidimensional

Value*

*

member

rollup* *

**subsumedby

**subsumedby

**subsumedby

**subsumedby

*member

*

member*

member*

* *

MDBaseGranularity

finestcoarsest

0..10..1*

*

*

*

Datarange

*

*

*

*

0..1 0..1

<v_of>

<e_of>

<n_of>

<p_of>

<ec_s> <hc_s> <mc_s>

Page 35: Towards Ontology-based OLAP - unibo.itbias.csr.unibo.it/golfarelli/dolap2012/Slides/DOLAP2012-Neumayr.pdf · Layered Approach to MDOs Decompose multidimensional schema to reusable

35Bernd Neumayr et al. Towards Multidimensional Ontologies

Interpretation of Hierarchical Concepts(Concept Membership, Instance Checking)

■ A hierarchical concept is interpreted as a subset of the nodes of the hierarchy it belongs to. A node is member of a hierarchical concept if it is a descendant of the root node and for every ancestor level restriction it or one of its ancestors fulfills the restriction. If a node is member of a hierarchical concept, then all its descendant nodes are also members of the hierarchical concept.

not_n_of (N,HC) :- n(N,_,_), lr(HC ,Lx ,EC), n(Nx ,Lx ,Ex), n_h_tr (N,Nx), not e_of(Ex ,EC).

not_n_of (N,HC) :- n(N,_,_), lr(HC ,Lx ,EC), not n_h_tr_l (N,Lx).n_h_tr_l (N,L) :- n_h_tr (N,Nx), n(Nx ,L,_). n_of(N,HC) :- n(N,L,_), l(L,_,H), hc(HC ,H,Nt), n_h_tr (N,Nt),

not not_n_of (N,HC).

Page 36: Towards Ontology-based OLAP - unibo.itbias.csr.unibo.it/golfarelli/dolap2012/Slides/DOLAP2012-Neumayr.pdf · Layered Approach to MDOs Decompose multidimensional schema to reusable

36Bernd Neumayr et al. Towards Multidimensional Ontologies

Subsumption of Hierarchical Concepts

■ A hierarchical concept is subsumed by another hierarchical concept if they belong to the same hierarchy, the root node of the subsumed concept is the same or a descendant of the root node of the subsuming concept, and for every level restriction of the subsuming concept there is the same or a finer restriction in the subsumed concept or the restriction is fulfilled by the root node of the subsumed concept.

hc_s(HC,HCx) :- hc(HC,H,N), hc(HCx,H,Nx), n_h_tr(N,Nx), not not_hc_s(HC,HCx).

not_hc_s(HC,HCx) :- hc(HC,_,_), lr(HCx,L,ECx), not hc_s_lec(HC,L,ECx).

hc_s_lec(HC,L,ECx) :- lr(HC,L,EC), ec_s(EC,ECx).hc_s_lec(HC,L,ECx) :- hc(HC,_,N), n(Ny,L,Ey), n_h_tr(N,Ny),

e_of(Ey,ECx).

Page 37: Towards Ontology-based OLAP - unibo.itbias.csr.unibo.it/golfarelli/dolap2012/Slides/DOLAP2012-Neumayr.pdf · Layered Approach to MDOs Decompose multidimensional schema to reusable

37Bernd Neumayr et al. Towards Multidimensional Ontologies

Agenda

■ General Idea□ Problem/Motivation□ Multidimensional Ontologies (MDOs)□ Architecture: Ontology-based OLAP

■ Technical Details (very short, see paper)□ MDO Metamodel□ Mapping to Datalog□ Datalog-based Reasoning over MDO Concepts

■ Ongoing and Future Work

Page 38: Towards Ontology-based OLAP - unibo.itbias.csr.unibo.it/golfarelli/dolap2012/Slides/DOLAP2012-Neumayr.pdf · Layered Approach to MDOs Decompose multidimensional schema to reusable

38Bernd Neumayr et al. Towards Multidimensional Ontologies

Ongoing and Future Work

■ Extending the MDO formalism□ Concept definitions over (aggregated) measures□ Built-in predicates (another kind of primitives)

■ MDO in SQL, MDO in OWL■ Mapping between MDO and DWH■ Direct semantics for MDO

and proof that our Datalog rules are sound & complete■ Apply MDO concepts for definining

□ Complex-derived measures □ BI Analysis graphs (Neuböck, 2012)□ Comparative data analysis

Thanks you for your attention!

Page 39: Towards Ontology-based OLAP - unibo.itbias.csr.unibo.it/golfarelli/dolap2012/Slides/DOLAP2012-Neumayr.pdf · Layered Approach to MDOs Decompose multidimensional schema to reusable

39Bernd Neumayr et al. Towards Multidimensional Ontologies

References

■ Stefan Anderlik, Bernd Neumayr, Michael Schrefl: Using Domain Ontologies as Semantic Dimensions in Data Warehouses. ER 2012: 88-101

■ Thomas Neuböck, Bernd Neumayr, Thomas Rossgatterer, Stefan Anderlik, Michael Schrefl: Multi-dimensional Navigation Modeling Using BI Analysis Graphs. ER Workshops 2012: 162-171

■ Bernd Neumayr, Michael Schrefl, Konrad Linner: Semantic Cockpit: An Ontology-Driven, Interactive Business Intelligence Tool for Comparative Data Analysis. ER Workshops 2011: 55-64

■ Martin Buchheit, Francesco M. Donini, Werner Nutt, Andrea Schaerf: A Refined Architecture for Terminological Systems: Terminology = Schema + Views. Artif. Intell. (AI) 99(2):209-260 (1998)

■ Diego Calvanese, Giuseppe De Giacomo, Domenico Lembo, Maurizio Lenzerini, Antonella Poggi, Mariano Rodriguez-Muro, Riccardo Rosati, Marco Ruzzi, Domenico Fabio Savo: The MASTRO system for ontology-based data access. Semantic Web (SEMWEB) 2(1):43-53 (2011)