d-Parameter

Definitions

The d-Parameter can be used in numerical base preference constructors which are sub-constructors of SCOREd. Without the d-parameter, the preference order of SCORE is constructed using a scoring function f(x). With a d-parameter specified, this scoring function is substituted by f_d(x) which is defined as follows:

f_d(x) = ⌈f(x) / d⌉

The d-parameter models the concepts of tolerance and vaguenessneeded in application scenarios. Thus, the d-parameter depends on semantic constraints to which an attribute is connotated. The d-parameter also influences the size of the result set from a technical point of view.

The d-parameter must have the same data type as the parameters of the preference, except for the datatypes DATE, TIME and TIMESTAMP. Among this preferences the d-parameter must be of type INTERVAL.

Example SQL Clauses

PREFERRING age SCORE 'powTwoScoreF', 1 AS p1
 

More or less 2 kilometers do not matter:

PREFERRING BETWEEN 15 AND 20, 2
 

A deviation of 1.000 € is irrelevant:

PREFERRING earnings MORE THAN 100000, 1000
 

A deviation of 10 percent is irrelevant!

PREFERRING tax_rate LESS THAN 20, 2
 

More or less 10 horse powers do not matter. Users have to specify a supremum >= max(horse_power). Here, the supremum is 100000:

PREFERRING horse_power HIGHEST 100000, 10
 

More or less 0.5 liter per 100 km does not matter. Users have to specify an infimum <= min(horse_power). Here, the infimum is 0.0:

PREFERRING consumption LOWEST 0.0, 0.5
 

Around February, third, 2012 with a deviation of one month:

PREFERRING current_date AROUND DATE '2012-2-3', INTERVAL '0-1';