146
Preferences, Queries, Logics Jan Chomicki University at Buffalo DBRank, August 29, 2011 Jan Chomicki Preferences, Queries, Logics DBRank, August 29, 2011 1 / 46

Preferences, Queries, Logics

  • Upload
    others

  • View
    12

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Preferences, Queries, Logics

Preferences, Queries, Logics

Jan ChomickiUniversity at Buffalo

DBRank, August 29, 2011

Jan Chomicki Preferences, Queries, Logics DBRank, August 29, 2011 1 / 46

Page 2: Preferences, Queries, Logics

Plan of the talk

1 Preference relations

2 Preference queries

3 Advanced topics

Jan Chomicki Preferences, Queries, Logics DBRank, August 29, 2011 2 / 46

Page 3: Preferences, Queries, Logics

Part I

Preference relations

Jan Chomicki Preferences, Queries, Logics DBRank, August 29, 2011 3 / 46

Page 4: Preferences, Queries, Logics

Motivation

Jan Chomicki Preferences, Queries, Logics DBRank, August 29, 2011 4 / 46

Page 5: Preferences, Queries, Logics

Preference relations

Universe of objects

constants: uninterpreted, numbers,...

individuals (entities)

tuples

sets

Preference relation ¡

binary relation between objects

x ¡ y � x is better than y � x dominates y

an abstract, uniform way of talking about (relative) desirability,worth, cost, timeliness,..., and their combinations

preference relations used in preference queries

Jan Chomicki Preferences, Queries, Logics DBRank, August 29, 2011 5 / 46

Page 6: Preferences, Queries, Logics

Preference relations

Universe of objects

constants: uninterpreted, numbers,...

individuals (entities)

tuples

sets

Preference relation ¡

binary relation between objects

x ¡ y � x is better than y � x dominates y

an abstract, uniform way of talking about (relative) desirability,worth, cost, timeliness,..., and their combinations

preference relations used in preference queries

Jan Chomicki Preferences, Queries, Logics DBRank, August 29, 2011 5 / 46

Page 7: Preferences, Queries, Logics

Buying a car

Salesman: What kind of car do you prefer?Customer: The newer the better, if it is the same make. And cheap, too.Salesman: Which is more important for you: the age or the price?Customer: The age, definitely.Salesman: Those are the best cars, according to your preferences, that wehave in stock.Customer: Wait...it better be a BMW.

Jan Chomicki Preferences, Queries, Logics DBRank, August 29, 2011 6 / 46

Page 8: Preferences, Queries, Logics

Buying a car

Salesman: What kind of car do you prefer?

Customer: The newer the better, if it is the same make. And cheap, too.Salesman: Which is more important for you: the age or the price?Customer: The age, definitely.Salesman: Those are the best cars, according to your preferences, that wehave in stock.Customer: Wait...it better be a BMW.

Jan Chomicki Preferences, Queries, Logics DBRank, August 29, 2011 6 / 46

Page 9: Preferences, Queries, Logics

Buying a car

Salesman: What kind of car do you prefer?Customer: The newer the better, if it is the same make. And cheap, too.

Salesman: Which is more important for you: the age or the price?Customer: The age, definitely.Salesman: Those are the best cars, according to your preferences, that wehave in stock.Customer: Wait...it better be a BMW.

Jan Chomicki Preferences, Queries, Logics DBRank, August 29, 2011 6 / 46

Page 10: Preferences, Queries, Logics

Buying a car

Salesman: What kind of car do you prefer?Customer: The newer the better, if it is the same make. And cheap, too.Salesman: Which is more important for you: the age or the price?

Customer: The age, definitely.Salesman: Those are the best cars, according to your preferences, that wehave in stock.Customer: Wait...it better be a BMW.

Jan Chomicki Preferences, Queries, Logics DBRank, August 29, 2011 6 / 46

Page 11: Preferences, Queries, Logics

Buying a car

Salesman: What kind of car do you prefer?Customer: The newer the better, if it is the same make. And cheap, too.Salesman: Which is more important for you: the age or the price?Customer: The age, definitely.

Salesman: Those are the best cars, according to your preferences, that wehave in stock.Customer: Wait...it better be a BMW.

Jan Chomicki Preferences, Queries, Logics DBRank, August 29, 2011 6 / 46

Page 12: Preferences, Queries, Logics

Buying a car

Salesman: What kind of car do you prefer?Customer: The newer the better, if it is the same make. And cheap, too.Salesman: Which is more important for you: the age or the price?Customer: The age, definitely.Salesman: Those are the best cars, according to your preferences, that wehave in stock.

Customer: Wait...it better be a BMW.

Jan Chomicki Preferences, Queries, Logics DBRank, August 29, 2011 6 / 46

Page 13: Preferences, Queries, Logics

Buying a car

Salesman: What kind of car do you prefer?Customer: The newer the better, if it is the same make. And cheap, too.Salesman: Which is more important for you: the age or the price?Customer: The age, definitely.Salesman: Those are the best cars, according to your preferences, that wehave in stock.Customer: Wait...it better be a BMW.

Jan Chomicki Preferences, Queries, Logics DBRank, August 29, 2011 6 / 46

Page 14: Preferences, Queries, Logics

Preferences in perspective

Applications of preferences and preference queries

1 decision making

2 e-commerce

3 digital libraries

4 personalization

Preferences are multi-disciplinary

economic theory: von Neumann, Arrow, Sen

philosophy: Aristotle, von Wright

psychology: Slovic

artificial intelligence: Boutilier, Brafman

databases: Kießling, Kossmann

Jan Chomicki Preferences, Queries, Logics DBRank, August 29, 2011 7 / 46

Page 15: Preferences, Queries, Logics

Preferences in perspective

Applications of preferences and preference queries

1 decision making

2 e-commerce

3 digital libraries

4 personalization

Preferences are multi-disciplinary

economic theory: von Neumann, Arrow, Sen

philosophy: Aristotle, von Wright

psychology: Slovic

artificial intelligence: Boutilier, Brafman

databases: Kießling, Kossmann

Jan Chomicki Preferences, Queries, Logics DBRank, August 29, 2011 7 / 46

Page 16: Preferences, Queries, Logics

Preferences in perspective

Applications of preferences and preference queries

1 decision making

2 e-commerce

3 digital libraries

4 personalization

Preferences are multi-disciplinary

economic theory: von Neumann, Arrow, Sen

philosophy: Aristotle, von Wright

psychology: Slovic

artificial intelligence: Boutilier, Brafman

databases: Kießling, Kossmann

Jan Chomicki Preferences, Queries, Logics DBRank, August 29, 2011 7 / 46

Page 17: Preferences, Queries, Logics

Properties of preference relations

Properties of ¡

irreflexivity: @x . x £ x

asymmetry: @x , y . x ¡ y ñ y £ x

transitivity: @x , y , z . px ¡ y ^ y ¡ zq ñ x ¡ z

negative transitivity: @x , y , z . px £ y ^ y £ zq ñ x £ z

connectivity: @x , y . x ¡ y _ y ¡ x _ x � y

Orders

strict partial order (SPO): irreflexive and transitive

weak order (WO): negatively transitive SPO

total order: connected SPO

Jan Chomicki Preferences, Queries, Logics DBRank, August 29, 2011 8 / 46

Page 18: Preferences, Queries, Logics

Properties of preference relations

Properties of ¡

irreflexivity: @x . x £ x

asymmetry: @x , y . x ¡ y ñ y £ x

transitivity: @x , y , z . px ¡ y ^ y ¡ zq ñ x ¡ z

negative transitivity: @x , y , z . px £ y ^ y £ zq ñ x £ z

connectivity: @x , y . x ¡ y _ y ¡ x _ x � y

Orders

strict partial order (SPO): irreflexive and transitive

weak order (WO): negatively transitive SPO

total order: connected SPO

Jan Chomicki Preferences, Queries, Logics DBRank, August 29, 2011 8 / 46

Page 19: Preferences, Queries, Logics

Properties of preference relations

Properties of ¡

irreflexivity: @x . x £ x

asymmetry: @x , y . x ¡ y ñ y £ x

transitivity: @x , y , z . px ¡ y ^ y ¡ zq ñ x ¡ z

negative transitivity: @x , y , z . px £ y ^ y £ zq ñ x £ z

connectivity: @x , y . x ¡ y _ y ¡ x _ x � y

Orders

strict partial order (SPO): irreflexive and transitive

weak order (WO): negatively transitive SPO

total order: connected SPO

Jan Chomicki Preferences, Queries, Logics DBRank, August 29, 2011 8 / 46

Page 20: Preferences, Queries, Logics

Weak and total orders

Weak order

a b

c d e

f

Total order

a

d

f

Jan Chomicki Preferences, Queries, Logics DBRank, August 29, 2011 9 / 46

Page 21: Preferences, Queries, Logics

Order properties of preference relations

Irreflexivity, asymmetry: uncontroversial.

Transitivity:

captures rationality of preference

not always guaranteed: voting paradoxes

helps with preference querying

Negative transitivity:

scoring functions represent weak orders

We assume that preference relations are SPOs.

Jan Chomicki Preferences, Queries, Logics DBRank, August 29, 2011 10 / 46

Page 22: Preferences, Queries, Logics

Order properties of preference relations

Irreflexivity, asymmetry: uncontroversial.

Transitivity:

captures rationality of preference

not always guaranteed: voting paradoxes

helps with preference querying

Negative transitivity:

scoring functions represent weak orders

We assume that preference relations are SPOs.

Jan Chomicki Preferences, Queries, Logics DBRank, August 29, 2011 10 / 46

Page 23: Preferences, Queries, Logics

Order properties of preference relations

Irreflexivity, asymmetry: uncontroversial.

Transitivity:

captures rationality of preference

not always guaranteed: voting paradoxes

helps with preference querying

Negative transitivity:

scoring functions represent weak orders

We assume that preference relations are SPOs.

Jan Chomicki Preferences, Queries, Logics DBRank, August 29, 2011 10 / 46

Page 24: Preferences, Queries, Logics

Order properties of preference relations

Irreflexivity, asymmetry: uncontroversial.

Transitivity:

captures rationality of preference

not always guaranteed: voting paradoxes

helps with preference querying

Negative transitivity:

scoring functions represent weak orders

We assume that preference relations are SPOs.

Jan Chomicki Preferences, Queries, Logics DBRank, August 29, 2011 10 / 46

Page 25: Preferences, Queries, Logics

Order properties of preference relations

Irreflexivity, asymmetry: uncontroversial.

Transitivity:

captures rationality of preference

not always guaranteed: voting paradoxes

helps with preference querying

Negative transitivity:

scoring functions represent weak orders

We assume that preference relations are SPOs.

Jan Chomicki Preferences, Queries, Logics DBRank, August 29, 2011 10 / 46

Page 26: Preferences, Queries, Logics

Not every SPO is a WO

Indifference �

x � y � x £ y ^ y £ x .

Canonical example

mazda ¡ kia, mazda �i vw, kia �i vw

Violation of negative transitivity

mazda £ vw, vw £ kia, mazda ¡ kia

Jan Chomicki Preferences, Queries, Logics DBRank, August 29, 2011 11 / 46

Page 27: Preferences, Queries, Logics

Not every SPO is a WO

Indifference �

x � y � x £ y ^ y £ x .

Canonical example

mazda ¡ kia, mazda �i vw, kia �i vw

Violation of negative transitivity

mazda £ vw, vw £ kia, mazda ¡ kia

Jan Chomicki Preferences, Queries, Logics DBRank, August 29, 2011 11 / 46

Page 28: Preferences, Queries, Logics

Not every SPO is a WO

Indifference �

x � y � x £ y ^ y £ x .

Canonical example

mazda ¡ kia, mazda �i vw, kia �i vw

Violation of negative transitivity

mazda £ vw, vw £ kia, mazda ¡ kia

Jan Chomicki Preferences, Queries, Logics DBRank, August 29, 2011 11 / 46

Page 29: Preferences, Queries, Logics

Not every SPO is a WO

Indifference �

x � y � x £ y ^ y £ x .

Canonical example

mazda ¡ kia, mazda �i vw, kia �i vw

Violation of negative transitivity

mazda £ vw, vw £ kia, mazda ¡ kia

Jan Chomicki Preferences, Queries, Logics DBRank, August 29, 2011 11 / 46

Page 30: Preferences, Queries, Logics

Preference specification

Explicit preference relations

Finite sets of pairs: bmw ¡ mazda, mazda ¡ kia,...

Implicit preference relations

can be infinite but finitely representable

defined using logic formulas in some constraint theory:

pm1, y1, p1q ¡1 pm2, y2, p2q � y1 ¡ y2 _ py1 � y2 ^ p1   p2q

for relation CarpMake,Year ,Priceq.

defined using preference constructors (Preference SQL)

defined using real-valued scoring functions: F pm, y , pq � α � y � β � ppm1, y1, p1q ¡2 pm2, y2, p2q � F pm1, y1, p1q ¡ F pm2, y2, p2q

Jan Chomicki Preferences, Queries, Logics DBRank, August 29, 2011 12 / 46

Page 31: Preferences, Queries, Logics

Preference specification

Explicit preference relations

Finite sets of pairs: bmw ¡ mazda, mazda ¡ kia,...

Implicit preference relations

can be infinite but finitely representable

defined using logic formulas in some constraint theory:

pm1, y1, p1q ¡1 pm2, y2, p2q � y1 ¡ y2 _ py1 � y2 ^ p1   p2q

for relation CarpMake,Year ,Priceq.

defined using preference constructors (Preference SQL)

defined using real-valued scoring functions: F pm, y , pq � α � y � β � ppm1, y1, p1q ¡2 pm2, y2, p2q � F pm1, y1, p1q ¡ F pm2, y2, p2q

Jan Chomicki Preferences, Queries, Logics DBRank, August 29, 2011 12 / 46

Page 32: Preferences, Queries, Logics

Preference specification

Explicit preference relations

Finite sets of pairs: bmw ¡ mazda, mazda ¡ kia,...

Implicit preference relations

can be infinite but finitely representable

defined using logic formulas in some constraint theory:

pm1, y1, p1q ¡1 pm2, y2, p2q � y1 ¡ y2 _ py1 � y2 ^ p1   p2q

for relation CarpMake,Year ,Priceq.

defined using preference constructors (Preference SQL)

defined using real-valued scoring functions: F pm, y , pq � α � y � β � ppm1, y1, p1q ¡2 pm2, y2, p2q � F pm1, y1, p1q ¡ F pm2, y2, p2q

Jan Chomicki Preferences, Queries, Logics DBRank, August 29, 2011 12 / 46

Page 33: Preferences, Queries, Logics

Preference specification

Explicit preference relations

Finite sets of pairs: bmw ¡ mazda, mazda ¡ kia,...

Implicit preference relations

can be infinite but finitely representable

defined using logic formulas in some constraint theory:

pm1, y1, p1q ¡1 pm2, y2, p2q � y1 ¡ y2 _ py1 � y2 ^ p1   p2q

for relation CarpMake,Year ,Priceq.

defined using preference constructors (Preference SQL)

defined using real-valued scoring functions: F pm, y , pq � α � y � β � ppm1, y1, p1q ¡2 pm2, y2, p2q � F pm1, y1, p1q ¡ F pm2, y2, p2q

Jan Chomicki Preferences, Queries, Logics DBRank, August 29, 2011 12 / 46

Page 34: Preferences, Queries, Logics

Preference specification

Explicit preference relations

Finite sets of pairs: bmw ¡ mazda, mazda ¡ kia,...

Implicit preference relations

can be infinite but finitely representable

defined using logic formulas in some constraint theory:

pm1, y1, p1q ¡1 pm2, y2, p2q � y1 ¡ y2 _ py1 � y2 ^ p1   p2q

for relation CarpMake,Year ,Priceq.

defined using preference constructors (Preference SQL)

defined using real-valued scoring functions: F pm, y , pq � α � y � β � ppm1, y1, p1q ¡2 pm2, y2, p2q � F pm1, y1, p1q ¡ F pm2, y2, p2q

Jan Chomicki Preferences, Queries, Logics DBRank, August 29, 2011 12 / 46

Page 35: Preferences, Queries, Logics

Preference specification

Explicit preference relations

Finite sets of pairs: bmw ¡ mazda, mazda ¡ kia,...

Implicit preference relations

can be infinite but finitely representable

defined using logic formulas in some constraint theory:

pm1, y1, p1q ¡1 pm2, y2, p2q � y1 ¡ y2 _ py1 � y2 ^ p1   p2q

for relation CarpMake,Year ,Priceq.

defined using preference constructors (Preference SQL)

defined using real-valued scoring functions:

F pm, y , pq � α � y � β � ppm1, y1, p1q ¡2 pm2, y2, p2q � F pm1, y1, p1q ¡ F pm2, y2, p2q

Jan Chomicki Preferences, Queries, Logics DBRank, August 29, 2011 12 / 46

Page 36: Preferences, Queries, Logics

Preference specification

Explicit preference relations

Finite sets of pairs: bmw ¡ mazda, mazda ¡ kia,...

Implicit preference relations

can be infinite but finitely representable

defined using logic formulas in some constraint theory:

pm1, y1, p1q ¡1 pm2, y2, p2q � y1 ¡ y2 _ py1 � y2 ^ p1   p2q

for relation CarpMake,Year ,Priceq.

defined using preference constructors (Preference SQL)

defined using real-valued scoring functions: F pm, y , pq � α � y � β � p

pm1, y1, p1q ¡2 pm2, y2, p2q � F pm1, y1, p1q ¡ F pm2, y2, p2q

Jan Chomicki Preferences, Queries, Logics DBRank, August 29, 2011 12 / 46

Page 37: Preferences, Queries, Logics

Preference specification

Explicit preference relations

Finite sets of pairs: bmw ¡ mazda, mazda ¡ kia,...

Implicit preference relations

can be infinite but finitely representable

defined using logic formulas in some constraint theory:

pm1, y1, p1q ¡1 pm2, y2, p2q � y1 ¡ y2 _ py1 � y2 ^ p1   p2q

for relation CarpMake,Year ,Priceq.

defined using preference constructors (Preference SQL)

defined using real-valued scoring functions: F pm, y , pq � α � y � β � ppm1, y1, p1q ¡2 pm2, y2, p2q � F pm1, y1, p1q ¡ F pm2, y2, p2q

Jan Chomicki Preferences, Queries, Logics DBRank, August 29, 2011 12 / 46

Page 38: Preferences, Queries, Logics

Logic formulas

The language of logic formulasconstants

object (tuple) attributes

comparison operators: �, ��, ,¡, . . .

arithmetic operators: �, �, . . .

Boolean connectives: ,^,_

quantifiers:� @, D� usually can be eliminated (quantifier elimination)

no database relations

Jan Chomicki Preferences, Queries, Logics DBRank, August 29, 2011 13 / 46

Page 39: Preferences, Queries, Logics

Logic formulas

The language of logic formulasconstants

object (tuple) attributes

comparison operators: �, ��, ,¡, . . .

arithmetic operators: �, �, . . .

Boolean connectives: ,^,_

quantifiers:� @, D� usually can be eliminated (quantifier elimination)

no database relations

Jan Chomicki Preferences, Queries, Logics DBRank, August 29, 2011 13 / 46

Page 40: Preferences, Queries, Logics

Representability

Definition

A scoring function f represents a preference relation ¡ if for all x , y

x ¡ y � f pxq ¡ f pyq.

Necessary condition for representability

The preference relation ¡ is a weak order.

Sufficient condition for representability

¡ is a weak order

the domain is countable or some continuity conditions are satisfied(studied in decision theory)

Jan Chomicki Preferences, Queries, Logics DBRank, August 29, 2011 14 / 46

Page 41: Preferences, Queries, Logics

Representability

Definition

A scoring function f represents a preference relation ¡ if for all x , y

x ¡ y � f pxq ¡ f pyq.

Necessary condition for representability

The preference relation ¡ is a weak order.

Sufficient condition for representability

¡ is a weak order

the domain is countable or some continuity conditions are satisfied(studied in decision theory)

Jan Chomicki Preferences, Queries, Logics DBRank, August 29, 2011 14 / 46

Page 42: Preferences, Queries, Logics

Representability

Definition

A scoring function f represents a preference relation ¡ if for all x , y

x ¡ y � f pxq ¡ f pyq.

Necessary condition for representability

The preference relation ¡ is a weak order.

Sufficient condition for representability

¡ is a weak order

the domain is countable or some continuity conditions are satisfied(studied in decision theory)

Jan Chomicki Preferences, Queries, Logics DBRank, August 29, 2011 14 / 46

Page 43: Preferences, Queries, Logics

Representability

Definition

A scoring function f represents a preference relation ¡ if for all x , y

x ¡ y � f pxq ¡ f pyq.

Necessary condition for representability

The preference relation ¡ is a weak order.

Sufficient condition for representability

¡ is a weak order

the domain is countable or some continuity conditions are satisfied(studied in decision theory)

Jan Chomicki Preferences, Queries, Logics DBRank, August 29, 2011 14 / 46

Page 44: Preferences, Queries, Logics

Preference constructors [Kießling, 2002]

Good values

Prefer v P S1 over v R S1.POS(Make,tmazda,vwu)

Bad values

Prefer v R S1 over v P S1.NEG(Make,tyugou)

Explicit preference

Preference encoded by a finitedirected graph.

EXP(Make,t(bmw,ford),...,(mazda,kia)u)

Value comparison

Prefer larger/smaller values.HIGHEST(Year)

LOWEST(Price)

Distance

Prefer values closer to v0.

AROUND(Price,12K)

Jan Chomicki Preferences, Queries, Logics DBRank, August 29, 2011 16 / 46

Page 45: Preferences, Queries, Logics

Preference constructors [Kießling, 2002]

Good values

Prefer v P S1 over v R S1.

POS(Make,tmazda,vwu)

Bad values

Prefer v R S1 over v P S1.NEG(Make,tyugou)

Explicit preference

Preference encoded by a finitedirected graph.

EXP(Make,t(bmw,ford),...,(mazda,kia)u)

Value comparison

Prefer larger/smaller values.HIGHEST(Year)

LOWEST(Price)

Distance

Prefer values closer to v0.

AROUND(Price,12K)

Jan Chomicki Preferences, Queries, Logics DBRank, August 29, 2011 16 / 46

Page 46: Preferences, Queries, Logics

Preference constructors [Kießling, 2002]

Good values

Prefer v P S1 over v R S1.POS(Make,tmazda,vwu)

Bad values

Prefer v R S1 over v P S1.NEG(Make,tyugou)

Explicit preference

Preference encoded by a finitedirected graph.

EXP(Make,t(bmw,ford),...,(mazda,kia)u)

Value comparison

Prefer larger/smaller values.HIGHEST(Year)

LOWEST(Price)

Distance

Prefer values closer to v0.

AROUND(Price,12K)

Jan Chomicki Preferences, Queries, Logics DBRank, August 29, 2011 16 / 46

Page 47: Preferences, Queries, Logics

Preference constructors [Kießling, 2002]

Good values

Prefer v P S1 over v R S1.POS(Make,tmazda,vwu)

Bad values

Prefer v R S1 over v P S1.

NEG(Make,tyugou)

Explicit preference

Preference encoded by a finitedirected graph.

EXP(Make,t(bmw,ford),...,(mazda,kia)u)

Value comparison

Prefer larger/smaller values.HIGHEST(Year)

LOWEST(Price)

Distance

Prefer values closer to v0.

AROUND(Price,12K)

Jan Chomicki Preferences, Queries, Logics DBRank, August 29, 2011 16 / 46

Page 48: Preferences, Queries, Logics

Preference constructors [Kießling, 2002]

Good values

Prefer v P S1 over v R S1.POS(Make,tmazda,vwu)

Bad values

Prefer v R S1 over v P S1.NEG(Make,tyugou)

Explicit preference

Preference encoded by a finitedirected graph.

EXP(Make,t(bmw,ford),...,(mazda,kia)u)

Value comparison

Prefer larger/smaller values.HIGHEST(Year)

LOWEST(Price)

Distance

Prefer values closer to v0.

AROUND(Price,12K)

Jan Chomicki Preferences, Queries, Logics DBRank, August 29, 2011 16 / 46

Page 49: Preferences, Queries, Logics

Preference constructors [Kießling, 2002]

Good values

Prefer v P S1 over v R S1.POS(Make,tmazda,vwu)

Bad values

Prefer v R S1 over v P S1.NEG(Make,tyugou)

Explicit preference

Preference encoded by a finitedirected graph.

EXP(Make,t(bmw,ford),...,(mazda,kia)u)

Value comparison

Prefer larger/smaller values.HIGHEST(Year)

LOWEST(Price)

Distance

Prefer values closer to v0.

AROUND(Price,12K)

Jan Chomicki Preferences, Queries, Logics DBRank, August 29, 2011 16 / 46

Page 50: Preferences, Queries, Logics

Preference constructors [Kießling, 2002]

Good values

Prefer v P S1 over v R S1.POS(Make,tmazda,vwu)

Bad values

Prefer v R S1 over v P S1.NEG(Make,tyugou)

Explicit preference

Preference encoded by a finitedirected graph.

EXP(Make,t(bmw,ford),...,(mazda,kia)u)

Value comparison

Prefer larger/smaller values.HIGHEST(Year)

LOWEST(Price)

Distance

Prefer values closer to v0.

AROUND(Price,12K)

Jan Chomicki Preferences, Queries, Logics DBRank, August 29, 2011 16 / 46

Page 51: Preferences, Queries, Logics

Preference constructors [Kießling, 2002]

Good values

Prefer v P S1 over v R S1.POS(Make,tmazda,vwu)

Bad values

Prefer v R S1 over v P S1.NEG(Make,tyugou)

Explicit preference

Preference encoded by a finitedirected graph.

EXP(Make,t(bmw,ford),...,(mazda,kia)u)

Value comparison

Prefer larger/smaller values.

HIGHEST(Year)

LOWEST(Price)

Distance

Prefer values closer to v0.

AROUND(Price,12K)

Jan Chomicki Preferences, Queries, Logics DBRank, August 29, 2011 16 / 46

Page 52: Preferences, Queries, Logics

Preference constructors [Kießling, 2002]

Good values

Prefer v P S1 over v R S1.POS(Make,tmazda,vwu)

Bad values

Prefer v R S1 over v P S1.NEG(Make,tyugou)

Explicit preference

Preference encoded by a finitedirected graph.

EXP(Make,t(bmw,ford),...,(mazda,kia)u)

Value comparison

Prefer larger/smaller values.HIGHEST(Year)

LOWEST(Price)

Distance

Prefer values closer to v0.

AROUND(Price,12K)

Jan Chomicki Preferences, Queries, Logics DBRank, August 29, 2011 16 / 46

Page 53: Preferences, Queries, Logics

Preference constructors [Kießling, 2002]

Good values

Prefer v P S1 over v R S1.POS(Make,tmazda,vwu)

Bad values

Prefer v R S1 over v P S1.NEG(Make,tyugou)

Explicit preference

Preference encoded by a finitedirected graph.

EXP(Make,t(bmw,ford),...,(mazda,kia)u)

Value comparison

Prefer larger/smaller values.HIGHEST(Year)

LOWEST(Price)

Distance

Prefer values closer to v0.

AROUND(Price,12K)

Jan Chomicki Preferences, Queries, Logics DBRank, August 29, 2011 16 / 46

Page 54: Preferences, Queries, Logics

Preference constructors [Kießling, 2002]

Good values

Prefer v P S1 over v R S1.POS(Make,tmazda,vwu)

Bad values

Prefer v R S1 over v P S1.NEG(Make,tyugou)

Explicit preference

Preference encoded by a finitedirected graph.

EXP(Make,t(bmw,ford),...,(mazda,kia)u)

Value comparison

Prefer larger/smaller values.HIGHEST(Year)

LOWEST(Price)

Distance

Prefer values closer to v0.

AROUND(Price,12K)

Jan Chomicki Preferences, Queries, Logics DBRank, August 29, 2011 16 / 46

Page 55: Preferences, Queries, Logics

Combining preferences

Preference composition

combining preferences about objects of the same kind

dimensionality is not increased

representing preference aggregation, revision, ...

Preference accumulation

defining preferences over objects in terms of preferences over simplerobjects

dimensionality is increased (preferences over Cartesian product).

Jan Chomicki Preferences, Queries, Logics DBRank, August 29, 2011 17 / 46

Page 56: Preferences, Queries, Logics

Combining preferences

Preference composition

combining preferences about objects of the same kind

dimensionality is not increased

representing preference aggregation, revision, ...

Preference accumulation

defining preferences over objects in terms of preferences over simplerobjects

dimensionality is increased (preferences over Cartesian product).

Jan Chomicki Preferences, Queries, Logics DBRank, August 29, 2011 17 / 46

Page 57: Preferences, Queries, Logics

Combining preferences

Preference composition

combining preferences about objects of the same kind

dimensionality is not increased

representing preference aggregation, revision, ...

Preference accumulation

defining preferences over objects in terms of preferences over simplerobjects

dimensionality is increased (preferences over Cartesian product).

Jan Chomicki Preferences, Queries, Logics DBRank, August 29, 2011 17 / 46

Page 58: Preferences, Queries, Logics

Combining preferences: composition

Boolean composition

x ¡Y y � x ¡1 y _ x ¡2 y

and similarly for X.

Prioritized composition

x ¡lex y � x ¡1 y _ py £1 x ^ x ¡2 yq.

Pareto composition

x ¡Par y � px ¡1 y ^ y £2 xq _ px ¡2 y ^ y £1 xq.

Jan Chomicki Preferences, Queries, Logics DBRank, August 29, 2011 18 / 46

Page 59: Preferences, Queries, Logics

Combining preferences: composition

Boolean composition

x ¡Y y � x ¡1 y _ x ¡2 y

and similarly for X.

Prioritized composition

x ¡lex y � x ¡1 y _ py £1 x ^ x ¡2 yq.

Pareto composition

x ¡Par y � px ¡1 y ^ y £2 xq _ px ¡2 y ^ y £1 xq.

Jan Chomicki Preferences, Queries, Logics DBRank, August 29, 2011 18 / 46

Page 60: Preferences, Queries, Logics

Combining preferences: composition

Boolean composition

x ¡Y y � x ¡1 y _ x ¡2 y

and similarly for X.

Prioritized composition

x ¡lex y � x ¡1 y _ py £1 x ^ x ¡2 yq.

Pareto composition

x ¡Par y � px ¡1 y ^ y £2 xq _ px ¡2 y ^ y £1 xq.

Jan Chomicki Preferences, Queries, Logics DBRank, August 29, 2011 18 / 46

Page 61: Preferences, Queries, Logics

Combining preferences: composition

Boolean composition

x ¡Y y � x ¡1 y _ x ¡2 y

and similarly for X.

Prioritized composition

x ¡lex y � x ¡1 y _ py £1 x ^ x ¡2 yq.

Pareto composition

x ¡Par y � px ¡1 y ^ y £2 xq _ px ¡2 y ^ y £1 xq.

Jan Chomicki Preferences, Queries, Logics DBRank, August 29, 2011 18 / 46

Page 62: Preferences, Queries, Logics

Preference composition

Preference relation ¡1

bmw

ford mazda

kia

Preference relation ¡2

bmw

ford

mazda

kia

Prioritized composition

bmw

ford

mazda

kia

Pareto composition

bmwford

mazdakia

Jan Chomicki Preferences, Queries, Logics DBRank, August 29, 2011 19 / 46

Page 63: Preferences, Queries, Logics

Preference composition

Preference relation ¡1

bmw

ford mazda

kia

Preference relation ¡2

bmw

ford

mazda

kia

Prioritized composition

bmw

ford

mazda

kia

Pareto composition

bmwford

mazdakia

Jan Chomicki Preferences, Queries, Logics DBRank, August 29, 2011 19 / 46

Page 64: Preferences, Queries, Logics

Preference composition

Preference relation ¡1

bmw

ford mazda

kia

Preference relation ¡2

bmw

ford

mazda

kia

Prioritized composition

bmw

ford

mazda

kia

Pareto composition

bmwford

mazdakia

Jan Chomicki Preferences, Queries, Logics DBRank, August 29, 2011 19 / 46

Page 65: Preferences, Queries, Logics

Preference composition

Preference relation ¡1

bmw

ford mazda

kia

Preference relation ¡2

bmw

ford

mazda

kia

Prioritized composition

bmw

ford

mazda

kia

Pareto composition

bmwford

mazdakia

Jan Chomicki Preferences, Queries, Logics DBRank, August 29, 2011 19 / 46

Page 66: Preferences, Queries, Logics

Preference composition

Preference relation ¡1

bmw

ford mazda

kia

Preference relation ¡2

bmw

ford

mazda

kia

Prioritized composition

bmw

ford

mazda

kia

Pareto composition

bmwford

mazdakia

Jan Chomicki Preferences, Queries, Logics DBRank, August 29, 2011 19 / 46

Page 67: Preferences, Queries, Logics

Combining preferences: accumulation [Kiessling, 2002]

Prioritized accumulation: ¡pr� p¡1 & ¡2q

px1, x2q ¡pr py1, y2q � x1 ¡1 y1 _ px1 � y1 ^ x2 ¡2 y2q.

Pareto accumulation: ¡pa� p¡1 b ¡2q

px1, x2q ¡pa py1, y2q � px1 ¡1 y1 ^ x2 ©2 y2q _ px1 ©1 y1 ^ x2 ¡2 y2q.

Properties

closure

associativity

commutativity of Pareto accumulation

Jan Chomicki Preferences, Queries, Logics DBRank, August 29, 2011 20 / 46

Page 68: Preferences, Queries, Logics

Combining preferences: accumulation [Kiessling, 2002]

Prioritized accumulation: ¡pr� p¡1 & ¡2q

px1, x2q ¡pr py1, y2q � x1 ¡1 y1 _ px1 � y1 ^ x2 ¡2 y2q.

Pareto accumulation: ¡pa� p¡1 b ¡2q

px1, x2q ¡pa py1, y2q � px1 ¡1 y1 ^ x2 ©2 y2q _ px1 ©1 y1 ^ x2 ¡2 y2q.

Properties

closure

associativity

commutativity of Pareto accumulation

Jan Chomicki Preferences, Queries, Logics DBRank, August 29, 2011 20 / 46

Page 69: Preferences, Queries, Logics

Combining preferences: accumulation [Kiessling, 2002]

Prioritized accumulation: ¡pr� p¡1 & ¡2q

px1, x2q ¡pr py1, y2q � x1 ¡1 y1 _ px1 � y1 ^ x2 ¡2 y2q.

Pareto accumulation: ¡pa� p¡1 b ¡2q

px1, x2q ¡pa py1, y2q � px1 ¡1 y1 ^ x2 ©2 y2q _ px1 ©1 y1 ^ x2 ¡2 y2q.

Properties

closure

associativity

commutativity of Pareto accumulation

Jan Chomicki Preferences, Queries, Logics DBRank, August 29, 2011 20 / 46

Page 70: Preferences, Queries, Logics

Combining preferences: accumulation [Kiessling, 2002]

Prioritized accumulation: ¡pr� p¡1 & ¡2q

px1, x2q ¡pr py1, y2q � x1 ¡1 y1 _ px1 � y1 ^ x2 ¡2 y2q.

Pareto accumulation: ¡pa� p¡1 b ¡2q

px1, x2q ¡pa py1, y2q � px1 ¡1 y1 ^ x2 ©2 y2q _ px1 ©1 y1 ^ x2 ¡2 y2q.

Properties

closure

associativity

commutativity of Pareto accumulation

Jan Chomicki Preferences, Queries, Logics DBRank, August 29, 2011 20 / 46

Page 71: Preferences, Queries, Logics

Skylines

Skyline

Given single-attribute total preference relations ¡A1 , . . . ,¡An for arelational schema RpA1, . . . ,Anq, the skyline preference relation ¡sky isdefined as

¡sky�¡A1 b ¡A2 b � � �b ¡An .

Unfolding the definition

px1, . . . , xnq ¡sky py1, . . . , ynq �

©

i

xi ©Aiyi ^ª

i

xi ¡Aiyi .

Jan Chomicki Preferences, Queries, Logics DBRank, August 29, 2011 21 / 46

Page 72: Preferences, Queries, Logics

Skylines

Skyline

Given single-attribute total preference relations ¡A1 , . . . ,¡An for arelational schema RpA1, . . . ,Anq, the skyline preference relation ¡sky isdefined as

¡sky�¡A1 b ¡A2 b � � �b ¡An .

Unfolding the definition

px1, . . . , xnq ¡sky py1, . . . , ynq �

©

i

xi ©Aiyi ^ª

i

xi ¡Aiyi .

Jan Chomicki Preferences, Queries, Logics DBRank, August 29, 2011 21 / 46

Page 73: Preferences, Queries, Logics

Skyline in Euclidean space

Two-dimensional Euclidean space

px1, x2q ¡sky py1, y2q � x1 ¥ y1 ^ x2 ¡ y2 _ x1 ¡ y1 ^ x2 ¥ y2

Skyline consists of ¡sky -maximal vectors

Jan Chomicki Preferences, Queries, Logics DBRank, August 29, 2011 22 / 46

Page 74: Preferences, Queries, Logics

Skyline in Euclidean space

Two-dimensional Euclidean space

px1, x2q ¡sky py1, y2q � x1 ¥ y1 ^ x2 ¡ y2 _ x1 ¡ y1 ^ x2 ¥ y2

Skyline consists of ¡sky -maximal vectors

Jan Chomicki Preferences, Queries, Logics DBRank, August 29, 2011 22 / 46

Page 75: Preferences, Queries, Logics

Skyline in Euclidean space

Two-dimensional Euclidean space

px1, x2q ¡sky py1, y2q � x1 ¥ y1 ^ x2 ¡ y2 _ x1 ¡ y1 ^ x2 ¥ y2

Skyline consists of ¡sky -maximal vectors

Jan Chomicki Preferences, Queries, Logics DBRank, August 29, 2011 22 / 46

Page 76: Preferences, Queries, Logics

Skyline properties

Invariance

A skyline preference relation is unaffacted by scaling or shifting in anydimension.

Maxima

A skyline consists of the maxima of monotonic scoring functions.

Skyline is not a weak order

p2, 0q £sky p0, 2q, p0, 2q £sky p1, 0q, p2, 0q ¡sky p1, 0q

Jan Chomicki Preferences, Queries, Logics DBRank, August 29, 2011 23 / 46

Page 77: Preferences, Queries, Logics

Skyline properties

Invariance

A skyline preference relation is unaffacted by scaling or shifting in anydimension.

Maxima

A skyline consists of the maxima of monotonic scoring functions.

Skyline is not a weak order

p2, 0q £sky p0, 2q, p0, 2q £sky p1, 0q, p2, 0q ¡sky p1, 0q

Jan Chomicki Preferences, Queries, Logics DBRank, August 29, 2011 23 / 46

Page 78: Preferences, Queries, Logics

Skyline properties

Invariance

A skyline preference relation is unaffacted by scaling or shifting in anydimension.

Maxima

A skyline consists of the maxima of monotonic scoring functions.

Skyline is not a weak order

p2, 0q £sky p0, 2q, p0, 2q £sky p1, 0q, p2, 0q ¡sky p1, 0q

Jan Chomicki Preferences, Queries, Logics DBRank, August 29, 2011 23 / 46

Page 79: Preferences, Queries, Logics

Skyline properties

Invariance

A skyline preference relation is unaffacted by scaling or shifting in anydimension.

Maxima

A skyline consists of the maxima of monotonic scoring functions.

Skyline is not a weak order

p2, 0q £sky p0, 2q, p0, 2q £sky p1, 0q, p2, 0q ¡sky p1, 0q

Jan Chomicki Preferences, Queries, Logics DBRank, August 29, 2011 23 / 46

Page 80: Preferences, Queries, Logics

Skyline in SQL

Grouping

Designating attributes not used in comparisons (DIFF).

Example

SELECT * FROM Car

SKYLINE Price MIN,

Year MAX,

Make DIFF

Jan Chomicki Preferences, Queries, Logics DBRank, August 29, 2011 24 / 46

Page 81: Preferences, Queries, Logics

Skyline in SQL

Grouping

Designating attributes not used in comparisons (DIFF).

Example

SELECT * FROM Car

SKYLINE Price MIN,

Year MAX,

Make DIFF

Jan Chomicki Preferences, Queries, Logics DBRank, August 29, 2011 24 / 46

Page 82: Preferences, Queries, Logics

Part II

Preference queries

Jan Chomicki Preferences, Queries, Logics DBRank, August 29, 2011 26 / 46

Page 83: Preferences, Queries, Logics

Winnow [Ch., 2002]

Winnow

new relational algebra operator ω (other names: Best, BMO)

retrieves the non-dominated (best) elements in a database relation

can be expressed in terms of other operators

Definition

Given a preference relation ¡ and a database relation r :

ω¡prq � tt P r | Dt 1 P r . t 1 ¡ tu.

Notation: If a preference relation ¡C is defined using a formula C , thenwe write ωC prq, instead of ω¡C

prq.

Skyline query

ω¡

sky prq computes the set of maximal vectors in r (the skyline set).

Jan Chomicki Preferences, Queries, Logics DBRank, August 29, 2011 27 / 46

Page 84: Preferences, Queries, Logics

Winnow [Ch., 2002]

Winnow

new relational algebra operator ω (other names: Best, BMO)

retrieves the non-dominated (best) elements in a database relation

can be expressed in terms of other operators

Definition

Given a preference relation ¡ and a database relation r :

ω¡prq � tt P r | Dt 1 P r . t 1 ¡ tu.

Notation: If a preference relation ¡C is defined using a formula C , thenwe write ωC prq, instead of ω¡C

prq.

Skyline query

ω¡

sky prq computes the set of maximal vectors in r (the skyline set).

Jan Chomicki Preferences, Queries, Logics DBRank, August 29, 2011 27 / 46

Page 85: Preferences, Queries, Logics

Winnow [Ch., 2002]

Winnow

new relational algebra operator ω (other names: Best, BMO)

retrieves the non-dominated (best) elements in a database relation

can be expressed in terms of other operators

Definition

Given a preference relation ¡ and a database relation r :

ω¡prq � tt P r | Dt 1 P r . t 1 ¡ tu.

Notation: If a preference relation ¡C is defined using a formula C , thenwe write ωC prq, instead of ω¡C

prq.

Skyline query

ω¡

sky prq computes the set of maximal vectors in r (the skyline set).

Jan Chomicki Preferences, Queries, Logics DBRank, August 29, 2011 27 / 46

Page 86: Preferences, Queries, Logics

Winnow [Ch., 2002]

Winnow

new relational algebra operator ω (other names: Best, BMO)

retrieves the non-dominated (best) elements in a database relation

can be expressed in terms of other operators

Definition

Given a preference relation ¡ and a database relation r :

ω¡prq � tt P r | Dt 1 P r . t 1 ¡ tu.

Notation: If a preference relation ¡C is defined using a formula C , thenwe write ωC prq, instead of ω¡C

prq.

Skyline query

ω¡

sky prq computes the set of maximal vectors in r (the skyline set).

Jan Chomicki Preferences, Queries, Logics DBRank, August 29, 2011 27 / 46

Page 87: Preferences, Queries, Logics

Winnow [Ch., 2002]

Winnow

new relational algebra operator ω (other names: Best, BMO)

retrieves the non-dominated (best) elements in a database relation

can be expressed in terms of other operators

Definition

Given a preference relation ¡ and a database relation r :

ω¡prq � tt P r | Dt 1 P r . t 1 ¡ tu.

Notation: If a preference relation ¡C is defined using a formula C , thenwe write ωC prq, instead of ω¡C

prq.

Skyline query

ω¡

sky prq computes the set of maximal vectors in r (the skyline set).

Jan Chomicki Preferences, Queries, Logics DBRank, August 29, 2011 27 / 46

Page 88: Preferences, Queries, Logics

Example of winnow

Relation CarpMake,Year ,Priceq

Preference relation:

pm, y , pq ¡1 pm1, y 1, p1q � y ¡ y 1 _ py � y 1 ^ p   p1q.

Make Year Price

mazda 2009 20K

ford 2009 15K

ford 2007 12K

Jan Chomicki Preferences, Queries, Logics DBRank, August 29, 2011 28 / 46

Page 89: Preferences, Queries, Logics

Example of winnow

Relation CarpMake,Year ,Priceq

Preference relation:

pm, y , pq ¡1 pm1, y 1, p1q � y ¡ y 1 _ py � y 1 ^ p   p1q.

Make Year Price

mazda 2009 20K

ford 2009 15K

ford 2007 12K

Jan Chomicki Preferences, Queries, Logics DBRank, August 29, 2011 28 / 46

Page 90: Preferences, Queries, Logics

Example of winnow

Relation CarpMake,Year ,Priceq

Preference relation:

pm, y , pq ¡1 pm1, y 1, p1q � y ¡ y 1 _ py � y 1 ^ p   p1q.

Make Year Price

mazda 2009 20K

ford 2009 15K

ford 2007 12K

Jan Chomicki Preferences, Queries, Logics DBRank, August 29, 2011 28 / 46

Page 91: Preferences, Queries, Logics

Example of winnow

Relation CarpMake,Year ,Priceq

Preference relation:

pm, y , pq ¡1 pm1, y 1, p1q � y ¡ y 1 _ py � y 1 ^ p   p1q.

Make Year Price

mazda 2009 20K

ford 2009 15K

ford 2007 12K

Jan Chomicki Preferences, Queries, Logics DBRank, August 29, 2011 28 / 46

Page 92: Preferences, Queries, Logics

Generalizations of winnow

Iterating winnow

ω0¡prq � H

ωn�1¡prq � ω¡pr �

�0¤i¤n ω

i¡prqq

Ranking

Rank tuples by their minimum distance from a winnow tuple:

η¡prq � tpt, iq | t P ωiC prqu.

k-band

Return the tuples dominated by at most k tuples:

ω¡prq � tt P r | #tt 1 P r | t 1 ¡ tu ¤ ku.

Jan Chomicki Preferences, Queries, Logics DBRank, August 29, 2011 29 / 46

Page 93: Preferences, Queries, Logics

Generalizations of winnow

Iterating winnow

ω0¡prq � H

ωn�1¡prq � ω¡pr �

�0¤i¤n ω

i¡prqq

Ranking

Rank tuples by their minimum distance from a winnow tuple:

η¡prq � tpt, iq | t P ωiC prqu.

k-band

Return the tuples dominated by at most k tuples:

ω¡prq � tt P r | #tt 1 P r | t 1 ¡ tu ¤ ku.

Jan Chomicki Preferences, Queries, Logics DBRank, August 29, 2011 29 / 46

Page 94: Preferences, Queries, Logics

Generalizations of winnow

Iterating winnow

ω0¡prq � H

ωn�1¡prq � ω¡pr �

�0¤i¤n ω

i¡prqq

Ranking

Rank tuples by their minimum distance from a winnow tuple:

η¡prq � tpt, iq | t P ωiC prqu.

k-band

Return the tuples dominated by at most k tuples:

ω¡prq � tt P r | #tt 1 P r | t 1 ¡ tu ¤ ku.

Jan Chomicki Preferences, Queries, Logics DBRank, August 29, 2011 29 / 46

Page 95: Preferences, Queries, Logics

Generalizations of winnow

Iterating winnow

ω0¡prq � H

ωn�1¡prq � ω¡pr �

�0¤i¤n ω

i¡prqq

Ranking

Rank tuples by their minimum distance from a winnow tuple:

η¡prq � tpt, iq | t P ωiC prqu.

k-band

Return the tuples dominated by at most k tuples:

ω¡prq � tt P r | #tt 1 P r | t 1 ¡ tu ¤ ku.

Jan Chomicki Preferences, Queries, Logics DBRank, August 29, 2011 29 / 46

Page 96: Preferences, Queries, Logics

Preference SQL

The language

basic preference constructors

Pareto/prioritized accumulation

new SQL clause PREFERRING

groupwise preferences

native implementation

Winnow in Preference SQLSELECT * FROM Car

PREFERRING HIGHEST(Year)

CASCADE LOWEST(Price)

Jan Chomicki Preferences, Queries, Logics DBRank, August 29, 2011 30 / 46

Page 97: Preferences, Queries, Logics

Preference SQL

The language

basic preference constructors

Pareto/prioritized accumulation

new SQL clause PREFERRING

groupwise preferences

native implementation

Winnow in Preference SQLSELECT * FROM Car

PREFERRING HIGHEST(Year)

CASCADE LOWEST(Price)

Jan Chomicki Preferences, Queries, Logics DBRank, August 29, 2011 30 / 46

Page 98: Preferences, Queries, Logics

Preference SQL

The language

basic preference constructors

Pareto/prioritized accumulation

new SQL clause PREFERRING

groupwise preferences

native implementation

Winnow in Preference SQLSELECT * FROM Car

PREFERRING HIGHEST(Year)

CASCADE LOWEST(Price)

Jan Chomicki Preferences, Queries, Logics DBRank, August 29, 2011 30 / 46

Page 99: Preferences, Queries, Logics

Algebraic laws [Ch., 2002; Kießling, 2002]

Commutativity of winnow with selection

If the formula

@t1, t2.rαpt2q ^ γpt1, t2qs ñ αpt1q

is valid, then for every r

σαpωγprqq � ωγpσαprqq.

Under the preference relation

pm, y , pq ¡C1 pm1, y 1, p1q � y ¡ y 1 ^ p ¤ p1 _ y ¥ y 1 ^ p   p1

the selection σPrice 20K commutes with ωC1 but σPrice¡20K does not.

Jan Chomicki Preferences, Queries, Logics DBRank, August 29, 2011 31 / 46

Page 100: Preferences, Queries, Logics

Algebraic laws [Ch., 2002; Kießling, 2002]

Commutativity of winnow with selection

If the formula

@t1, t2.rαpt2q ^ γpt1, t2qs ñ αpt1q

is valid, then for every r

σαpωγprqq � ωγpσαprqq.

Under the preference relation

pm, y , pq ¡C1 pm1, y 1, p1q � y ¡ y 1 ^ p ¤ p1 _ y ¥ y 1 ^ p   p1

the selection σPrice 20K commutes with ωC1 but σPrice¡20K does not.

Jan Chomicki Preferences, Queries, Logics DBRank, August 29, 2011 31 / 46

Page 101: Preferences, Queries, Logics

Algebraic laws [Ch., 2002; Kießling, 2002]

Commutativity of winnow with selection

If the formula

@t1, t2.rαpt2q ^ γpt1, t2qs ñ αpt1q

is valid, then for every r

σαpωγprqq � ωγpσαprqq.

Under the preference relation

pm, y , pq ¡C1 pm1, y 1, p1q � y ¡ y 1 ^ p ¤ p1 _ y ¥ y 1 ^ p   p1

the selection σPrice 20K commutes with ωC1 but σPrice¡20K does not.

Jan Chomicki Preferences, Queries, Logics DBRank, August 29, 2011 31 / 46

Page 102: Preferences, Queries, Logics

Semantic query optimization [Ch., 2004]

Using information about integrity constraints to:

eliminate redundant occurrences of winnow.

make more efficient computation of winnow possible.

Eliminating redundancy

Given a set of integrity constraints F , ωC is redundant w.r.t. F iff Fimplies the formula

@t1, t2. Rpt1q ^ Rpt2q ñ t1 �C t2.

Jan Chomicki Preferences, Queries, Logics DBRank, August 29, 2011 32 / 46

Page 103: Preferences, Queries, Logics

Semantic query optimization [Ch., 2004]

Using information about integrity constraints to:

eliminate redundant occurrences of winnow.

make more efficient computation of winnow possible.

Eliminating redundancy

Given a set of integrity constraints F , ωC is redundant w.r.t. F iff Fimplies the formula

@t1, t2. Rpt1q ^ Rpt2q ñ t1 �C t2.

Jan Chomicki Preferences, Queries, Logics DBRank, August 29, 2011 32 / 46

Page 104: Preferences, Queries, Logics

Integrity constraints

Constraint-generating dependencies (CGD) [Baudinet et al., 1995]

@t1. . . .@tn. rRpt1q ^ � � � ^ Rptnq ^ γpt1, . . . tnqs ñ γ1pt1, . . . tnq.

CGD entailment

Decidable by reduction to the validity of @-formulas in the constrainttheory (assuming the theory is decidable).

Jan Chomicki Preferences, Queries, Logics DBRank, August 29, 2011 33 / 46

Page 105: Preferences, Queries, Logics

Integrity constraints

Constraint-generating dependencies (CGD) [Baudinet et al., 1995]

@t1. . . .@tn. rRpt1q ^ � � � ^ Rptnq ^ γpt1, . . . tnqs ñ γ1pt1, . . . tnq.

CGD entailment

Decidable by reduction to the validity of @-formulas in the constrainttheory (assuming the theory is decidable).

Jan Chomicki Preferences, Queries, Logics DBRank, August 29, 2011 33 / 46

Page 106: Preferences, Queries, Logics

Integrity constraints

Constraint-generating dependencies (CGD) [Baudinet et al., 1995]

@t1. . . .@tn. rRpt1q ^ � � � ^ Rptnq ^ γpt1, . . . tnqs ñ γ1pt1, . . . tnq.

CGD entailment

Decidable by reduction to the validity of @-formulas in the constrainttheory (assuming the theory is decidable).

Jan Chomicki Preferences, Queries, Logics DBRank, August 29, 2011 33 / 46

Page 107: Preferences, Queries, Logics

Part III

Advanced topics

Jan Chomicki Preferences, Queries, Logics DBRank, August 29, 2011 34 / 46

Page 108: Preferences, Queries, Logics

Preference modification

Goal

Given a preference relation ¡ and additional preference or indifferenceinformation I, construct a new preference relation ¡1 whose contentsdepend on ¡ and I.

General postulates

fulfillment: the new information I should be completely incorporatedinto ¡1

minimal change: ¡1 should be as close to ¡ as possible

closure:� order-theoretic (SPO, WO) properties of ¡ should be preserved in ¡1

� finiteness or finite representability of ¡ should also be preserved in ¡1

Jan Chomicki Preferences, Queries, Logics DBRank, August 29, 2011 35 / 46

Page 109: Preferences, Queries, Logics

Preference modification

Goal

Given a preference relation ¡ and additional preference or indifferenceinformation I, construct a new preference relation ¡1 whose contentsdepend on ¡ and I.

General postulates

fulfillment: the new information I should be completely incorporatedinto ¡1

minimal change: ¡1 should be as close to ¡ as possible

closure:� order-theoretic (SPO, WO) properties of ¡ should be preserved in ¡1

� finiteness or finite representability of ¡ should also be preserved in ¡1

Jan Chomicki Preferences, Queries, Logics DBRank, August 29, 2011 35 / 46

Page 110: Preferences, Queries, Logics

Preference modification

Goal

Given a preference relation ¡ and additional preference or indifferenceinformation I, construct a new preference relation ¡1 whose contentsdepend on ¡ and I.

General postulates

fulfillment: the new information I should be completely incorporatedinto ¡1

minimal change: ¡1 should be as close to ¡ as possible

closure:� order-theoretic (SPO, WO) properties of ¡ should be preserved in ¡1

� finiteness or finite representability of ¡ should also be preserved in ¡1

Jan Chomicki Preferences, Queries, Logics DBRank, August 29, 2011 35 / 46

Page 111: Preferences, Queries, Logics

Preference revision [Ch., 2007]

Setting

new information: revising preference relation ¡0

composition operator θ: union, prioritized or Pareto composition

composition eliminates (some) preference conflicts

additional assumptions: interval orders

¡1� TC p¡0 θ ¡q to guarantee SPO

VW , 2009

VW , 2008

VW , 2007

Kia, 2009

Kia, 2008

Kia, 2007

Jan Chomicki Preferences, Queries, Logics DBRank, August 29, 2011 36 / 46

Page 112: Preferences, Queries, Logics

Preference revision [Ch., 2007]

Setting

new information: revising preference relation ¡0

composition operator θ: union, prioritized or Pareto composition

composition eliminates (some) preference conflicts

additional assumptions: interval orders

¡1� TC p¡0 θ ¡q to guarantee SPO

VW , 2009

VW , 2008

VW , 2007

Kia, 2009

Kia, 2008

Kia, 2007

Jan Chomicki Preferences, Queries, Logics DBRank, August 29, 2011 36 / 46

Page 113: Preferences, Queries, Logics

Preference revision [Ch., 2007]

Setting

new information: revising preference relation ¡0

composition operator θ: union, prioritized or Pareto composition

composition eliminates (some) preference conflicts

additional assumptions: interval orders

¡1� TC p¡0 θ ¡q to guarantee SPO

VW , 2009

VW , 2008

VW , 2007

Kia, 2009

Kia, 2008

Kia, 2007

Jan Chomicki Preferences, Queries, Logics DBRank, August 29, 2011 36 / 46

Page 114: Preferences, Queries, Logics

Preference revision [Ch., 2007]

Setting

new information: revising preference relation ¡0

composition operator θ: union, prioritized or Pareto composition

composition eliminates (some) preference conflicts

additional assumptions: interval orders

¡1� TC p¡0 θ ¡q to guarantee SPO

VW , 2009

VW , 2008

VW , 2007

Kia, 2009

Kia, 2008

Kia, 2007

Jan Chomicki Preferences, Queries, Logics DBRank, August 29, 2011 36 / 46

Page 115: Preferences, Queries, Logics

Preference revision [Ch., 2007]

Setting

new information: revising preference relation ¡0

composition operator θ: union, prioritized or Pareto composition

composition eliminates (some) preference conflicts

additional assumptions: interval orders

¡1� TC p¡0 θ ¡q to guarantee SPO

VW , 2009

VW , 2008

VW , 2007

Kia, 2009

Kia, 2008

Kia, 2007

Jan Chomicki Preferences, Queries, Logics DBRank, August 29, 2011 36 / 46

Page 116: Preferences, Queries, Logics

Preference contraction [Mindolin, Ch., 2011]

Setting

new information: contractor relation CON

¡1: maximal subset of ¡ disjoint with CON

VW , 2009

VW , 2008

VW , 2007

VW , 2006

VW , 2005

Jan Chomicki Preferences, Queries, Logics DBRank, August 29, 2011 37 / 46

Page 117: Preferences, Queries, Logics

Preference contraction [Mindolin, Ch., 2011]

Setting

new information: contractor relation CON

¡1: maximal subset of ¡ disjoint with CON

VW , 2009

VW , 2008

VW , 2007

VW , 2006

VW , 2005

Jan Chomicki Preferences, Queries, Logics DBRank, August 29, 2011 37 / 46

Page 118: Preferences, Queries, Logics

Preference contraction [Mindolin, Ch., 2011]

Setting

new information: contractor relation CON

¡1: maximal subset of ¡ disjoint with CON

VW , 2009

VW , 2008

VW , 2007

VW , 2006

VW , 2005

Jan Chomicki Preferences, Queries, Logics DBRank, August 29, 2011 37 / 46

Page 119: Preferences, Queries, Logics

Preference contraction [Mindolin, Ch., 2011]

Setting

new information: contractor relation CON

¡1: maximal subset of ¡ disjoint with CON

VW , 2009

VW , 2008

VW , 2007

VW , 2006

VW , 2005

Jan Chomicki Preferences, Queries, Logics DBRank, August 29, 2011 37 / 46

Page 120: Preferences, Queries, Logics

Preference contraction [Mindolin, Ch., 2011]

Setting

new information: contractor relation CON

¡1: maximal subset of ¡ disjoint with CON

VW , 2009

VW , 2008

VW , 2007

VW , 2006

VW , 2005

Jan Chomicki Preferences, Queries, Logics DBRank, August 29, 2011 37 / 46

Page 121: Preferences, Queries, Logics

Substitutability [Balke et al., 2006]

Setting

new information: set of indifference pairs

additional preferences are added to achieve object substitutability

VW , 2009

VW , 2008

VW , 2007

Kia, 2009

Kia, 2008

Kia, 2007

Jan Chomicki Preferences, Queries, Logics DBRank, August 29, 2011 38 / 46

Page 122: Preferences, Queries, Logics

Substitutability [Balke et al., 2006]

Setting

new information: set of indifference pairs

additional preferences are added to achieve object substitutability

VW , 2009

VW , 2008

VW , 2007

Kia, 2009

Kia, 2008

Kia, 2007

Jan Chomicki Preferences, Queries, Logics DBRank, August 29, 2011 38 / 46

Page 123: Preferences, Queries, Logics

Substitutability [Balke et al., 2006]

Setting

new information: set of indifference pairs

additional preferences are added to achieve object substitutability

VW , 2009

VW , 2008

VW , 2007

Kia, 2009

Kia, 2008

Kia, 2007

Jan Chomicki Preferences, Queries, Logics DBRank, August 29, 2011 38 / 46

Page 124: Preferences, Queries, Logics

Substitutability [Balke et al., 2006]

Setting

new information: set of indifference pairs

additional preferences are added to achieve object substitutability

VW , 2009

VW , 2008

VW , 2007

Kia, 2009

Kia, 2008

Kia, 2007

Jan Chomicki Preferences, Queries, Logics DBRank, August 29, 2011 38 / 46

Page 125: Preferences, Queries, Logics

Substitutability [Balke et al., 2006]

Setting

new information: set of indifference pairs

additional preferences are added to achieve object substitutability

VW , 2009

VW , 2008

VW , 2007

Kia, 2009

Kia, 2008

Kia, 2007

Jan Chomicki Preferences, Queries, Logics DBRank, August 29, 2011 38 / 46

Page 126: Preferences, Queries, Logics

Preferences over finite sets

Set preferences

Induced:

X Ï Y � @x P X . Dy P Y . x ¡ y

Aggregate:

X Ï Y � sumApX q ¡ sumApY q

Set preference queries

find the best subsets of a given set

restrictions on cardinality

Jan Chomicki Preferences, Queries, Logics DBRank, August 29, 2011 39 / 46

Page 127: Preferences, Queries, Logics

Preferences over finite sets

Set preferences

Induced:

X Ï Y � @x P X . Dy P Y . x ¡ y

Aggregate:

X Ï Y � sumApX q ¡ sumApY q

Set preference queries

find the best subsets of a given set

restrictions on cardinality

Jan Chomicki Preferences, Queries, Logics DBRank, August 29, 2011 39 / 46

Page 128: Preferences, Queries, Logics

Preferences over finite sets

Set preferences

Induced:

X Ï Y � @x P X . Dy P Y . x ¡ y

Aggregate:

X Ï Y � sumApX q ¡ sumApY q

Set preference queries

find the best subsets of a given set

restrictions on cardinality

Jan Chomicki Preferences, Queries, Logics DBRank, August 29, 2011 39 / 46

Page 129: Preferences, Queries, Logics

Preferences over set profiles [Zhang, Ch., 2011]

Name Area Rating

Newton Physics 9

Einstein Physics 10

Gargamel Alchemy 0

Preferences

2-element subsets

P1: at most one physicist

P2: higher total rating

P1 more important than P2

Jan Chomicki Preferences, Queries, Logics DBRank, August 29, 2011 40 / 46

Page 130: Preferences, Queries, Logics

Preferences over set profiles [Zhang, Ch., 2011]

Name Area Rating

Newton Physics 9

Einstein Physics 10

Gargamel Alchemy 0

Preferences

2-element subsets

P1: at most one physicist

P2: higher total rating

P1 more important than P2

Jan Chomicki Preferences, Queries, Logics DBRank, August 29, 2011 40 / 46

Page 131: Preferences, Queries, Logics

Preferences over set profiles [Zhang, Ch., 2011]

Name Area Rating

Newton Physics 9

Einstein Physics 10

Gargamel Alchemy 0

Preferences

2-element subsets

P1: at most one physicist

P2: higher total rating

P1 more important than P2

Jan Chomicki Preferences, Queries, Logics DBRank, August 29, 2011 40 / 46

Page 132: Preferences, Queries, Logics

Set profile pF1,F2q

F1pSq � SELECT COUNT(Name) FROM S WHERE Area=’Physics’

F2pSq � SELECT SUM(Rating) FROM S

Set preference relations

X Ï1 Y � F1pX q ¤ 1^ F1pY q ¡ 1

X Ï2 Y � F2pX q ¡ F2pY q

Prioritized composition

X Ï Y � X Ï1 Y _ pY �Ï1 X ^ X Ï2 Y q

Jan Chomicki Preferences, Queries, Logics DBRank, August 29, 2011 41 / 46

Page 133: Preferences, Queries, Logics

Set profile pF1,F2q

F1pSq � SELECT COUNT(Name) FROM S WHERE Area=’Physics’

F2pSq � SELECT SUM(Rating) FROM S

Set preference relations

X Ï1 Y � F1pX q ¤ 1^ F1pY q ¡ 1

X Ï2 Y � F2pX q ¡ F2pY q

Prioritized composition

X Ï Y � X Ï1 Y _ pY �Ï1 X ^ X Ï2 Y q

Jan Chomicki Preferences, Queries, Logics DBRank, August 29, 2011 41 / 46

Page 134: Preferences, Queries, Logics

Set profile pF1,F2q

F1pSq � SELECT COUNT(Name) FROM S WHERE Area=’Physics’

F2pSq � SELECT SUM(Rating) FROM S

Set preference relations

X Ï1 Y � F1pX q ¤ 1^ F1pY q ¡ 1

X Ï2 Y � F2pX q ¡ F2pY q

Prioritized composition

X Ï Y � X Ï1 Y _ pY �Ï1 X ^ X Ï2 Y q

Jan Chomicki Preferences, Queries, Logics DBRank, August 29, 2011 41 / 46

Page 135: Preferences, Queries, Logics

Prospective research topics

Definability

of scoring functions representing preference relations

of CP-nets and other graphical models of preferences

Extrinsic preference relations

Preference relations that are not fully defined by tuple contents:

x ¡ y � Dn1, n2. Dissatisfiedpx , n1q ^ Dissatisfiedpy , n2q ^ n1   n2.

Incomplete preferences

tuple scores and probabilities [Soliman et al., 2007]

uncertain tuple scores

disjunctive preferences: a ¡ b _ a ¡ c

Jan Chomicki Preferences, Queries, Logics DBRank, August 29, 2011 42 / 46

Page 136: Preferences, Queries, Logics

Prospective research topics

Definability

of scoring functions representing preference relations

of CP-nets and other graphical models of preferences

Extrinsic preference relations

Preference relations that are not fully defined by tuple contents:

x ¡ y � Dn1, n2. Dissatisfiedpx , n1q ^ Dissatisfiedpy , n2q ^ n1   n2.

Incomplete preferences

tuple scores and probabilities [Soliman et al., 2007]

uncertain tuple scores

disjunctive preferences: a ¡ b _ a ¡ c

Jan Chomicki Preferences, Queries, Logics DBRank, August 29, 2011 42 / 46

Page 137: Preferences, Queries, Logics

Prospective research topics

Definability

of scoring functions representing preference relations

of CP-nets and other graphical models of preferences

Extrinsic preference relations

Preference relations that are not fully defined by tuple contents:

x ¡ y � Dn1, n2. Dissatisfiedpx , n1q ^ Dissatisfiedpy , n2q ^ n1   n2.

Incomplete preferences

tuple scores and probabilities [Soliman et al., 2007]

uncertain tuple scores

disjunctive preferences: a ¡ b _ a ¡ c

Jan Chomicki Preferences, Queries, Logics DBRank, August 29, 2011 42 / 46

Page 138: Preferences, Queries, Logics

Prospective research topics

Definability

of scoring functions representing preference relations

of CP-nets and other graphical models of preferences

Extrinsic preference relations

Preference relations that are not fully defined by tuple contents:

x ¡ y � Dn1, n2. Dissatisfiedpx , n1q ^ Dissatisfiedpy , n2q ^ n1   n2.

Incomplete preferences

tuple scores and probabilities [Soliman et al., 2007]

uncertain tuple scores

disjunctive preferences: a ¡ b _ a ¡ c

Jan Chomicki Preferences, Queries, Logics DBRank, August 29, 2011 42 / 46

Page 139: Preferences, Queries, Logics

Prospective applications

Databases

preference queries as decision components: workflows, event systems

personalization of query results

Multi-agent systems

conflict resolution

negotiating joint preferences and decisions

negotiation preferences

Social media

preference similarity and stability

preference aggregation

Jan Chomicki Preferences, Queries, Logics DBRank, August 29, 2011 43 / 46

Page 140: Preferences, Queries, Logics

Prospective applications

Databases

preference queries as decision components: workflows, event systems

personalization of query results

Multi-agent systems

conflict resolution

negotiating joint preferences and decisions

negotiation preferences

Social media

preference similarity and stability

preference aggregation

Jan Chomicki Preferences, Queries, Logics DBRank, August 29, 2011 43 / 46

Page 141: Preferences, Queries, Logics

Prospective applications

Databases

preference queries as decision components: workflows, event systems

personalization of query results

Multi-agent systems

conflict resolution

negotiating joint preferences and decisions

negotiation preferences

Social media

preference similarity and stability

preference aggregation

Jan Chomicki Preferences, Queries, Logics DBRank, August 29, 2011 43 / 46

Page 142: Preferences, Queries, Logics

Prospective applications

Databases

preference queries as decision components: workflows, event systems

personalization of query results

Multi-agent systems

conflict resolution

negotiating joint preferences and decisions

negotiation preferences

Social media

preference similarity and stability

preference aggregation

Jan Chomicki Preferences, Queries, Logics DBRank, August 29, 2011 43 / 46

Page 143: Preferences, Queries, Logics

Preference queries vs. Top-K queries

Preference queries Top-K queries

Binary preference relations Scoring functions

Clear declarative reading “Mysterious” formulation

Nondeterminism

No relational data model extension Rank-relations [Li et al., 2005]

Structured data Structured and unstructured data

Manual construction Automatic construction

Preference SQL Mainstream DBMS

Jan Chomicki Preferences, Queries, Logics DBRank, August 29, 2011 44 / 46

Page 144: Preferences, Queries, Logics

Preference queries vs. Top-K queries

Preference queries Top-K queries

Binary preference relations Scoring functions

Clear declarative reading “Mysterious” formulation

Nondeterminism

No relational data model extension Rank-relations [Li et al., 2005]

Structured data Structured and unstructured data

Manual construction Automatic construction

Preference SQL Mainstream DBMS

Jan Chomicki Preferences, Queries, Logics DBRank, August 29, 2011 44 / 46

Page 145: Preferences, Queries, Logics

Acknowledgments

Paolo Ciaccia

Parke Godfrey

Jarek Gryz

Werner Kießling

Denis Mindolin

S lawek Staworko

Xi Zhang

Companion paper

Jan Chomicki, Logical Foundations of Preference Queries, DataEngineering Bulletin, 34(2), 2011.

Jan Chomicki Preferences, Queries, Logics DBRank, August 29, 2011 45 / 46

Page 146: Preferences, Queries, Logics

Jan Chomicki Preferences, Queries, Logics DBRank, August 29, 2011 46 / 46