Database Reference
In-Depth Information
Table 17. Query Result for the Preference Stan-
dard
Table 18. Query Result for the Preference
Cheap
name
starRate
name
price
Kyriad
3
Kyriad
55
SELECT OntoQL clause can be used in building
the query. The last clause is the PREFERRING
clause used for rewriting the queries into stan-
dard OntoQL queries. This extension preserves
upward compatibility with the classical SELECT
clause.
SELECT name, starRate
FROM Hotel
PREFERRING 'Standard';
As standard is defined as a numeric preference
attached to the property starRate having the value
3, when the PREFERRING clause is interpreted,
the query is automatically rewritten as follows
(cf. Table 17).
CONCLUSION AND FUTURE WORK
We have proposed in this chapter a formal and
generic model to handle users' preferences. We
have described how the OntoDB ontology based
database framework has been extended in order
to handle preferences at the semantic level instead
of handling them on the logical level of the data
like it is supported in most existing preference
models. Our model is composed of several types
of preferences usually addressed in the literature in
a separate way. These preferences are independent
of any logical model of data. The model is generic
thanks to its ability to define a relationship with
any ontology model.
Our preference model fulfils the following
three main requirements to ensure its flexibility.
Firstly, the explicit representation of the ontology
into the database. As a consequence, we have
been able to attach the preferences to the enti-
ties of the ontology and not to the columns of
the logical model of the database in the opposite
of the other approaches. Then, the possibility to
access and to manipulate the ontology model
through accessing and manipulating directly its
meta-model. Finally, the availability of an ex-
ploitation language which allows manipulating
the instances, their classes and the meta-model
of the considered ontology.
SELECT name, starRate
From Hotel
WHERE starRate = 3;
2.
A query retrieving cheap hotels is written
as follows.
SELECT name, price
FROM hotel
PREFERRING 'cheap ';
As in the previous example, the query has to
be rewritten according to type of preference in the
PREFERRING clause. In this case, the preference
cheap has been defined as an interval preference
attached to the property price . It takes its values
in the interval [45, 60] which can be interpreted
by the clause BETWEEN. Thus, the query is au-
tomatically rewritten as follows (cf. Table 18).
SELECT name, price
From Hotel
WHERE price BETWEEN 45 and 60;
Notice that all the authorised subclauses of the
 
Search WWH ::




Custom Search