Database Reference
In-Depth Information
composing a user profile and proposed a generic model that can be instantiated and adapted to each
specific application.
2.3.1.2 Qualitative Preferences
The qualitative approach intends to directly specify preferences between the tuples in the query answer,
typically using binary preference relations, e.g., 'I prefer tuple t 1 to tuple t 2 '. These kinds of preference
relations can be embedded into relational query languages through relational operators or special prefer-
ence constructors, which select from their input the set of the most preferred tuples. This approach is,
among others, taken by Chomicki (Chomicki, 2002; Chomicki, 2003) using the winnow operator and
Kießling (Kießling, 2002) in his PreferenceSQL best match only model.
To get an idea of the representation for this approach, consider the following preference from (Cho-
micki, 2003), which specifies a preference of white wine over red when fish is served, and red wine
over white, when meat is served, over a relation MealDB with attributes Dish ( d ), DishType ( dt ), Wine
( w ), WineType ( wt ):
(
)
d dt w wt
,
,
,
( ',
d
dt w wt
',
',
')
= =
(
d
d dt
'
=
fish wt
=
white
dt
'
=
fis
h wt
'
=
red
)
(
d
=
d dt meat wt
'
=
=
red
dt
'
meat wt
'
white
)
=
=
Another example representation of a qualitative preference, over a relation CarDB with attributes
Make, Year, Price and Miles, is the following preference for cheap cars manufactured by Benz, and prior
to 2005 but not before 2003, using PreferenceSQL from (Kießling, 2002):
SELECT *
FROM CarDB
WHERE Make = Benz
PREFERRING (LOWEST(Price) AND Year BETWEEN 2003, 2005)
Note that the qualitative approach is more general than the quantitative one, since one can define
preference relations in terms of scoring functions, whereas not every preference relation can be captured
by scoring functions. For example, consider the relation BookDB(ISBN, Vendor, Price) and its instance
shown in Table 3. The preference 'if the same ISBN, prefer lower price to higher price' gives the pref-
erences ' b 2 to b 1 ' and ' b 1 to b 3 '. There is no preference between the first three topics (i.e., b 1 , b 2 and b 3 )
and the fourth one (i.e., b 4 ). Thus, the score of the fourth tuple should be equal to all of the scores of
the first three tuples. But this implies that the scores of the first three tuples are the same, which is not
possible since the second tuple is preferred to the first one which in turn is preferred to the third one.
2.3.2 Fuzzy Queries
The second and most popular approach of flexible query processing advocates the use of the fuzzy sets
theory. More precisely, the idea is to allow end-users to formulate database queries using fuzzy terms
that best capture their perception of the domain and then to use them to filter and rank relevant data.
Search WWH ::




Custom Search