In this paper we present SPREFQL, an extension of the SPARQL language that allows appending a PREFER clause that expresses "soft" preferences over the query results obtained by the main body of the query. The extension does not add expressivity and any SPREFQL query can be transformed to an equivalent standard SPARQL query. However, clearly separating preferences from the "hard" patterns and filters in the WHERE clause gives queries where the intention of the client is more cleanly expressed, an advantage for both human readability and machine optimization. In the paper we formally define the syntax and the semantics of the extension and we also provide empirical evidence that optimizations specific to SPREFQL improve run-time efficiency by comparison to the usually applied optimizations on the equivalent standard SPARQL query.
In the Semantic Web literature there have been proposed SPARQL extensions that feature the expression of preferences @cite_1 , typically transferring ideas and results from relational database frameworks much like the work presented here.
@cite_1
2488578254
The last decade has witnessed an increasing interest in expressing preferences inside database queries. Even though most of the work has been devoted to relational databases, many proposals have also been made in the Semantic Web area in order to query RDF databases in a flexible way. This paper presents a survey of these approaches, classifies them, and points out research perspectives.