*
) 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).## 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(p)
empty()
## S3 method for class 'preference':
length(x)
base_pref
, or complex preferences)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 correspondence to other query languages supporting Skylines/preferences to rPref is given as follows:
"... SKYLINE OF a MAX, b MIN, c MAX
"
corresponds in rPref to the preferencehigh(a) * low(b) * high(c)
.
"... PREFERRING a LOWEST AND (b HIGHEST PRIOR TO c LOWEST)
"
corresponds in rPref tolow(a) * (high(b) & low(c))
.
"... PREFERRING LOW a PLUS (b = 1 PRIOR TO LOW c))
"
corresponds in rPref tolow(a) * (true(b == 1) & low(c))
.
Note that preferences in rPref can be translated to some of this query dialects by show.query
.
length(p)
returns the term length of the preference term p
which is defined as the number of base preferences
in a complex preference term.W. Kiessling (2002): Foundations of Preferences in Database Systems. In Very Large Data Bases (VLDB '02), pages 311-322.
S. Mandl, O. Kozachuk, M. Endres, W. Kiessling (2015): Preference Analytics in EXASolution. 16th Conference on Database Systems for Business, Technology, and Web.
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 horsepower
p1 <- high(mpg) * high(hp)
# perform the preference search
psel(mtcars, p1)
Run the code above in your browser using DataLab