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.[1] 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 . dominates (written: ) if is at least as good as in every dimension, and superior in at least one:[2] Dominance () can be defined as any strict partial ordering, for example greater (with and ) or less (with and ).
Assuming two dimensions and defining dominance in both dimensions as greater, we can compute the skyline in SQL-92 as follows:
WITH tuples(id, i, j) as (values(1,1,1), (1,2,1), (1,1,2))
SELECT * FROM tuples t1
WHERE NOT EXISTS ( -- which is not dominated by
SELECT * FROM tuples t2 -- a tuple that is
WHERE t2.i >= t1.i and t2.j >= t1.j -- at least as good in all dimensions
AND (t2.i > t1.i or t2.j > t1.j) -- and better in at least one dimension
);
Proposed syntax
As an extension to SQL, Börzsönyi et al.[1] proposed the following syntax for the skyline operator:
SELECT ... FROM ... WHERE ...
GROUP BY ... HAVING ...
SKYLINE OF [DISTINCT] d1 [MIN | MAX | DIFF],
..., dm [MIN | MAX | DIFF]
ORDER BY ...
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 not exists
:
SELECT ... FROM (...) q WHERE NOT EXISTS (
SELECT * FROM (...) p WHERE p.d1 [<= | >=] q.d1 AND ... AND p.dm [<= | >=] q.dm
AND (p.d1 [< | >] q.d1 OR ... OR p.dm [< | > ] q.dm ))
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.[1] Other algorithms have been proposed that make use of divide and conquer, indices,[1] MapReduce[3] and general-purpose computing on graphics cards.[4] 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.[5]
See also
- Pareto efficiency
- Multi-objective optimization
- Convex hull
- Nearest neighbor search
- Selection algorithm
References
- ^ a b c d Borzsonyi, Stephan; Kossmann, Donald; Stocker, Konrad (2001). "The Skyline operator". Proceedings 17th International Conference on Data Engineering. pp. 421–430. doi:10.1109/ICDE.2001.914855. ISBN 0-7695-1001-9. S2CID 5812098.
- ^ Maximilian E. Schüle, Alex Kulikov, Alfons Kemper, Thomas Neumann (2020). "ARTful Skyline Computation for In-Memory Database Systems". New Trends in Databases and Information Systems - ADBIS 2020 Short Papers, Lyon, France, August 25-27, 2020, Proceedings. Communications in Computer and Information Science. Vol. 1259. pp. 3–12. doi:10.1007/978-3-030-54623-6_1. ISBN 978-3-030-54622-9.
{{cite book}}
: CS1 maint: multiple names: authors list (link) - ^ Mullesgaard, Kasper; Pedersen, Jens Laurits; Lu, Hua; Zhou, Yongluan (2014). "Efficient Skyline Computation in MapReduce" (PDF). Proc. 17th International Conference on Extending Database Technology (EDBT): 37–48.
- ^ Bøgh, Kenneth S; Assent, Ira; Magnani, Matteo (2013). "Efficient GPU-based skyline computation". Proceedings of the Ninth International Workshop on Data Management on New Hardware. pp. 5:1–5:6. doi:10.1145/2485278.2485283. ISBN 9781450321969. S2CID 13195757.
- ^ De Matteis, Tiziano; Di Girolamo, Salvatore; Mencagli, Gabriele (25 August 2016). "Continuous skyline queries on multicore architectures". Concurrency and Computation: Practice and Experience. 28 (12): 3503–3522. doi:10.1002/cpe.3866. S2CID 6562372.
See what we do next...
OR
By submitting your email or phone number, you're giving mschf permission to send you email and/or recurring marketing texts. Data rates may apply. Text stop to cancel, help for help.
Success: You're subscribed now !