Recent database query languages have been designed to provide adaptable, helpful, and sophisticated instruments that produce query output sets better matched to user preferences or needs. This paper describes such an adaptable tool, FlexPref, which integrates preference declaration and evaluation with any query database processor. The tool extends a database query language to deal with several additional preference requirements, such as retrieving the k best or most frequent tuples, using a set of generic database operators. The work continues previous research of the authors to improve query optimization for preference processing, in terms of features such as cardinality and cost estimation, or theoretical formalization. The theoretical contributions of the paper include defining operating rules for preference methods against certain query operators, and analysis of the required properties to be fulfilled by them.
The FlexPref framework can be operated along with a database query language, after previous registration, by incorporating two supplementary clauses involving the preference criteria ([preferring]) and their attributes ([using] – [with]). Seven preference functions are considered: top-k, skyline, top-k dominating, k-dominance, k-frequency, and two state-of-the-art schemes (ε-dominance and k-representative skyline). Efficiency and optimization issues are surveyed individually for single-table, multiple-table, and sorted list access cases, in the context of select, join, or projection operators. (The aggregate or group-by structured query language (SQL) clauses will be examined in a future version.)
The proposed techniques for improving efficiency include pruning the join input tables according to the preference criteria, and pushing selection.
The experimental evaluation of the system (integrated into PostgreSQL) is performed against some custom implementations of the preference functions, and the results describe the observed benefits and drawbacks. FlexPref proves to be a valuable and useful instrument that eliminates redundant work and opens applications to new preference implementations.