• Nenhum resultado encontrado

Ontologies and Databases

N/A
N/A
Protected

Academic year: 2022

Share "Ontologies and Databases"

Copied!
95
0
0

Texto

(1)

Ontologies and Databases

KRDB RESEARCH CENTRE

KNOWLEDGE REPRESENTATION MEETSDATABASES

Enrico Franconi

KRDB Research Centre – Free University of Bozen-Bolzano, Italy

http://www.inf.unibz.it/franconi

(2)

Summary

What is an Ontology

(Description Logics for Conceptual Modelling)

Queries via a Conceptual Schema

(3)

What is an Ontology

An ontology is a formal conceptualisation of the world: a conceptual schema.

An ontology specifies a set ofconstraints, which declare what should necessarily hold in any possible world.

Any possible world should conform to the constraints expressed by the ontology.

Given an ontology, a legal world descriptionis a finite possible world satisfying the constraints.

(4)

Ontologies and Conceptual Data Models

An ontology language usually introduces concepts (aka classes, entities),properties of concepts (aka slots, attributes, roles), relationshipsbetween concepts (aka associations), and additional constraints.

Ontology languages may be simple (e.g., involving only concepts and taxonomies), frame-based (e.g., UML, based on concepts, properties, and binary relationships), or logic-based (e.g. OWL, Description Logics).

Ontology languages are typically expressed by means of diagrams.

Entity-Relationshipschemas andUMLclass diagrams can be considered as ontologies.

(5)

UML Class Diagram

AreaManager TopManager

Manager Project

ProjectCode:String Employee

PaySlipNumber:Integer Salary:Integer

{disjoint,complete}

1..⋆

Works-for

1..1

1..1

Manages

(6)

Entity-Relationship Schema

Employee

PaySlipNumber(Integer) Salary(Integer)

Project

ProjectCode(String)

Manager

TopManager AreaManager

×

Works-for

Manages (1,n)

(1,1)

(1,1)

(7)

Semantics

In a specific world:

A class is aset of instances;

a n-ary relationship is aset of n-tuples of instances;

an attribute is aset of pairs of an instance and a domain element.

E1

E2

E3

E4

E5

P1

P2

P3

“P12a”

“P02b”

“P2a/1”

“P9”

(8)

Semantics

In a specific world:

A class is aset of instances;

a n-ary relationship is aset of n-tuples of instances;

an attribute is aset of pairs of an instance and a domain element.

Works-for

Employee Project String

E1

E2

E3

E4

E5

P1

P2

P3

“P12a”

“P02b”

“P2a/1”

“P9”

(9)

Semantics

In a specific world:

A class is aset of instances;

a n-ary relationship is aset of n-tuples of instances;

an attribute is aset of pairs of an instance and a domain element.

E1

E2

E3

E4

E5

P1

P2

P3

“P12a”

“P02b”

“P2a/1”

“P9”

(10)

A world is described by sets of instances

E1 E2 E3

E4 E5

P1 P2

P3

hE1,P1i hE2,P1i hE2,P2i

hE2,P3i hE3,P1i

hE4,P2i hE4,P3i

hE5,P3i

Employee Project Works-for

(11)

The relational representation of a world

Employee employeeId

E1

E2

E3

E4

E5

Project projectId

P1

P2

P3

String anystring

“P12a”

“P02b”

“P2a/1”

“P9”

· · · Works-for

employeeId projectId

E1 P1

E2 P1

E2 P2

E2 P3

E3 P1

E4 P2

E4 P3

E5 P3

ProjectCode projectId pcode

P1 “P12a”

P2 “P02b”

P3 “P2a/1”

(12)

The graph representation of a world – e.g. RDF triples

Employee Project

String

rdf:type rdf:type

rdf:type

:Works-for

:ProjectCode E1

E2

E3

E4

E5

P1

P2

P3

“P12a”

“P02b”

“P2a/1”

“P9”

(13)

The graph representation of a world – e.g. RDF triples

Employee Project String

:Works-for

:ProjectCode E1

E2

E3

E4

E5

P1

P2

P3

“P12a”

“P02b”

“P2a/1”

“P9”

(14)

The graph representation of a world – e.g. RDF triples

Works-for

Employee Project String

:ProjectCode E1

E2

E3

E4

E5

P1

P2

P3

“P12a”

“P02b”

“P2a/1”

“P9”

(15)

The graph representation of a world – e.g. RDF triples

Employee Project String

E1

E2

E3

E4

E5

P1

P2

P3

“P12a”

“P02b”

“P2a/1”

“P9”

(16)

The role of a Conceptual Schema

Data Store Logical Schema Conceptual

Schema

(17)

The role of a Conceptual Schema

Constraints

Data Store Logical Schema Conceptual

Schema

(18)

The role of a Conceptual Schema

Constraints

Query

Result

Data Store Logical Schema Conceptual

Schema

(19)

The role of a Conceptual Schema

Reasoning Constraints

Query

Result

Data Store Logical Schema Conceptual

Schema

(20)

Reasoning

Given an ontology – seen as a collection of constraints – it is possible that additional constraints can be inferred.

A class isinconsistent if it denotes the empty set in any legal world description.

A class is asubclass of another class if the former denotes a subset of the set denoted by the latter in any legal world description.

Two classes are equivalentif they denote the same set in any legal world description.

A stricterconstraint is inferred – e.g., acardinalityconstraint – if it holds in in any legal world description.

. . .

(21)

Simple reasoning example

Italian English

Person

Lazy LatinLover {disjoint,covering}

Gentleman Hooligan {disjoint}

(22)

Simple reasoning example

Italian English

Person

Lazy LatinLover {disjoint,covering}

Gentleman Hooligan {disjoint}

LatinLover =∅ Italian⊆Lazy Italian≡Lazy

(23)

Reasoning: cute professors

LatinLover

Lazy Mafioso ItalianProf

Italian

{disjoint,complete}

{disjoint}

(24)

Reasoning: cute professors

LatinLover

Lazy Mafioso ItalianProf

Italian

{disjoint,complete}

{disjoint}

implies

ItalianProf⊆LatinLover

(25)

Reasoning with Conceptual Schemas

AreaManager TopManager

Manager Project

ProjectCode:String

Employee

PaySlipNumber:Integer Salary:Integer

{disjoint,complete}

1..⋆

Works-for

1..1

1..1

Manages

Managers do not work for a project (she/he just manages it):

∀x.Manager(x)→ ∀y.¬WORKS-FOR(x,y)

(26)

Reasoning with Conceptual Schemas

AreaManager TopManager

Manager Project

ProjectCode:String

Employee

PaySlipNumber:Integer Salary:Integer

{disjoint,complete}

1..⋆

1..⋆

Works-for

1..1

1..1

Manages

Managers do not work for a project (she/he just manages it):

∀x.Manager(x)→ ∀y.¬WORKS-FOR(x,y)

If theminimum cardinality for the participation of employees to the works-for relationship is increased, then . . .

(27)

The democratic company

Supervisor

Employee

supervises

0..1 2..2

(28)

The democratic company

Supervisor

Employee

supervises

0..1 2..2

implies

“the classes Employee andSupervisor necessarily contain an infinite number of instances”.

Since legal world descriptions arefinite possible worlds satisfying the constraints imposed by the conceptual schema, the schema is inconsistent.

(29)

How many numbers?

Natural Number

Even Number rel

1..1 1..1

(30)

How many numbers?

Natural Number

Even Number rel

1..1 1..1

implies

“the classes Natural Number andEven Number contain the same number of instances”.

(31)

How many numbers?

Natural Number

Even Number rel

1..1 1..1

implies

“the classes Natural Number andEven Number contain the same number of instances”.

Only if the domain is finite: Natural Number≡ Even Number

(32)

Summary

Logic and Conceptual Modelling

Description Logics for Conceptual Modelling

Queries via a Conceptual Schema

(33)

Encoding Conceptual Schemas in (Description) Logics

Object-oriented data models (e.g., UML and ODMG)

Semantic data models (e.g., EER and ORM)

Frame-based and web ontology languages (e.g., RDFS, OWL)

(34)

Encoding Conceptual Schemas in (Description) Logics

Object-oriented data models (e.g., UML and ODMG)

Semantic data models (e.g., EER and ORM)

Frame-based and web ontology languages (e.g., RDFS, OWL)

Theorems prove that a conceptual schema and its encoding as DL knowledge bases constrain every world description in the same way – i.e., the models of the DL theory correspond to the legal world descriptions of the conceptual schema, and vice-versa.

(35)

AreaManager TopManager

Manager Project

ProjectCode:String

Employee

PaySlipNumber:Integer Salary:Integer

{disjoint,complete}

1..

Works-for

1..1

1..1

Manages

Works-for emp/2:Employeeact/2:Project Manages man/2:TopManagerprj/2:Project

Employee =1[worker](PaySlipNumbernum/2:Integer)⊓

=1[payee](Salaryamount/2:Integer)

≤1[num](PaySlipNumberworker/2:Employee) Manager Employee(AreaManagerTopManager) AreaManager Manager⊓ ¬TopManager

=1

(36)

Set-based Constraints

Works-for⊆Employee×Project Manages⊆TopManager×Project

Employee⊆ {e |♯(PaySlipNumber∩({e} ×Integer))≥1}

Employee⊆ {e |♯(Salary∩({e} ×Integer))≥1}

Project⊆ {p |♯(ProjectCode∩({p} ×String))≥1}

TopManager⊆ {m|1≥♯(Manages∩({m} ×Ω))≥1}

Project⊆ {p |1≥♯(Manages∩(Ω× {p}))≥1}

Project⊆ {p |♯(Works-for∩(Ω× {p}))≥1}

Manager⊆Employee AreaManager⊆Manager TopManager⊆Manager

AreaManager∩TopManager =∅

Manager⊆AreaManager∪TopManager

(37)

Deducing constraints

AreaManager TopManager

Manager Project

ProjectCode:String

Employee

PaySlipNumber:Integer Salary:Integer

{disjoint,complete}

1..

Works-for

1..1

1..1

Manages

Managers are employees who do not work for a project (she/he just manages it):

Employee⊓ ¬(∃≥1[emp]Works-for)Manager, Manager⊑ ¬(∃≥1[emp]Works-for)

(38)

Deducing constraints

AreaManager TopManager

Manager Project

ProjectCode:String

Employee

PaySlipNumber:Integer Salary:Integer

{disjoint,complete}

1..

Works-for

1..1

1..1

Manages

Managers are employees who do not work for a project (she/he just manages it):

Employee⊓ ¬(∃≥1[emp]Works-for)Manager, Manager⊑ ¬(∃≥1[emp]Works-for)

| =

For every project, there is at least one employee who is not a manager:

Project⊑ ∃≥1[act](Works-foremp:¬Manager)

(39)

i • com : Intelligent Conceptual Modelling

i•com allows for the specification of multiple EER (or UML) diagrams and inter- and intra-schema constraints;

Complete logical reasoning is employed by the tool using a hidden underlying DLRinference engine;

i•com verifies the specification, infers implicit facts and stricter constraints, and manifests any inconsistencies during the conceptual modelling phase.

(40)

Summary

Logic and Conceptual Modelling

Description Logics for Conceptual Modelling

Queries via a Conceptual Schema

(41)

The role of a Conceptual Schema – revisited

Data Store Logical Schema Conceptual

Schema

(42)

The role of a Conceptual Schema – revisited

Constraints

Data Store Logical Schema Conceptual

Schema

(43)

The role of a Conceptual Schema – revisited

Constraints

Query

Result

Data Store Logical Schema Conceptual

Schema

(44)

The role of a Conceptual Schema – revisited

Reasoning Constraints

Query

Result

Data Store Logical Schema Conceptual

Schema

(45)

The role of a Conceptual Schema – revisited

Reasoning Constraints

Query

Result

Data Store Logical Schema Conceptual

Schema

(46)

The role of a Conceptual Schema – revisited

Reasoning Constraints

Query

Result

Data Store Logical Schema Conceptual

Schema

(47)

The role of a Conceptual Schema – revisited

Query

Result Reasoning

Constraints

Query

Result

Data Store Logical Schema Conceptual

Schema

(48)

The role of a Conceptual Schema – revisited

Global Reasoning

Query

Result Reasoning

Constraints

Query

Result

Data Store Logical Schema Conceptual

Schema

(49)

The role of a Conceptual Schema – revisited

Global Reasoning

Query

Result Reasoning

Constraints

Query

Result

Data Store Logical Schema Conceptual

Schema

(50)

The role of a Conceptual Schema – revisited

Mediator Global Reasoning

Query

Result Reasoning

Constraints

Query

Result

Data Store Logical Schema Conceptual

Schema

(51)

The role of a Conceptual Schema – revisited

Mediator Global Reasoning

Query

Result Reasoning

Constraints

Query

Result

Data Store Logical Schema Conceptual

Schema

←−Information Level

←−Knowledge Level

(52)

Queries via Conceptual Schemas:

the DB assumption

Basic assumption: consistent information with respect to the constraints introduced by the conceptual schema

DB assumption: complete informationabout each termappearing in the conceptual schema

Problem: answer a query over the conceptual schema vocabulary

(53)

Queries via Conceptual Schemas:

the DB assumption

Basic assumption: consistent information with respect to the constraints introduced by the conceptual schema

DB assumption: complete informationabout each termappearing in the conceptual schema

Problem: answer a query over the conceptual schema vocabulary

Solution: use a standard DB technology (e.g., SQL, datalog, etc)

(54)

Example with DB assumption

Manager

Employee Works-for 1.. Project

(55)

Example with DB assumption

Manager

Employee Works-for 1.. Project

Employee = { John, Mary, Paul } Manager = { John, Paul }

Works-for = { hJohn,Prj-Ai, hMary,Prj-Bi } Project = { Prj-A, Prj-B }

(56)

Example with DB assumption

Manager

Employee Works-for 1.. Project

Employee = { John, Mary, Paul } Manager = { John, Paul }

Works-for = { hJohn,Prj-Ai, hMary,Prj-Bi } Project = { Prj-A, Prj-B }

Q(X) :- Manager(X), Works-for(X,Y), Project(Y)

=⇒ { John }

(57)

Weakening the DB assumption

The DB assumption is against the principle that a conceptual schema presents a richer vocabulary than the data stores (i.e., it plays the role of an ontology).

(58)

Weakening the DB assumption

The DB assumption is against the principle that a conceptual schema presents a richer vocabulary than the data stores (i.e., it plays the role of an ontology).

Partial DB assumption (or conceptual schema with DBox): complete informationabout someterm appearing in the conceptual schema

Standard DB technologies do not apply

The query answering problem in this context is inherently complex

(59)

Example with partial DB assumption

Manager

Employee Works-for 1.. Project

Manager = { John, Paul }

Works-for = { hJohn,Prj-Ai, hMary,Prj-Bi } Project = { Prj-A, Prj-B }

(60)

Example with partial DB assumption

Manager

Employee Works-for 1.. Project

Manager = { John, Paul }

Works-for = { hJohn,Prj-Ai, hMary,Prj-Bi } Project = { Prj-A, Prj-B }

Q(X) :- Employee(X)

(61)

Example with partial DB assumption

Manager

Employee Works-for 1.. Project

Manager = { John, Paul }

Works-for = { hJohn,Prj-Ai, hMary,Prj-Bi } Project = { Prj-A, Prj-B }

Q(X) :- Employee(X)

=⇒ { John, Paul, Mary }

(62)

Example with partial DB assumption

Manager

Employee Works-for 1.. Project

Manager = { John, Paul }

Works-for = { hJohn,Prj-Ai, hMary,Prj-Bi } Project = { Prj-A, Prj-B }

Q(X) :- Employee(X)

=⇒ { John, Paul, Mary }

=⇒ Q’(X) :- Manager(X) ∪ Works-for(X,Y)

(63)

Andrea’s Example

AreaManager TopManager Manager

Employee

{disjoint,complete}

Supervised OfficeMate

(64)

Andrea’s Example

AreaManagerp TopManagerp

AreaManager TopManager Manager

Employee

{disjoint,complete}

Supervised

OfficeMate Employee = { Andrea, Paul, Mary, John }

Manager = { Andrea, Paul, Mary}

AreaManagerp = { Paul } TopManagerp = { Mary }

Supervised = { hJohn,Andreai, hJohn,Maryi } OfficeMate = { hMary,Andreai, hAndrea,Pauli }

(65)

Andrea’s Example

AreaManager TopManager Manager

Employee

{disjoint,complete}

Supervised

OfficeMate Employee = { Andrea, Paul, Mary, John }

Manager = { Andrea, Paul, Mary}

AreaManagerp = { Paul } TopManagerp = { Mary }

Supervised = { hJohn,Andreai, hJohn,Maryi } OfficeMate = { hMary,Andreai, hAndrea,Pauli }

Paul:AreaManagerp

Andrea:Manager Mary:TopManagerp

John

Supervised Supervised

OfficeMate

OfficeMate

(66)

Andrea’s Example (cont.)

AreaManagerp TopManagerp

AreaManager TopManager Manager

Employee

{disjoint,complete}

Supervised OfficeMate

(67)

Andrea’s Example (cont.)

AreaManager TopManager Manager

Employee

{disjoint,complete}

Supervised OfficeMate

Paul:AreaManagerp

Andrea:Manager Mary:TopManagerp

John

Supervised Supervised

OfficeMate

OfficeMate

(68)

Andrea’s Example (cont.)

AreaManagerp TopManagerp

AreaManager TopManager Manager

Employee

{disjoint,complete}

Supervised OfficeMate

Paul:AreaManagerp

Andrea:Manager Mary:TopManagerp

John

Supervised Supervised

OfficeMate

OfficeMate

Q(X) :- Supervised(X,Y), TopManager(Y), Officemate(Y,Z), AreaManager(Z)

(69)

Andrea’s Example (cont.)

AreaManager TopManager Manager

Employee

{disjoint,complete}

Supervised OfficeMate

Paul:AreaManagerp

Andrea:Manager Mary:TopManagerp

John

Supervised Supervised

OfficeMate

OfficeMate

Q(X) :- Supervised(X,Y), TopManager(Y), Officemate(Y,Z), AreaManager(Z)

=⇒ { John }

(70)

Partial incomplete DB assumption

Partial DB assumption (or conceptual schema with DBox): complete informationabout someterm appearing in the conceptual schema

Partial incomplete DB assumption (or conceptual schema with ABox): incomplete information about sometermappearing in the conceptual schema

The partial incomplete DB assumption (conceptual schema with ABox) is crucial in data integration scenarios.

(71)

Partial incomplete DB assumption

Employee Works-for 1..⋆ Project

(72)

Partial incomplete DB assumption

Employee Works-for 1..⋆ Project

DBox:

Works-for = { hJohn,Prj-Ai, hMary,Prj-Ai } Project = { Prj-A, Prj-B }

(73)

Partial incomplete DB assumption

Employee Works-for 1..⋆ Project

DBox:

Works-for = { hJohn,Prj-Ai, hMary,Prj-Ai } Project = { Prj-A, Prj-B }

=⇒ INCONSISTENT

(74)

Partial incomplete DB assumption

Employee Works-for 1..⋆ Project

DBox:

Works-for = { hJohn,Prj-Ai, hMary,Prj-Ai } Project = { Prj-A, Prj-B }

=⇒ INCONSISTENT

ABox:

Works-for ⊇ { hJohn,Prj-Ai, hMary,Prj-Ai } Project ⊇ { Prj-A, Prj-B }

(75)

Partial incomplete DB assumption

Employee Works-for 1..⋆ Project

ABox:

Works-for ⊇ { hJohn,Prj-Ai, hMary,Prj-Ai } Project ⊇ { Prj-A, Prj-B }

(76)

Partial incomplete DB assumption

Employee Works-for 1..⋆ Project

ABox:

Works-for ⊇ { hJohn,Prj-Ai, hMary,Prj-Ai } Project ⊇ { Prj-A, Prj-B }

Q(X) :- Works-for(Y,X)

(77)

Partial incomplete DB assumption

Employee Works-for 1..⋆ Project

ABox:

Works-for ⊇ { hJohn,Prj-Ai, hMary,Prj-Ai } Project ⊇ { Prj-A, Prj-B }

Q(X) :- Works-for(Y,X)

=⇒ { Prj-A, Prj-B }

(78)

Partial incomplete DB assumption

Employee Works-for 1..⋆ Project

ABox:

Works-for ⊇ { hJohn,Prj-Ai, hMary,Prj-Ai } Project ⊇ { Prj-A, Prj-B }

Q(X) :- Works-for(Y,X)

=⇒ { Prj-A, Prj-B }

=⇒ Q’(X) :- Project(X) ∪ Works-for(Y,X)

(79)

View based Query Processing

Mappings between the conceptual schema terms and the information source terms are not necessarily atomic.

Mappingscan be given in terms of a set of ABox(or DBox)facts:

GAV(global-as-view): ABox (or DBox) facts over the information source vocabulary are associated to terms in the conceptual schema

both the DB and the partial DB assumptions are special cases of GAV

an ER schema can be easily mapped to its corresponding relational schema in some normal form via a GAV mapping

LAV(local-as-view): a ABox or DBox over the conceptual schema vocabulary is associated to each term in the information source;

GLAV: mix of the above.

It is non-trivial, even in the pure GAV setting - which is wrongly believed to be computable by simple view unfolding.

(80)

Sound GAV mapping

Manager Employee

PaySlipNumber:Integer Salary:Integer

Project

ProjectCode:String 1..

Works-for

(81)

Sound GAV mapping

Manager Employee

PaySlipNumber:Integer Salary:Integer

Project

ProjectCode:String 1..

Works-for

1-Employee(PaySlipNumber ,Salary,ManagerP) 2-Works-for(PaySlipNumber,ProjectCode)

(82)

Sound GAV mapping

Manager Employee

PaySlipNumber:Integer Salary:Integer

Project

ProjectCode:String 1..

Works-for

1-Employee(PaySlipNumber ,Salary,ManagerP) 2-Works-for(PaySlipNumber,ProjectCode)

Employee(X) :- 1-Employee(X,Y,false) Manager(X) :- 1-Employee(X,Y,true) Project(Y) :- 2-Works-for(X,Y)

Works-for(X,Y) :- 2-Works-for(X,Y) Salary(X,Y) :- 1-Employee(X,Y,Z)

(83)

Sound GAV mapping

Manager Employee

PaySlipNumber:Integer Salary:Integer

Project

ProjectCode:String 1..

Works-for

1-Employee(PaySlipNumber ,Salary,ManagerP) 2-Works-for(PaySlipNumber,ProjectCode)

Employee(X) :- 1-Employee(X,Y,false) Manager(X) :- 1-Employee(X,Y,true) Project(Y) :- 2-Works-for(X,Y)

Works-for(X,Y) :- 2-Works-for(X,Y) Salary(X,Y) :- 1-Employee(X,Y,Z)

Q(X) :- Employee(X)

(84)

Sound GAV mapping

Manager Employee

PaySlipNumber:Integer Salary:Integer

Project

ProjectCode:String 1..

Works-for

1-Employee(PaySlipNumber ,Salary,ManagerP) 2-Works-for(PaySlipNumber,ProjectCode)

Employee(X) :- 1-Employee(X,Y,false) Manager(X) :- 1-Employee(X,Y,true) Project(Y) :- 2-Works-for(X,Y)

Works-for(X,Y) :- 2-Works-for(X,Y) Salary(X,Y) :- 1-Employee(X,Y,Z)

Q(X) :- Employee(X)

= Q’(X) :- 1-Employee(X,Y,Z) 2-Works-for(X,W)

(85)

Sound GAV mapping

Manager Employee

PaySlipNumber:Integer Salary:Integer

Project

ProjectCode:String 1..

Works-for

1-Employee(PaySlipNumber ,Salary,ManagerP) 2-Works-for(PaySlipNumber,ProjectCode)

Employee(X) :- 1-Employee(X,Y,false) Manager(X) :- 1-Employee(X,Y,true) Project(Y) :- 2-Works-for(X,Y)

Works-for(X,Y) :- 2-Works-for(X,Y) Salary(X,Y) :- 1-Employee(X,Y,Z)

Q(X) :- Employee(X)

(86)

Sound LAV mapping

Manager Employee

PaySlipNumber:Integer Salary:Integer

Project

ProjectCode:String

Works-for1..⋆

(87)

Sound LAV mapping

Manager Employee

PaySlipNumber:Integer Salary:Integer

Project

ProjectCode:String

Works-for1..⋆

1-Employee(PaySlipNumber ,Salary,ManagerP) 2-Works-for(PaySlipNumber,ProjectCode)

(88)

Sound LAV mapping

Manager Employee

PaySlipNumber:Integer Salary:Integer

Project

ProjectCode:String

Works-for1..⋆

1-Employee(PaySlipNumber ,Salary,ManagerP) 2-Works-for(PaySlipNumber,ProjectCode)

1-Employee(X,Y,Z) :- Manager(X), Salary(X,Y), Z=true

1-Employee(X,Y,Z) :- Employee(X), ¬Manager(X), Salary(X,Y), Z=false 2-Works-for(X,Y) :- Works-for(X,Y)

(89)

Sound LAV mapping

Manager Employee

PaySlipNumber:Integer Salary:Integer

Project

ProjectCode:String

Works-for1..⋆

1-Employee(PaySlipNumber ,Salary,ManagerP) 2-Works-for(PaySlipNumber,ProjectCode)

1-Employee(X,Y,Z) :- Manager(X), Salary(X,Y), Z=true

1-Employee(X,Y,Z) :- Employee(X), ¬Manager(X), Salary(X,Y), Z=false 2-Works-for(X,Y) :- Works-for(X,Y)

Q(X) :- Manager(X), Works-for(X,Y), Project(Y)

(90)

Sound LAV mapping

Manager Employee

PaySlipNumber:Integer Salary:Integer

Project

ProjectCode:String

Works-for1..⋆

1-Employee(PaySlipNumber ,Salary,ManagerP) 2-Works-for(PaySlipNumber,ProjectCode)

1-Employee(X,Y,Z) :- Manager(X), Salary(X,Y), Z=true

1-Employee(X,Y,Z) :- Employee(X), ¬Manager(X), Salary(X,Y), Z=false 2-Works-for(X,Y) :- Works-for(X,Y)

Q(X) :- Manager(X), Works-for(X,Y), Project(Y)

= Q’(X) :- 1-Employee(X,Y,true), 2-Works-for(X,Z)

(91)

Reasoning over queries

Q(X,Y) :- Employee(X), Works-for(X,Y), Manages(X,Y)

AreaManager TopManager

Manager Project

ProjectCode:String

Employee

PaySlipNumber:Integer Salary:Integer

{disjoint,complete}

1..

Works-for

1..1

1..1

Manages

∀x.Manager(x)→ ∀y.¬WORKS-FOR(x,y)

(92)

Reasoning over queries

Q(X,Y) :- Employee(X), Works-for(X,Y), Manages(X,Y)

AreaManager TopManager

Manager Project

ProjectCode:String

Employee

PaySlipNumber:Integer Salary:Integer

{disjoint,complete}

1..

Works-for

1..1

1..1

Manages

∀x.Manager(x)→ ∀y.¬WORKS-FOR(x,y)

INCONSISTENT QUERY!

(93)

Conclusions

(94)

Conclusions

Do you want to exploit conceptual schema knowledge (i.e., an ontology)

in your data intensive application?

(95)

Conclusions

Do you want to exploit conceptual schema knowledge (i.e., an ontology)

in your data intensive application?

Pay attention!

Referências

Documentos relacionados

Do amor," mas do amor vago de poeta, Como um beijo invizivel que fluctua.... Ella

Despercebido: não visto, não notado, não observado, ignorado.. Não me passou despercebido

Extinction with social support is blocked by the protein synthesis inhibitors anisomycin and rapamycin and by the inhibitor of gene expression 5,6-dichloro-1- β-

No caso e x p líc ito da Biblioteca Central da UFPb, ela já vem seguindo diretrizes para a seleção de periódicos desde 1978,, diretrizes essas que valem para os 7

i) A condutividade da matriz vítrea diminui com o aumento do tempo de tratamento térmico (Fig.. 241 pequena quantidade de cristais existentes na amostra já provoca um efeito

Outrossim, o fato das pontes miocárdicas serem mais diagnosticadas em pacientes com hipertrofia ventricular é controverso, pois alguns estudos demonstram correlação

Peça de mão de alta rotação pneumática com sistema Push Button (botão para remoção de broca), podendo apresentar passagem dupla de ar e acoplamento para engate rápido

Em relação à situação actual, mesmo depois do apoio dos vários programas de ajuda à reconversão, constata-se que ainda mais de 50 % das vinhas se encontram implantada