Complex preferences are used to compose different preferences orders. For example the Pareto composition (via operator *) is the usual operator
to compose the preference for a Skyline query. The Skyline is also known as Pareto frontier.
All complex preferences are mathematically strict partial orders (irreflexive and transitive).
Usage
## S3 method for class 'preference':
*(p1, p2)
## S3 method for class 'preference':
&(p1, p2)
## S3 method for class 'preference':
|(p1, p2)
## S3 method for class 'preference':
+(p1, p2)
reverse(p1)
empty()
Arguments
p1,p2
Preferences to be composed (either base preferences via base_pref or also complex preferences)
Skylines
The most important preference composition operator is the Pareto operator (p1 * p2) to formulate a Skyline query.
A tuple t1 is better than t2 w.r.t. p1 * p2 if it is strictly better w.r.t. one of the preferences p1, p2 and is better or equal w.r.t. the other preference.
The syntactical translation from other query languages supporting skylines/Preferences to rPref is as follows:
A query in the syntax from Borzsonyi et. al (2001) like
"... SKYLINE OF a MAX, b MIN, c MAX"
corresponds in rPref to the preferencehigh(a) * low(b) * high(c).
A query in the syntax from Kiessling (2002) like
"... PREFERRING a LOWEST AND (b HIGHEST PRIOR TO c LOWEST)"
corresponds in rPref tolow(a) * (high(b) & low(c)).
A query in the syntax of the "Skyline" feature of the commercial database "EXASOL EXASolution 5" like
"... PREFERRING LOW a PLUS (b = 1 PRIOR TO LOW c))"
corresponds in rPref tolow(a) * (true(b == 1) & low(c)).
Note that these query conversions can be done by show.query.
References
S. Borzsonyi, D. Kossmann, K. Stocker (2001): The Skyline Operator. In Data Engineering (ICDE '01), pages 421-430.
W. Kiessling (2002): Foundations of Preferences in Database Systems. In Very Large Data Bases (VLDB '02), pages 311-322.
See Also
See base_pref for the construction of base preferences. See psel for the evaluation of preferences.
# Define preference for cars with low consumption (high mpg-value)# and simultanously high horsepowerp1 <- high(mpg) * high(hp)
# Perform the preference searchpsel(mtcars, p1)