Skyline operator

The skyline operator is the subject of an optimization problem and computes the Pareto optimum on tuples with multiple dimensions.

This operator is an extension to SQL proposed by Börzsönyi et al. to filter results from a database to keep only those objects that are not worse in multiple dimensions than any other. The name skyline comes from the view on Manhattan from the Hudson River, where those buildings can be seen that are not hidden by any other. A building is visible if it is not dominated by a building that is taller or closer to the river (two dimensions, distance to the river minimized, height maximized). Another application of the skyline operator involves selecting a hotel for a holiday. The user wants the hotel to be both cheap and close to the beach. However, hotels that are close to the beach may also be expensive. In this case, the skyline operator would only present those hotels that are not worse than any other hotel in both price and distance to the beach.

Formal specification
The skyline operator returns tuples that are not dominated by any other tuple. A tuple dominates another if it is at least as good in all dimensions and better in at least one dimension. Formally, we can think of each tuple as a vector $$p,q \in \mathbb{R}^n$$. $$p$$ dominates $$q$$ (written: $$p \succ q$$) if $$p$$ is at least as good as $$q$$ in every dimension, and superior in at least one: $$ p \succ q \Leftrightarrow \forall i \in [n]. p[i] \succeq q[i] \wedge \exists j \in [n]. p[j] \succ q[j]. $$ Dominance ($$p \succ q$$) can be defined as any strict partial ordering, for example greater (with $$\succ := >$$ and $$\succeq := \geq$$) or less (with $$\succ := <$$ and $$\succeq := \leq$$).

Assuming two dimensions and defining dominance in both dimensions as greater, we can compute the skyline in SQL-92 as follows:

Proposed syntax
As an extension to SQL, Börzsönyi et al. proposed the following syntax for the skyline operator:

where d1, ... dm denote the dimensions of the skyline and MIN, MAX and DIFF specify whether the value in that dimension should be minimised, maximised or simply be different.

Without an SQL extension, the SQL query requires an antijoin with :

Implementation
The skyline operator can be implemented directly in SQL using current SQL constructs, but this has been shown to be very slow in disk-based database systems. Other algorithms have been proposed that make use of divide and conquer, indices, MapReduce and general-purpose computing on graphics cards. Skyline queries on data streams (i.e. continuous skyline queries) have been studied in the context of parallel query processing on multicores, owing to their wide diffusion in real-time decision making problems and data streaming analytics.