For my first paper review at my lab seminar, this paper is dedicated by Borzsonyi, S., Kossmann, D., and Stocker, K. I made the PPT file to present in front of my colleague students and my professor. This paper is good to study not only algorithm(divide and conquer) but also mathematical aspect of database of linear algebraic methods.
1. The Skyline Operator
Borzsony, S., The Skyline Operator,
In proc, IEEE Conf. on Data Engineering,
page 421-430, Heidelberg, Germany, Apr. 2001.
Lee, Woonghee
M.S. student at the Big Data Mining Lab.
Department of computer science and engineering at the Hanyang University
July 24th - August 07th, 2015
2. Borzsony, S., The Skyline Operator, In proc, IEEE Conf. on Data Engineering, page 421-430, Heidelberg, Germany, Apr. 2001.
Contents
β Introduction: What is the Skyline?
β SQLβs Extensions
β Implementation
β’ Two dimensional dddddddd
β’ Block-nested-loops algorithm
β’ Divide-and-conquer algorithm
ο¬ Experiments and results
3. Borzsony, S., The Skyline Operator, In proc, IEEE Conf. on Data Engineering, page 421-430, Heidelberg, Germany, Apr. 2001.
Introduction
ο¬ Holiday to Nassau (Bahamas)
ο¬ To look for a hotel cheap and
close to the beach
ο¬ Two goals(distance, price) are
complementary as the hotels
near the beach tend to be
more expensive
4. Borzsony, S., The Skyline Operator, In proc, IEEE Conf. on Data Engineering, page 421-430, Heidelberg, Germany, Apr. 2001.
Introduction: Definition of the Skyline
ο¬ Interesting hotels are not
worse than any other hotels.
ο¬ The set of interesting hotels
are the Skyline.
5. Borzsony, S., The Skyline Operator, In proc, IEEE Conf. on Data Engineering, page 421-430, Heidelberg, Germany, Apr. 2001.
Introduction: Definition of the Skyline
ο¬ Interesting hotels are not
worse than any other hotels.
ο¬ The set of interesting hotels
are the Skyline.
A
This set is dominated
by A
ex) Hotel A <$80, 0.7 miles> dominates
Hotel B <$120, 1.0 miles>
B
6. Borzsony, S., The Skyline Operator, In proc, IEEE Conf. on Data Engineering, page 421-430, Heidelberg, Germany, Apr. 2001.
Introduction: Definition of the Skyline
β’ Definition of the Skyline
πΏππ‘ π£πππ‘πππ βπ, βπ β π π ππ βπ =< π₯π1, β¦ , π₯ππ >, βπ =<
π₯π1, β¦ , π₯ππ >.
πΌπ πππ π₯ππ πππ πππ‘π‘ππ π‘βππ πππ πππ’ππ π‘π π₯ππ,
πππ ππ‘ ππππ π‘ πππ π₯ππ ππ πππ‘π‘ππ π‘βππ π₯ππ,
βπ β» βπ
7. Borzsony, S., The Skyline Operator, In proc, IEEE Conf. on Data Engineering, page 421-430, Heidelberg, Germany, Apr. 2001.
Introduction: Applied the Skyline
ο¬ To propose interesting hotels
ο¬ To find good salesperson which have low salary
ο¬ To derive database visualization
8. Borzsony, S., The Skyline Operator, In proc, IEEE Conf. on Data Engineering, page 421-430, Heidelberg, Germany, Apr. 2001.
SQLβs Extensions
ο¬ To propose to extend SQLβs SELECT statement by an
optional SKYLINE OF clause
9. Borzsony, S., The Skyline Operator, In proc, IEEE Conf. on Data Engineering, page 421-430, Heidelberg, Germany, Apr. 2001.
SQLβs Extensions
ο¬ Ex) The price of a hotel should be minimized
The rating should be maximized
dimension of the Skyline
To specify whether the value in each dimension should be
minimized, maximized or be different
11. Borzsony, S., The Skyline Operator, In proc, IEEE Conf. on Data Engineering, page 421-430, Heidelberg, Germany, Apr. 2001.
SQLβs Extensions: SKYLINE OF clause
ο¬ If two tuples have the same values for all attributes and
are not dominated, both are part of the result (if no
distinct).
ο¬ A one dimensional Skyline is equivalent a min, max, or
distinct SQL query.
ο¬ Dominance is a transitive relation; if π dominates π and
π dominates π, then π dominates π.
12. Borzsony, S., The Skyline Operator, In proc, IEEE Conf. on Data Engineering, page 421-430, Heidelberg, Germany, Apr. 2001.
SQLβs Extensions: Example Skyline Queries
13. Borzsony, S., The Skyline Operator, In proc, IEEE Conf. on Data Engineering, page 421-430, Heidelberg, Germany, Apr. 2001.
Implementation of the Skyline Operation
ο¬ Nested SQL query
ο¬ Two dimensional sorting
ο¬ Three variants based on a block-nested-loops algorithm
ο¬ Three variants based on divide-and-conquer
14. Borzsony, S., The Skyline Operator, In proc, IEEE Conf. on Data Engineering, page 421-430, Heidelberg, Germany, Apr. 2001.
Implementation: Nested SQL query
Same with the SKYLINE OF clause but poor performance
15. Borzsony, S., The Skyline Operator, In proc, IEEE Conf. on Data Engineering, page 421-430, Heidelberg, Germany, Apr. 2001.
Implementation: Nested SQL query
The reasons why this approach shows very poor performance:
ο¬ This query cannot be unnested.
ο¬ If this query involves a ππππ or ππππ’π ππ¦, the ππππ or ππππ’π ππ¦
might execute as the outer query and as the subquery.
ο¬ Combining with other operations (e.g., ππππ or πππ π) might
cause additional cost to compute the Skyline.
16. Borzsony, S., The Skyline Operator, In proc, IEEE Conf. on Data Engineering, page 421-430, Heidelberg, Germany, Apr. 2001.
Implementation: Two Dimensional
ο¬ A one-dimensional Skyline is equivalent to computing the πππ,
πππ₯, or πππ π‘ππππ‘.
ο¬ Computing two-dimensional Skyline is also easy by sorting the
data (It just needs to compare with the last previous tuple).
17. Borzsony, S., The Skyline Operator, In proc, IEEE Conf. on Data Engineering, page 421-430, Heidelberg, Germany, Apr. 2001.
ο¬ A one-dimensional Skyline is equivalent to computing the πππ,
πππ₯, or πππ π‘ππππ‘.
ο¬ Computing two-dimensional Skyline is also easy by sorting the
data (It just needs to compare with the last previous tuple).
Implementation: Two Dimensional
Skyline
21. Borzsony, S., The Skyline Operator, In proc, IEEE Conf. on Data Engineering, page 421-430, Heidelberg, Germany, Apr. 2001.
ο¬ To prove 2-dimensional Skyline Algorithm
πΏππ‘ ππ π π’ππ β π β βπ, π. π. , π¦ π β€ π¦π. π΅ππππ’π π ππ π₯ π < π₯π(β΅
Implementation: Two Dimensional
22. Borzsony, S., The Skyline Operator, In proc, IEEE Conf. on Data Engineering, page 421-430, Heidelberg, Germany, Apr. 2001.
Implementation: Two Dimensional
ο¬ However, more than two-dimensions does not work to get the
Skyline by sorting the data.
β1 is not β3βs direct predecessor.
rating (star)
23. Borzsony, S., The Skyline Operator, In proc, IEEE Conf. on Data Engineering, page 421-430, Heidelberg, Germany, Apr. 2001.
Implementation: BNL Algorithms
Basic Block-nested-loops Algorithm Idea
β’ reads repeatedly the set of tuples like the naive nested-
loops algorithm.
β’ keeps a π€πππππ€ of incomparable tuples in main memory.
1. BNL-basic
2. BNL-sol
3. BNL-solrep
24. Borzsony, S., The Skyline Operator, In proc, IEEE Conf. on Data Engineering, page 421-430, Heidelberg, Germany, Apr. 2001.
Implementation: BNL Algorithms
Basic Block-nested-loops Algorithm Steps:
1. A tuple π is read from the input.
2. π is compared to all tuples of the π€πππππ€.
3. Based on step 2, π is either eliminated, placed into the
π€πππππ€ or into a π‘ππππππππ¦ ππππ.
1. BNL-basic
2. BNL-sol
3. BNL-solrep
25. Borzsony, S., The Skyline Operator, In proc, IEEE Conf. on Data Engineering, page 421-430, Heidelberg, Germany, Apr. 2001.
Implementation: BNL Algorithms
Basic Block-nested-loops Algorithm
β’ After an iteration, three cases can occur:
1. π is dominated by a tuple within the π€πππππ€.
2. π dominates one or more tuples in the π€πππππ€.
3. π is incomparable with all tuples in the π€πππππ€.
Complexity: The best case is O(π). The worst case is π(π2
).
1. BNL-basic
2. BNL-sol
3. BNL-solrep
26. Borzsony, S., The Skyline Operator, In proc, IEEE Conf. on Data Engineering, page 421-430, Heidelberg, Germany, Apr. 2001.
Implementation: BNL Algorithms
Demonstration BNL-basic1. BNL-basic
2. BNL-sol
3. BNL-solrep
<h1, $50, 0.9 miles>
<h2, $50, 1.0 miles>
<h3, $55, 1.0 miles>
<h4, $52, 0.7 miles>
<h5, $49, 1.0 miles>
<h6, $51, 0.7 miles>
Data set Window
Temporary file
β¦
27. Borzsony, S., The Skyline Operator, In proc, IEEE Conf. on Data Engineering, page 421-430, Heidelberg, Germany, Apr. 2001.
Implementation: BNL Algorithms
Demonstration BNL-basic1. BNL-basic
2. BNL-sol
3. BNL-solrep
<h1, $50, 0.9 miles> t = 1
<h1, $50, 0.9 miles>
<h2, $50, 1.0 miles>
<h3, $55, 1.0 miles>
<h4, $52, 0.7 miles>
<h5, $49, 1.0 miles>
<h6, $51, 0.7 miles>
Data set Window
Temporary file
time stamp t
to do not compare two
tuples are never
compared twice
β¦
28. Borzsony, S., The Skyline Operator, In proc, IEEE Conf. on Data Engineering, page 421-430, Heidelberg, Germany, Apr. 2001.
Implementation: BNL Algorithms
Demonstration BNL-basic1. BNL-basic
2. BNL-sol
3. BNL-solrep
<h1, $50, 0.9 miles> t = 1
<h1, $50, 0.9 miles>
<h2, $50, 1.0 miles>
<h3, $55, 1.0 miles>
<h4, $52, 0.7 miles>
<h5, $49, 1.0 miles>
<h6, $51, 0.7 miles>
Data set Window
Temporary file
compare
β¦
29. Borzsony, S., The Skyline Operator, In proc, IEEE Conf. on Data Engineering, page 421-430, Heidelberg, Germany, Apr. 2001.
Implementation: BNL Algorithms
Demonstration BNL-basic1. BNL-basic
2. BNL-sol
3. BNL-solrep
<h1, $50, 0.9 miles> t = 1
<h1, $50, 0.9 miles>
<h2, $50, 1.0 miles>
<h3, $55, 1.0 miles>
<h4, $52, 0.7 miles>
<h5, $49, 1.0 miles>
<h6, $51, 0.7 miles>
Data set Window
Temporary file
dominated
β¦
30. Borzsony, S., The Skyline Operator, In proc, IEEE Conf. on Data Engineering, page 421-430, Heidelberg, Germany, Apr. 2001.
Implementation: BNL Algorithms
Demonstration BNL-basic1. BNL-basic
2. BNL-sol
3. BNL-solrep
<h1, $50, 0.9 miles> t = 1
<h1, $50, 0.9 miles>
<h2, $50, 1.0 miles>
<h3, $55, 1.0 miles>
<h4, $52, 0.7 miles>
<h5, $49, 1.0 miles>
<h6, $51, 0.7 miles>
Data set Window
Temporary file
dominated
β¦
31. Borzsony, S., The Skyline Operator, In proc, IEEE Conf. on Data Engineering, page 421-430, Heidelberg, Germany, Apr. 2001.
Implementation: BNL Algorithms
Demonstration BNL-basic1. BNL-basic
2. BNL-sol
3. BNL-solrep
<h1, $50, 0.9 miles> t = 1
<h1, $50, 0.9 miles>
<h2, $50, 1.0 miles>
<h3, $55, 1.0 miles>
<h4, $52, 0.7 miles>
<h5, $49, 1.0 miles>
<h6, $51, 0.7 miles>
Data set Window
Temporary file
incomparable
β¦
32. Borzsony, S., The Skyline Operator, In proc, IEEE Conf. on Data Engineering, page 421-430, Heidelberg, Germany, Apr. 2001.
Implementation: BNL Algorithms
Demonstration BNL-basic1. BNL-basic
2. BNL-sol
3. BNL-solrep
<h1, $50, 0.9 miles> t = 1
<h4, $52, 0.7 miles> t = 2<h1, $50, 0.9 miles>
<h2, $50, 1.0 miles>
<h3, $55, 1.0 miles>
<h4, $52, 0.7 miles>
<h5, $49, 1.0 miles>
<h6, $51, 0.7 miles>
Data set Window
Temporary file
incomparable
β¦
33. Borzsony, S., The Skyline Operator, In proc, IEEE Conf. on Data Engineering, page 421-430, Heidelberg, Germany, Apr. 2001.
Implementation: BNL Algorithms
Demonstration BNL-basic1. BNL-basic
2. BNL-sol
3. BNL-solrep
<h1, $50, 0.9 miles> t = 1
<h4, $52, 0.7 miles> t = 2<h1, $50, 0.9 miles>
<h2, $50, 1.0 miles>
<h3, $55, 1.0 miles>
<h4, $52, 0.7 miles>
<h5, $49, 1.0 miles>
<h6, $51, 0.7 miles>
Data set Window
Temporary file
incomparable
β¦
34. Borzsony, S., The Skyline Operator, In proc, IEEE Conf. on Data Engineering, page 421-430, Heidelberg, Germany, Apr. 2001.
Implementation: BNL Algorithms
Demonstration BNL-basic1. BNL-basic
2. BNL-sol
3. BNL-solrep
<h1, $50, 0.9 miles> t = 1
<h4, $52, 0.7 miles> t = 2<h1, $50, 0.9 miles>
<h2, $50, 1.0 miles>
<h3, $55, 1.0 miles>
<h4, $52, 0.7 miles>
<h5, $49, 1.0 miles>
<h6, $51, 0.7 miles> <h5, $49, 1.0 miles> t = 3
Data set Window
Temporary file
β¦
35. Borzsony, S., The Skyline Operator, In proc, IEEE Conf. on Data Engineering, page 421-430, Heidelberg, Germany, Apr. 2001.
Implementation: BNL Algorithms
Demonstration BNL-basic1. BNL-basic
2. BNL-sol
3. BNL-solrep
<h1, $50, 0.9 miles> t = 1
<h4, $52, 0.7 miles> t = 2<h1, $50, 0.9 miles>
<h2, $50, 1.0 miles>
<h3, $55, 1.0 miles>
<h4, $52, 0.7 miles>
<h5, $49, 1.0 miles>
<h6, $51, 0.7 miles> <h5, $49, 1.0 miles> t = 3
Data set Window
Temporary file
compare
dominated
β¦
36. Borzsony, S., The Skyline Operator, In proc, IEEE Conf. on Data Engineering, page 421-430, Heidelberg, Germany, Apr. 2001.
Implementation: BNL Algorithms
Demonstration BNL-basic1. BNL-basic
2. BNL-sol
3. BNL-solrep
<h1, $50, 0.9 miles> t = 1
<h4, $52, 0.7 miles> t = 2<h1, $50, 0.9 miles>
<h2, $50, 1.0 miles>
<h3, $55, 1.0 miles>
<h4, $52, 0.7 miles>
<h5, $49, 1.0 miles>
<h6, $51, 0.7 miles> <h5, $49, 1.0 miles> t = 3
Data set Window
Temporary file
removed
β¦
37. Borzsony, S., The Skyline Operator, In proc, IEEE Conf. on Data Engineering, page 421-430, Heidelberg, Germany, Apr. 2001.
Implementation: BNL Algorithms
Demonstration BNL-basic1. BNL-basic
2. BNL-sol
3. BNL-solrep
<h1, $50, 0.9 miles> t = 1
<h6, $51, 0.7 miles> t = 4<h1, $50, 0.9 miles>
<h2, $50, 1.0 miles>
<h3, $55, 1.0 miles>
<h4, $52, 0.7 miles>
<h5, $49, 1.0 miles>
<h6, $51, 0.7 miles> <h5, $49, 1.0 miles> t = 3
Data set Window
Temporary file
replace
β¦
38. Borzsony, S., The Skyline Operator, In proc, IEEE Conf. on Data Engineering, page 421-430, Heidelberg, Germany, Apr. 2001.
Implementation: BNL Algorithms
Demonstration BNL-basic1. BNL-basic
2. BNL-sol
3. BNL-solrep
<h1, $50, 0.9 miles> t = 1
<h6, $51, 0.7 miles> t = 4<h1, $50, 0.9 miles>
<h2, $50, 1.0 miles>
<h3, $55, 1.0 miles>
<h4, $52, 0.7 miles>
<h5, $49, 1.0 miles>
<h6, $51, 0.7 miles> <h5, $49, 1.0 miles> t = 3
β¦
Data set Window
Temporary file
output
window at
the end of
the iteration
β¦
iterate until EOF
39. Borzsony, S., The Skyline Operator, In proc, IEEE Conf. on Data Engineering, page 421-430, Heidelberg, Germany, Apr. 2001.
Implementation: BNL Algorithms
Demonstration BNL-basic1. BNL-basic
2. BNL-sol
3. BNL-solrep
<h1, $50, 0.9 miles>
<h2, $50, 1.0 miles>
<h3, $55, 1.0 miles>
<h4, $52, 0.7 miles>
<h5, $49, 1.0 miles>
<h6, $51, 0.7 miles> <h5, $49, 1.0 miles> t = 3
β¦
Data set Window
Temporary file
next
iteration
β¦
40. Borzsony, S., The Skyline Operator, In proc, IEEE Conf. on Data Engineering, page 421-430, Heidelberg, Germany, Apr. 2001.
Implementation: BNL Algorithms
Basic Block-nested-loops Algorithm
β’ It works well if the Skyline fits into the window.
β’ The best case complexity is π(π).
β’ The worst case complexity is π(π2).
β’ It is better I/O behavior than the naive nested-loops
algorithm(Haas, Carey, Livny and Shukla 1997).
1. BNL-basic
2. BNL-sol
3. BNL-solrep
41. Borzsony, S., The Skyline Operator, In proc, IEEE Conf. on Data Engineering, page 421-430, Heidelberg, Germany, Apr. 2001.
Implementation: BNL Algorithms
Maintaining the Window as a Self-organizing List
β’ To speed up comparison a tuple in the window
β’ To move up a tuple in the window which dominates
another tuple in input
1. BNL-basic
2. BNL-sol
3. BNL-solrep
β¦
<h2, $50, 0.8 miles> t = 2
<h5, $49, 1.0 miles> t = 3
Window
β¦
<h7, $49, 1.2 miles>
β¦
Data set
dominates
move up to the first line of the window
42. Borzsony, S., The Skyline Operator, In proc, IEEE Conf. on Data Engineering, page 421-430, Heidelberg, Germany, Apr. 2001.
Implementation: BNL Algorithms
Maintaining the Window as a Self-organizing List
β’ Attractive if the data is skewed
(i.e. better performance if there are a couple of ππππππ tuples
which dominate many other tuples, and better performance
if there are many πππ’π‘πππ tuples in the Skyline.)
1. BNL-basic
2. BNL-sol
3. BNL-solrep
killer tuple
dominated by
killer tuple
neutral tuples
neutral tuples
43. Borzsony, S., The Skyline Operator, In proc, IEEE Conf. on Data Engineering, page 421-430, Heidelberg, Germany, Apr. 2001.
Implementation: BNL Algorithms
Replacing Tuples in the Window1. BNL-basic
2. BNL-sol
3. BNL-solrep
<h1, $50, 1.0 miles> t = 1
<h2, $59, 0.9 miles> t = 2
Window
β¦
<h3, $60, 0.1 miles>
β¦
Data set
incomparable no memory
44. Borzsony, S., The Skyline Operator, In proc, IEEE Conf. on Data Engineering, page 421-430, Heidelberg, Germany, Apr. 2001.
Implementation: BNL Algorithms
Replacing Tuples in the Window1. BNL-basic
2. BNL-sol
3. BNL-solrep
<h1, $50, 1.0 miles> t = 1
<h2, $59, 0.9 miles> t = 2
Window
β¦
<h3, $60, 0.1 miles>
β¦
Data set
replacing
0
0.2
0.4
0.6
0.8
1
1.2
48 50 52 54 56 58 60 62
h1 h2
h3
45. Borzsony, S., The Skyline Operator, In proc, IEEE Conf. on Data Engineering, page 421-430, Heidelberg, Germany, Apr. 2001.
Implementation: BNL Algorithms
Replacing Tuples in the Window1. BNL-basic
2. BNL-sol
3. BNL-solrep
<h1, $50, 1.0 miles> t = 1
<h3, $60, 0.1 miles> t = 3
Window
β¦
<h3, $60, 0.1 miles>
β¦
Data set
replacing
0
0.2
0.4
0.6
0.8
1
1.2
48 50 52 54 56 58 60 62
h1 h2
h3
46. Borzsony, S., The Skyline Operator, In proc, IEEE Conf. on Data Engineering, page 421-430, Heidelberg, Germany, Apr. 2001.
Implementation: BNL Algorithms
Replacing Tuples in the Window
β’ Replacing when new tuple can dominate more tuples
β’ Many replacement policies; πππππ β πππ π‘ππππ
β’ Additional CPU cost needed
β’ Two tuples in the temporary file might be compared twice.
1. BNL-basic
2. BNL-sol
3. BNL-solrep
<h1, $50, 1.0 miles> t = 1
<h3, $60, 0.1 miles> t = 3
Window
β¦
<h3, $60, 0.1 miles>
β¦
Data set
47. Borzsony, S., The Skyline Operator, In proc, IEEE Conf. on Data Engineering, page 421-430, Heidelberg, Germany, Apr. 2001.
Implementation: D&C Algorithm
The worst case and best case complexity is
π π β log π πβ2 + π(π β log π)
where π is the number of input tuples and π is the number of
dimensions (Kung, Luccio and Preparata 1975).
(unlikely for the BNL, the best case is O π and the worst
case is O(π2
))
1. D&C-basic
2. D&C-mpt
3. D&C-mptesk
48. Borzsony, S., The Skyline Operator, In proc, IEEE Conf. on Data Engineering, page 421-430, Heidelberg, Germany, Apr. 2001.
Implementation: D&C Algorithm
Basic Divide and Conquer Algorithm Steps:
1. Compute the approximate median π π of the input for
some dimension π π. Divide the input two partitions by π π.
2. Compute the Skyline π1 of π1 and π2 of π2. π1 and π2 are
recursively partitioned until a partition has one or few
tuples. Then computing the Skyline is trivial.
3. Compute the overall Skyline as merging π1 and π2.
1. D&C-basic
2. D&C-mpt
3. D&C-mptesk
49. Borzsony, S., The Skyline Operator, In proc, IEEE Conf. on Data Engineering, page 421-430, Heidelberg, Germany, Apr. 2001.
Implementation: D&C Algorithm
Basic Divide and Conquer Algorithm Steps:
At the step 3, partition both π1 and π2 by approximate
median π π for dimension π π(β π π). Then we obtain
partition π1,1, π1,2, π2,1 and π2,2
1. D&C-basic
2. D&C-mpt
3. D&C-mptesk
50. Borzsony, S., The Skyline Operator, In proc, IEEE Conf. on Data Engineering, page 421-430, Heidelberg, Germany, Apr. 2001.
Implementation: D&C Algorithm
Pseudo-code1. D&C-basic
2. D&C-mpt
3. D&C-mptesk
π΄: input of the Skyline operation; a set of π-
dimensional points
πΉ: output of the Skyline operation; a set of π-
dimensional points
π βΊ π: point π is dominated by point π
function SkylineBasic M, Dimension
begin
if π = 1 then return π
πππ£ππ‘ β Median π π·πππππ πππ π β π
π1, π2 β Partition π, π·πππππ πππ, πππ£ππ‘
π1 β SkylineBasic(π1, π·πππππ πππ)
π2 β SkylineBasic π2, π·πππππ πππ
return π1 β MergeBasic(π1, π2, π·πππππ πππ)
end
function MergeBasic(π1, π2, π·πππππ πππ)
begin
if π1 = {π} then π β π β π2 π β» π
else if π2 = π then begin
for each π β π1 do if π βΊ π then π β π
end else if π·πππππ πππ = 2 then begin
πππ β Minimum{π1|π β π1}
π β π β π2 π1 < πππ
end else begin
πππ£ππ‘ β Median π π·πππππ πππβ1 π β π1
π1,1, π1,2 β Partition π1, π·πππππ πππ β 1, πππ£ππ‘
π2,1, π2,2 β Partition π2, π·πππππ πππ β 1, πππ£ππ‘
π 1 β MergeBasic π1,1, π2,1, π·πππππ πππ
π 2 β MergeBasic π1,2, π2,2, π·πππππ πππ
π 3 β MergeBasic π1,1, π 2, π·πππππ πππ β 1
π β π 1 βͺ π 3
end
return R
end
See also Preparata et al. (1993), Computational Geometry, pp. 161-164,
Springer.
51. Borzsony, S., The Skyline Operator, In proc, IEEE Conf. on Data Engineering, page 421-430, Heidelberg, Germany, Apr. 2001.
Implementation: D&C Algorithm
At the merge basic function:1. D&C-basic
2. D&C-mpt
3. D&C-mptesk
π1,1
π1,2
π2,1
π2,2
ππππππ π
ππππππ π
52. Borzsony, S., The Skyline Operator, In proc, IEEE Conf. on Data Engineering, page 421-430, Heidelberg, Germany, Apr. 2001.
Implementation: D&C Algorithm
At the merge basic function:1. D&C-basic
2. D&C-mpt
3. D&C-mptesk
π1,1
π1,2
π2,1
π2,2
ππππππ π
ππππππ π
53. Borzsony, S., The Skyline Operator, In proc, IEEE Conf. on Data Engineering, page 421-430, Heidelberg, Germany, Apr. 2001.
Implementation: D&C Algorithm
At the merge basic function:1. D&C-basic
2. D&C-mpt
3. D&C-mptesk
π1,1
π1,2
π2,1
π2,2
ππππππ π
ππππππ π
54. Borzsony, S., The Skyline Operator, In proc, IEEE Conf. on Data Engineering, page 421-430, Heidelberg, Germany, Apr. 2001.
Implementation: D&C Algorithm
At the merge basic function:1. D&C-basic
2. D&C-mpt
3. D&C-mptesk
π1,1
π1,2
π2,1
π2,2
ππππππ π
ππππππ π
55. Borzsony, S., The Skyline Operator, In proc, IEEE Conf. on Data Engineering, page 421-430, Heidelberg, Germany, Apr. 2001.
Implementation: D&C Algorithm
Pseudo-code1. D&C-basic
2. D&C-mpt
3. D&C-mptesk
π΄: input of the Skyline operation; a set of π-dimensional points
πΉ: output of the Skyline operation; a set of π-dimensional points
π βΊ π: point π is dominated by point π
function SkylineBasic M, Dimension
begin
if π = 1 then return π
πππ£ππ‘ β Median π π·πππππ πππ π β π
π1, π2 β Partition π, π·πππππ πππ, πππ£ππ‘
π1 β SkylineBasic(π1, π·πππππ πππ)
π2 β SkylineBasic π2, π·πππππ πππ
return π1 β MergeBasic(π1, π2, π·πππππ πππ)
end
function MergeBasic(π1, π2, π·πππππ πππ)
begin
if π1 = {π} then π β π β π2 π β» π
else if π2 = π then begin
for each π β π1 do if π βΊ π then π β π
end else if π·πππππ πππ = 2 then begin
πππ β Minimum{π1|π β π1}
π β π β π2 π1 < πππ
end else begin
πππ£ππ‘ β Median π π·πππππ πππβ1 π β π1
π1,1, π1,2 β Partition π1, π·πππππ πππ β 1, πππ£ππ‘
π2,1, π2,2 β Partition π2, π·πππππ πππ β 1, πππ£ππ‘
π 1 β MergeBasic π1,1, π2,1, π·πππππ πππ
π 2 β MergeBasic π1,2, π2,2, π·πππππ πππ
π 3 β MergeBasic π1,1, π 2, π·πππππ πππ β 1
π β π 1 βͺ π 3
end
return R
end
See also Preparata et al. (1993), Computational Geometry, pp. 161-164,
Springer.
56. Borzsony, S., The Skyline Operator, In proc, IEEE Conf. on Data Engineering, page 421-430, Heidelberg, Germany, Apr. 2001.
Implementation: D&C Algorithm
Pseudo-code1. D&C-basic
2. D&C-mpt
3. D&C-mptesk
π΄: input of the Skyline operation; a set of π-dimensional points
πΉ: output of the Skyline operation; a set of π-dimensional points
π βΊ π: point π is dominated by point π
function SkylineBasic M, Dimension
begin
if π = 1 then return π
πππ£ππ‘ β Median π π·πππππ πππ π β π
π1, π2 β Partition π, π·πππππ πππ, πππ£ππ‘
π1 β SkylineBasic(π1, π·πππππ πππ)
π2 β SkylineBasic π2, π·πππππ πππ
return π1 β MergeBasic(π1, π2, π·πππππ πππ)
end
57. Borzsony, S., The Skyline Operator, In proc, IEEE Conf. on Data Engineering, page 421-430, Heidelberg, Germany, Apr. 2001.
Implementation: D&C Algorithm
Pseudo-code1. D&C-basic
2. D&C-mpt
3. D&C-mptesk
π΄: input of the Skyline operation; a set of π-dimensional points
πΉ: output of the Skyline operation; a set of π-dimensional points
π βΊ π: point π is dominated by point π
function SkylineBasic M, Dimension
begin
if π = 1 then return π
πππ£ππ‘ β Median π π·πππππ πππ π β π
π1, π2 β Partition π, π·πππππ πππ, πππ£ππ‘
π1 β SkylineBasic(π1, π·πππππ πππ)
π2 β SkylineBasic π2, π·πππππ πππ
return π1 β MergeBasic(π1, π2, π·πππππ πππ)
end
58. Borzsony, S., The Skyline Operator, In proc, IEEE Conf. on Data Engineering, page 421-430, Heidelberg, Germany, Apr. 2001.
Implementation: D&C Algorithm
Pseudo-code1. D&C-basic
2. D&C-mpt
3. D&C-mptesk
π΄: input of the Skyline operation; a set of π-dimensional points
πΉ: output of the Skyline operation; a set of π-dimensional points
π βΊ π: point π is dominated by point π
function SkylineBasic M, Dimension
begin
if π = 1 then return π
πππ£ππ‘ β Median π π·πππππ πππ π β π
π1, π2 β Partition π, π·πππππ πππ, πππ£ππ‘
π1 β SkylineBasic(π1, π·πππππ πππ)
π2 β SkylineBasic π2, π·πππππ πππ
return π1 β MergeBasic(π1, π2, π·πππππ πππ)
end
59. Borzsony, S., The Skyline Operator, In proc, IEEE Conf. on Data Engineering, page 421-430, Heidelberg, Germany, Apr. 2001.
Implementation: D&C Algorithm
Pseudo-code1. D&C-basic
2. D&C-mpt
3. D&C-mptesk
π΄: input of the Skyline operation; a set of π-dimensional points
πΉ: output of the Skyline operation; a set of π-dimensional points
π βΊ π: point π is dominated by point π
function SkylineBasic M, Dimension
begin
if π = 1 then return π
πππ£ππ‘ β Median π π·πππππ πππ π β π
π1, π2 β Partition π, π·πππππ πππ, πππ£ππ‘
π1 β SkylineBasic(π1, π·πππππ πππ)
π2 β SkylineBasic π2, π·πππππ πππ
return π1 β MergeBasic(π1, π2, π·πππππ πππ)
end
60. Borzsony, S., The Skyline Operator, In proc, IEEE Conf. on Data Engineering, page 421-430, Heidelberg, Germany, Apr. 2001.
Implementation: D&C Algorithm
Pseudo-code1. D&C-basic
2. D&C-mpt
3. D&C-mptesk
π΄: input of the Skyline operation; a set of π-dimensional points
πΉ: output of the Skyline operation; a set of π-dimensional points
π βΊ π: point π is dominated by point π
function SkylineBasic M, Dimension
begin
if π = 1 then return π
πππ£ππ‘ β Median π π·πππππ πππ π β π
π1, π2 β Partition π, π·πππππ πππ, πππ£ππ‘
π1 β SkylineBasic(π1, π·πππππ πππ)
π2 β SkylineBasic π2, π·πππππ πππ
return π1 β MergeBasic(π1, π2, π·πππππ πππ)
end
61. Borzsony, S., The Skyline Operator, In proc, IEEE Conf. on Data Engineering, page 421-430, Heidelberg, Germany, Apr. 2001.
Implementation: D&C Algorithm
Pseudo-code1. D&C-basic
2. D&C-mpt
3. D&C-mptesk
π΄: input of the Skyline operation; a set of π-dimensional points
πΉ: output of the Skyline operation; a set of π-dimensional points
π βΊ π: point π is dominated by point π
function SkylineBasic M, Dimension
begin
if π = 1 then return π
πππ£ππ‘ β Median π π·πππππ πππ π β π
π1, π2 β Partition π, π·πππππ πππ, πππ£ππ‘
π1 β SkylineBasic(π1, π·πππππ πππ)
π2 β SkylineBasic π2, π·πππππ πππ
return π1 β MergeBasic(π1, π2, π·πππππ πππ)
end
62. Borzsony, S., The Skyline Operator, In proc, IEEE Conf. on Data Engineering, page 421-430, Heidelberg, Germany, Apr. 2001.
Implementation: D&C Algorithm
Pseudo-code1. D&C-basic
2. D&C-mpt
3. D&C-mptesk
π΄: input of the Skyline operation; a set of π-dimensional points
πΉ: output of the Skyline operation; a set of π-dimensional points
π βΊ π: point π is dominated by point π
function SkylineBasic M, Dimension
begin
if π = 1 then return π
πππ£ππ‘ β Median π π·πππππ πππ π β π
π1, π2 β Partition π, π·πππππ πππ, πππ£ππ‘
π1 β SkylineBasic(π1, π·πππππ πππ)
π2 β SkylineBasic π2, π·πππππ πππ
return π1 β MergeBasic(π1, π2, π·πππππ πππ)
end
63. Borzsony, S., The Skyline Operator, In proc, IEEE Conf. on Data Engineering, page 421-430, Heidelberg, Germany, Apr. 2001.
Implementation: D&C Algorithm
Pseudo-code1. D&C-basic
2. D&C-mpt
3. D&C-mptesk
π΄: input of the Skyline operation; a set of π-dimensional points
πΉ: output of the Skyline operation; a set of π-dimensional points
π βΊ π: point π is dominated by point π
function SkylineBasic M, Dimension
begin
if π = 1 then return π
πππ£ππ‘ β Median π π·πππππ πππ π β π
π1, π2 β Partition π, π·πππππ πππ, πππ£ππ‘
π1 β SkylineBasic(π1, π·πππππ πππ)
π2 β SkylineBasic π2, π·πππππ πππ
return π1 β MergeBasic(π1, π2, π·πππππ πππ)
end
64. Borzsony, S., The Skyline Operator, In proc, IEEE Conf. on Data Engineering, page 421-430, Heidelberg, Germany, Apr. 2001.
Implementation: D&C Algorithm
1. D&C-basic
2. D&C-mpt
3. D&C-mptesk
function MergeBasic(π1, π2, π·πππππ πππ)
begin
if π1 = {π} then π β π β π2 π β» π
else if π2 = π then begin
for each π β π1 do if π βΊ π then π β π
end else if π·πππππ πππ = 2 then begin
πππ β Minimum{π1|π β π1}
π β π β π2 π1 < πππ
end else begin
πππ£ππ‘ β Median π π·πππππ πππβ1 π β π1
π1,1, π1,2 β Partition π1, π·πππππ πππ β 1, πππ£ππ‘
π2,1, π2,2 β Partition π2, π·πππππ πππ β 1, πππ£ππ‘
π 1 β MergeBasic π1,1, π2,1, π·πππππ πππ
π 2 β MergeBasic π1,2, π2,2, π·πππππ πππ
π 3 β MergeBasic π1,1, π 2, π·πππππ πππ β 1
π β π 1 βͺ π 3
end
return R
end
See also Preparata et al. (1993), Computational Geometry, pp. 161-164,
Springer.
65. Borzsony, S., The Skyline Operator, In proc, IEEE Conf. on Data Engineering, page 421-430, Heidelberg, Germany, Apr. 2001.
Implementation: D&C Algorithm
1. D&C-basic
2. D&C-mpt
3. D&C-mptesk
function MergeBasic(π1, π2, π·πππππ πππ)
begin
if π1 = {π} then π β π β π2 π β» π
else if π2 = π then begin
for each π β π1 do if π βΊ π then π β π
end else if π·πππππ πππ = 2 then begin
πππ β Minimum{π1|π β π1}
π β π β π2 π1 < πππ
end else begin
πππ£ππ‘ β Median π π·πππππ πππβ1 π β π1
π1,1, π1,2 β Partition π1, π·πππππ πππ β 1, πππ£ππ‘
π2,1, π2,2 β Partition π2, π·πππππ πππ β 1, πππ£ππ‘
π 1 β MergeBasic π1,1, π2,1, π·πππππ πππ
π 2 β MergeBasic π1,2, π2,2, π·πππππ πππ
π 3 β MergeBasic π1,1, π 2, π·πππππ πππ β 1
π β π 1 βͺ π 3
end
return R
end
See also Preparata et al. (1993), Computational Geometry, pp. 161-164,
Springer.
66. Borzsony, S., The Skyline Operator, In proc, IEEE Conf. on Data Engineering, page 421-430, Heidelberg, Germany, Apr. 2001.
Implementation: D&C Algorithm
1. D&C-basic
2. D&C-mpt
3. D&C-mptesk
function MergeBasic(π1, π2, π·πππππ πππ)
begin
if π1 = {π} then π β π β π2 π β» π
else if π2 = π then begin
for each π β π1 do if π βΊ π then π β π
end else if π·πππππ πππ = 2 then begin
πππ β Minimum{π1|π β π1}
π β π β π2 π1 < πππ
end else begin
πππ£ππ‘ β Median π π·πππππ πππβ1 π β π1
π1,1, π1,2 β Partition π1, π·πππππ πππ β 1, πππ£ππ‘
π2,1, π2,2 β Partition π2, π·πππππ πππ β 1, πππ£ππ‘
π 1 β MergeBasic π1,1, π2,1, π·πππππ πππ
π 2 β MergeBasic π1,2, π2,2, π·πππππ πππ
π 3 β MergeBasic π1,1, π 2, π·πππππ πππ β 1
π β π 1 βͺ π 3
end
return R
end
See also Preparata et al. (1993), Computational Geometry, pp. 161-164,
Springer.
67. Borzsony, S., The Skyline Operator, In proc, IEEE Conf. on Data Engineering, page 421-430, Heidelberg, Germany, Apr. 2001.
Implementation: D&C Algorithm
1. D&C-basic
2. D&C-mpt
3. D&C-mptesk
function MergeBasic(π1, π2, π·πππππ πππ)
begin
if π1 = {π} then π β π β π2 π β» π
else if π2 = π then begin
for each π β π1 do if π βΊ π then π β π
end else if π·πππππ πππ = 2 then begin
πππ β Minimum{π1|π β π1}
π β π β π2 π1 < πππ
end else begin
πππ£ππ‘ β Median π π·πππππ πππβ1 π β π1
π1,1, π1,2 β Partition π1, π·πππππ πππ β 1, πππ£ππ‘
π2,1, π2,2 β Partition π2, π·πππππ πππ β 1, πππ£ππ‘
π 1 β MergeBasic π1,1, π2,1, π·πππππ πππ
π 2 β MergeBasic π1,2, π2,2, π·πππππ πππ
π 3 β MergeBasic π1,1, π 2, π·πππππ πππ β 1
π β π 1 βͺ π 3
end
return R
end
See also Preparata et al. (1993), Computational Geometry, pp. 161-164,
Springer.
68. Borzsony, S., The Skyline Operator, In proc, IEEE Conf. on Data Engineering, page 421-430, Heidelberg, Germany, Apr. 2001.
Implementation: D&C Algorithm
1. D&C-basic
2. D&C-mpt
3. D&C-mptesk
function MergeBasic(π1, π2, π·πππππ πππ)
begin
if π1 = {π} then π β π β π2 π β» π
else if π2 = π then begin
for each π β π1 do if π βΊ π then π β π
end else if π·πππππ πππ = 2 then begin
πππ β Minimum{π1|π β π1}
π β π β π2 π1 < πππ
end else begin
πππ£ππ‘ β Median π π·πππππ πππβ1 π β π1
π1,1, π1,2 β Partition π1, π·πππππ πππ β 1, πππ£ππ‘
π2,1, π2,2 β Partition π2, π·πππππ πππ β 1, πππ£ππ‘
π 1 β MergeBasic π1,1, π2,1, π·πππππ πππ
π 2 β MergeBasic π1,2, π2,2, π·πππππ πππ
π 3 β MergeBasic π1,1, π 2, π·πππππ πππ β 1
π β π 1 βͺ π 3
end
return R
end
See also Preparata et al. (1993), Computational Geometry, pp. 161-164,
Springer.
69. Borzsony, S., The Skyline Operator, In proc, IEEE Conf. on Data Engineering, page 421-430, Heidelberg, Germany, Apr. 2001.
Implementation: D&C Algorithm
1. D&C-basic
2. D&C-mpt
3. D&C-mptesk
function MergeBasic(π1, π2, π·πππππ πππ)
begin
if π1 = {π} then π β π β π2 π β» π
else if π2 = π then begin
for each π β π1 do if π βΊ π then π β π
end else if π·πππππ πππ = 2 then begin
πππ β Minimum{π1|π β π1}
π β π β π2 π1 < πππ
end else begin
πππ£ππ‘ β Median π π·πππππ πππβ1 π β π1
π1,1, π1,2 β Partition π1, π·πππππ πππ β 1, πππ£ππ‘
π2,1, π2,2 β Partition π2, π·πππππ πππ β 1, πππ£ππ‘
π 1 β MergeBasic π1,1, π2,1, π·πππππ πππ
π 2 β MergeBasic π1,2, π2,2, π·πππππ πππ
π 3 β MergeBasic π1,1, π 2, π·πππππ πππ β 1
π β π 1 βͺ π 3
end
return R
end
See also Preparata et al. (1993), Computational Geometry, pp. 161-164,
Springer.
70. Borzsony, S., The Skyline Operator, In proc, IEEE Conf. on Data Engineering, page 421-430, Heidelberg, Germany, Apr. 2001.
Implementation: D&C Algorithm
1. D&C-basic
2. D&C-mpt
3. D&C-mptesk
function MergeBasic(π1, π2, π·πππππ πππ)
begin
if π1 = {π} then π β π β π2 π β» π
else if π2 = π then begin
for each π β π1 do if π βΊ π then π β π
end else if π·πππππ πππ = 2 then begin
πππ β Minimum{π1|π β π1}
π β π β π2 π1 < πππ
end else begin
πππ£ππ‘ β Median π π·πππππ πππβ1 π β π1
π1,1, π1,2 β Partition π1, π·πππππ πππ β 1, πππ£ππ‘
π2,1, π2,2 β Partition π2, π·πππππ πππ β 1, πππ£ππ‘
π 1 β MergeBasic π1,1, π2,1, π·πππππ πππ
π 2 β MergeBasic π1,2, π2,2, π·πππππ πππ
π 3 β MergeBasic π1,1, π 2, π·πππππ πππ β 1
π β π 1 βͺ π 3
end
return R
end
See also Preparata et al. (1993), Computational Geometry, pp. 161-164,
Springer.
71. Borzsony, S., The Skyline Operator, In proc, IEEE Conf. on Data Engineering, page 421-430, Heidelberg, Germany, Apr. 2001.
Implementation: D&C Algorithm
1. D&C-basic
2. D&C-mpt
3. D&C-mptesk
function MergeBasic(π1, π2, π·πππππ πππ)
begin
if π1 = {π} then π β π β π2 π β» π
else if π2 = π then begin
for each π β π1 do if π βΊ π then π β π
end else if π·πππππ πππ = 2 then begin
πππ β Minimum{π1|π β π1}
π β π β π2 π1 < πππ
end else begin
πππ£ππ‘ β Median π π·πππππ πππβ1 π β π1
π1,1, π1,2 β Partition π1, π·πππππ πππ β 1, πππ£ππ‘
π2,1, π2,2 β Partition π2, π·πππππ πππ β 1, πππ£ππ‘
π 1 β MergeBasic π1,1, π2,1, π·πππππ πππ
π 2 β MergeBasic π1,2, π2,2, π·πππππ πππ
π 3 β MergeBasic π1,1, π 2, π·πππππ πππ β 1
π β π 1 βͺ π 3
end
return R
end
See also Preparata et al. (1993), Computational Geometry, pp. 161-164,
Springer.
72. Borzsony, S., The Skyline Operator, In proc, IEEE Conf. on Data Engineering, page 421-430, Heidelberg, Germany, Apr. 2001.
Implementation: D&C Algorithm
1. D&C-basic
2. D&C-mpt
3. D&C-mptesk
function MergeBasic(π1, π2, π·πππππ πππ)
begin
if π1 = {π} then π β π β π2 π β» π
else if π2 = π then begin
for each π β π1 do if π βΊ π then π β π
end else if π·πππππ πππ = 2 then begin
πππ β Minimum{π1|π β π1}
π β π β π2 π1 < πππ
end else begin
πππ£ππ‘ β Median π π·πππππ πππβ1 π β π1
π1,1, π1,2 β Partition π1, π·πππππ πππ β 1, πππ£ππ‘
π2,1, π2,2 β Partition π2, π·πππππ πππ β 1, πππ£ππ‘
π 1 β MergeBasic π1,1, π2,1, π·πππππ πππ
π 2 β MergeBasic π1,2, π2,2, π·πππππ πππ
π 3 β MergeBasic π1,1, π 2, π·πππππ πππ β 1
π β π 1 βͺ π 3
end
return R
end
See also Preparata et al. (1993), Computational Geometry, pp. 161-164,
Springer.
73. Borzsony, S., The Skyline Operator, In proc, IEEE Conf. on Data Engineering, page 421-430, Heidelberg, Germany, Apr. 2001.
Implementation: D&C Algorithm
1. D&C-basic
2. D&C-mpt
3. D&C-mptesk
function MergeBasic(π1, π2, π·πππππ πππ)
begin
if π1 = {π} then π β π β π2 π β» π
else if π2 = π then begin
for each π β π1 do if π βΊ π then π β π
end else if π·πππππ πππ = 2 then begin
πππ β Minimum{π1|π β π1}
π β π β π2 π1 < πππ
end else begin
πππ£ππ‘ β Median π π·πππππ πππβ1 π β π1
π1,1, π1,2 β Partition π1, π·πππππ πππ β 1, πππ£ππ‘
π2,1, π2,2 β Partition π2, π·πππππ πππ β 1, πππ£ππ‘
π 1 β MergeBasic π1,1, π2,1, π·πππππ πππ
π 2 β MergeBasic π1,2, π2,2, π·πππππ πππ
π 3 β MergeBasic π1,1, π 2, π·πππππ πππ β 1
π β π 1 βͺ π 3
end
return R
end
See also Preparata et al. (1993), Computational Geometry, pp. 161-164,
Springer.
74. Borzsony, S., The Skyline Operator, In proc, IEEE Conf. on Data Engineering, page 421-430, Heidelberg, Germany, Apr. 2001.
Implementation: D&C Algorithm
1. D&C-basic
2. D&C-mpt
3. D&C-mptesk
function MergeBasic(π1, π2, π·πππππ πππ)
begin
if π1 = {π} then π β π β π2 π β» π
else if π2 = π then begin
for each π β π1 do if π βΊ π then π β π
end else if π·πππππ πππ = 2 then begin
πππ β Minimum{π1|π β π1}
π β π β π2 π1 < πππ
end else begin
πππ£ππ‘ β Median π π·πππππ πππβ1 π β π1
π1,1, π1,2 β Partition π1, π·πππππ πππ β 1, πππ£ππ‘
π2,1, π2,2 β Partition π2, π·πππππ πππ β 1, πππ£ππ‘
π 1 β MergeBasic π1,1, π2,1, π·πππππ πππ
π 2 β MergeBasic π1,2, π2,2, π·πππππ πππ
π 3 β MergeBasic π1,1, π 2, π·πππππ πππ β 1
π β π 1 βͺ π 3
end
return R
end
See also Preparata et al. (1993), Computational Geometry, pp. 161-164,
Springer.
75. Borzsony, S., The Skyline Operator, In proc, IEEE Conf. on Data Engineering, page 421-430, Heidelberg, Germany, Apr. 2001.
Implementation: D&C Algorithm
1. D&C-basic
2. D&C-mpt
3. D&C-mptesk
function MergeBasic(π1, π2, π·πππππ πππ)
begin
if π1 = {π} then π β π β π2 π β» π
else if π2 = π then begin
for each π β π1 do if π βΊ π then π β π
end else if π·πππππ πππ = 2 then begin
πππ β Minimum{π1|π β π1}
π β π β π2 π1 < πππ
end else begin
πππ£ππ‘ β Median π π·πππππ πππβ1 π β π1
π1,1, π1,2 β Partition π1, π·πππππ πππ β 1, πππ£ππ‘
π2,1, π2,2 β Partition π2, π·πππππ πππ β 1, πππ£ππ‘
π 1 β MergeBasic π1,1, π2,1, π·πππππ πππ
π 2 β MergeBasic π1,2, π2,2, π·πππππ πππ
π 3 β MergeBasic π1,1, π 2, π·πππππ πππ β 1
π β π 1 βͺ π 3
end
return R
end
See also Preparata et al. (1993), Computational Geometry, pp. 161-164,
Springer.
76. Borzsony, S., The Skyline Operator, In proc, IEEE Conf. on Data Engineering, page 421-430, Heidelberg, Germany, Apr. 2001.
Implementation: D&C Algorithm
1. D&C-basic
2. D&C-mpt
3. D&C-mptesk
function MergeBasic(π1, π2, π·πππππ πππ)
begin
if π1 = {π} then π β π β π2 π β» π
else if π2 = π then begin
for each π β π1 do if π βΊ π then π β π
end else if π·πππππ πππ = 2 then begin
πππ β Minimum{π1|π β π1}
π β π β π2 π1 < πππ
end else begin
πππ£ππ‘ β Median π π·πππππ πππβ1 π β π1
π1,1, π1,2 β Partition π1, π·πππππ πππ β 1, πππ£ππ‘
π2,1, π2,2 β Partition π2, π·πππππ πππ β 1, πππ£ππ‘
π 1 β MergeBasic π1,1, π2,1, π·πππππ πππ
π 2 β MergeBasic π1,2, π2,2, π·πππππ πππ
π 3 β MergeBasic π1,1, π 2, π·πππππ πππ β 1
π β π 1 βͺ π 3
end
return R
end
See also Preparata et al. (1993), Computational Geometry, pp. 161-164,
Springer.
77. Borzsony, S., The Skyline Operator, In proc, IEEE Conf. on Data Engineering, page 421-430, Heidelberg, Germany, Apr. 2001.
Implementation: D&C Algorithm
1. D&C-basic
2. D&C-mpt
3. D&C-mptesk
function MergeBasic(π1, π2, π·πππππ πππ)
begin
if π1 = {π} then π β π β π2 π β» π
else if π2 = π then begin
for each π β π1 do if π βΊ π then π β π
end else if π·πππππ πππ = 2 then begin
πππ β Minimum{π1|π β π1}
π β π β π2 π1 < πππ
end else begin
πππ£ππ‘ β Median π π·πππππ πππβ1 π β π1
π1,1, π1,2 β Partition π1, π·πππππ πππ β 1, πππ£ππ‘
π2,1, π2,2 β Partition π2, π·πππππ πππ β 1, πππ£ππ‘
π 1 β MergeBasic π1,1, π2,1, π·πππππ πππ
π 2 β MergeBasic π1,2, π2,2, π·πππππ πππ
π 3 β MergeBasic π1,1, π 2, π·πππππ πππ β 1
π β π 1 βͺ π 3
end
return R
end
See also Preparata et al. (1993), Computational Geometry, pp. 161-164,
Springer.
78. Borzsony, S., The Skyline Operator, In proc, IEEE Conf. on Data Engineering, page 421-430, Heidelberg, Germany, Apr. 2001.
Implementation: D&C Algorithm
1. D&C-basic
2. D&C-mpt
3. D&C-mptesk
function MergeBasic(π1, π2, π·πππππ πππ)
begin
if π1 = {π} then π β π β π2 π β» π
else if π2 = π then begin
for each π β π1 do if π βΊ π then π β π
end else if π·πππππ πππ = 2 then begin
πππ β Minimum{π1|π β π1}
π β π β π2 π1 < πππ
end else begin
πππ£ππ‘ β Median π π·πππππ πππβ1 π β π1
π1,1, π1,2 β Partition π1, π·πππππ πππ β 1, πππ£ππ‘
π2,1, π2,2 β Partition π2, π·πππππ πππ β 1, πππ£ππ‘
π 1 β MergeBasic π1,1, π2,1, π·πππππ πππ
π 2 β MergeBasic π1,2, π2,2, π·πππππ πππ
π 3 β MergeBasic π1,1, π 2, π·πππππ πππ β 1
π β π 1 βͺ π 3
end
return R
end
See also Preparata et al. (1993), Computational Geometry, pp. 161-164,
Springer.
79. Borzsony, S., The Skyline Operator, In proc, IEEE Conf. on Data Engineering, page 421-430, Heidelberg, Germany, Apr. 2001.
Implementation: D&C Algorithm
1. D&C-basic
2. D&C-mpt
3. D&C-mptesk
function MergeBasic(π1, π2, π·πππππ πππ)
begin
if π1 = {π} then π β π β π2 π β» π
else if π2 = π then begin
for each π β π1 do if π βΊ π then π β π
end else if π·πππππ πππ = 2 then begin
πππ β Minimum{π1|π β π1}
π β π β π2 π1 < πππ
end else begin
πππ£ππ‘ β Median π π·πππππ πππβ1 π β π1
π1,1, π1,2 β Partition π1, π·πππππ πππ β 1, πππ£ππ‘
π2,1, π2,2 β Partition π2, π·πππππ πππ β 1, πππ£ππ‘
π 1 β MergeBasic π1,1, π2,1, π·πππππ πππ
π 2 β MergeBasic π1,2, π2,2, π·πππππ πππ
π 3 β MergeBasic π1,1, π 2, π·πππππ πππ β 1
π β π 1 βͺ π 3
end
return R
end
See also Preparata et al. (1993), Computational Geometry, pp. 161-164,
Springer.
80. Borzsony, S., The Skyline Operator, In proc, IEEE Conf. on Data Engineering, page 421-430, Heidelberg, Germany, Apr. 2001.
Implementation: D&C Algorithm
1. D&C-basic
2. D&C-mpt
3. D&C-mptesk
function MergeBasic(π1, π2, π·πππππ πππ)
begin
if π1 = {π} then π β π β π2 π β» π
else if π2 = π then begin
for each π β π1 do if π βΊ π then π β π
end else if π·πππππ πππ = 2 then begin
πππ β Minimum{π1|π β π1}
π β π β π2 π1 < πππ
end else begin
πππ£ππ‘ β Median π π·πππππ πππβ1 π β π1
π1,1, π1,2 β Partition π1, π·πππππ πππ β 1, πππ£ππ‘
π2,1, π2,2 β Partition π2, π·πππππ πππ β 1, πππ£ππ‘
π 1 β MergeBasic π1,1, π2,1, π·πππππ πππ
π 2 β MergeBasic π1,2, π2,2, π·πππππ πππ
π 3 β MergeBasic π1,1, π 2, π·πππππ πππ β 1
π β π 1 βͺ π 3
end
return R
end
See also Preparata et al. (1993), Computational Geometry, pp. 161-164,
Springer.
81. Borzsony, S., The Skyline Operator, In proc, IEEE Conf. on Data Engineering, page 421-430, Heidelberg, Germany, Apr. 2001.
Implementation: D&C Algorithm
1. D&C-basic
2. D&C-mpt
3. D&C-mptesk
π΄: input of the Skyline operation; a set of π-dimensional points
πΉ: output of the Skyline operation; a set of π-dimensional points
π βΊ π: point π is dominated by point π
function SkylineBasic M, Dimension
begin
if π = 1 then return π
πππ£ππ‘ β Median π π·πππππ πππ π β π
π1, π2 β Partition π, π·πππππ πππ, πππ£ππ‘
π1 β SkylineBasic(π1, π·πππππ πππ)
π2 β SkylineBasic π2, π·πππππ πππ
return π1 β MergeBasic(π1, π2, π·πππππ πππ)
end
82. Borzsony, S., The Skyline Operator, In proc, IEEE Conf. on Data Engineering, page 421-430, Heidelberg, Germany, Apr. 2001.
Implementation: D&C Algorithm
M-way Partitioning
β’ To get better performance by I/O behavior than the basic
algorithm
β’ To divide into π partitions to fit into memory
β’ To be used in the first step and third step of the basic
algorithm
β’ Partition by quantile rather than median
1. D&C-basic
2. D&C-mpt
3. D&C-mptesk
83. Borzsony, S., The Skyline Operator, In proc, IEEE Conf. on Data Engineering, page 421-430, Heidelberg, Germany, Apr. 2001.
Implementation: D&C Algorithm
M-way Partitioning
β’ To be applied the basic algorithm at the first step, π-way
partitioning produces π partitions π1, β¦ , ππ to each ππ
fits into memory.
β’ At the third step of the basic algorithm, the π-way
partitioning is applied.
β’ All sub-partitions should occupy at most half of the
memory.
1. D&C-basic
2. D&C-mpt
3. D&C-mptesk
84. Borzsony, S., The Skyline Operator, In proc, IEEE Conf. on Data Engineering, page 421-430, Heidelberg, Germany, Apr. 2001.
function πππππππ€ππ¦ π1, π2, π·πππππ πππ
begin
if π1 = {π} then π β {π β π2|π β» π}
else if π2 = {π} then begin
foreach π β π1 do if π βΊ π then π β π
end else if π1 + π2 < |π| then π β ππππππ΅ππ ππ(π1, π2, π·πππππ πππ)
else if π·πππππ πππ = 2 then begin
πππ β ππππππ’π π1 π β π1
π β π β π2 π1 < πππ
end else begin
ππππ‘ππ‘ππππ β πππ₯πππ’π{
π1
π 2
,
π2
π 2
}
ππ’πππ‘ππππ β πΌ β ππ’πππ‘ππππ (π1, π·πππππ πππ β 1, ππππ‘πππππ )
π1,1, β¦ , π1,ππππ‘ππ‘ππππ β ππππ‘ππ‘ππππ (π1, π·πππππ πππ β 1, ππ’πππ‘ππππ )
π2,1, β¦ , π2,ππππ‘ππ‘ππππ β ππππ‘ππ‘ππππ (π2, π·πππππ πππ β 1, ππ’πππ‘ππππ )
π β π
for π β 1 to ππππ‘ππ‘ππππ do begin
for π β 1 to π do
if π < π then π2,π β πππππππ€ππ¦ π1,π, π2,π, π·πππππ πππ β 1
else π2,π β πππππππ€ππ¦ π1,π, π2,π, π·πππππ πππ
ππππππ(π , π2,π)
end
end
return π
end
Implementation: D&C Algorithm
Pseudo-code1. D&C-basic
2. D&C-mpt
3. D&C-mptesk
π΄: input of the Skyline operation; a set of π-dimensional points
πΉ: output of the Skyline operation; a set of π-dimensional points
π: main memory; a set of π-dimensional points
π βΊ π: point π is dominated by point π
function SkylineMway(π, π·πππππ πππ)
begin
ππππ‘ππ‘ππππ β Minimum 2 π π β πβ π β 2 π > π
ππ’πππ‘ππππ β πΌ β Quantiles π, π·πππππ πππ, ππππ‘ππ‘ππππ
π1, β¦ , πππππ‘ππ‘ππππ β Partition π, π·πππππ πππ, ππ’πππ‘ππππ
for π β 1 to ππππ‘ππ‘ππππ do
if ππ < |π| then ππ β SkylineBasic ππ, π·πππππ πππ
else ππ β SkylineMway ππ, π·πππππ πππ
while ππππ‘ππ‘ππππ > 1 do begin
for π β 1 to
ππππ‘ππ‘ππππ
2
do ππ β ππ βͺ MergeMway π2πβ1, π2π, π·πππππ πππ
ππππ‘ππ‘ππππ β
ππππ‘ππ‘ππππ
2
end
return π1
end
85. Borzsony, S., The Skyline Operator, In proc, IEEE Conf. on Data Engineering, page 421-430, Heidelberg, Germany, Apr. 2001.
Implementation: D&C Algorithm
1. D&C-basic
2. D&C-mpt
3. D&C-mptesk
π1,1 π2,1
π1,2 π2,2
π1,3
π2,3
π1,4 π2,4
π = 1, π = 1 π‘βππ πππππππ€ππ¦ π1,1 π2,1
Partition to be fitted into the
memory size
ππ’πππ‘πππ πΌ
ππ’πππ‘πππ πΌ1
ππ’πππ‘πππ πΌ2
ππ’πππ‘πππ πΌ3
for π β 1 to ππππ‘ππ‘ππππ do begin
for π β 1 to π do
if π < π then π2,π β πππππππ€ππ¦ π1,π, π2,π, π·πππππ πππ β 1
else π2,π β πππππππ€ππ¦ π1,π, π2,π, π·πππππ πππ
ππππππ(π , π2,π)
end
86. Borzsony, S., The Skyline Operator, In proc, IEEE Conf. on Data Engineering, page 421-430, Heidelberg, Germany, Apr. 2001.
Implementation: D&C Algorithm
1. D&C-basic
2. D&C-mpt
3. D&C-mptesk
π1,1 π2,1
π1,2 π2,2
π1,3
π2,3
π1,4 π2,4
π = 1, π = 1 π‘βππ πππππππ€ππ¦ π1,1 π2,1
π = 2, π = 1 π‘βππ πππππππ€ππ¦ π1,1 π2,2
ππ’πππ‘πππ πΌ
ππ’πππ‘πππ πΌ1
ππ’πππ‘πππ πΌ2
ππ’πππ‘πππ πΌ3
for π β 1 to ππππ‘ππ‘ππππ do begin
for π β 1 to π do
if π < π then π2,π β πππππππ€ππ¦ π1,π, π2,π, π·πππππ πππ β 1
else π2,π β πππππππ€ππ¦ π1,π, π2,π, π·πππππ πππ
ππππππ(π , π2,π)
end
87. Borzsony, S., The Skyline Operator, In proc, IEEE Conf. on Data Engineering, page 421-430, Heidelberg, Germany, Apr. 2001.
Implementation: D&C Algorithm
1. D&C-basic
2. D&C-mpt
3. D&C-mptesk
π1,1 π2,1
π1,2 π2,2
π1,3
π2,3
π1,4 π2,4
π = 1, π = 1 π‘βππ πππππππ€ππ¦ π1,1 π2,1
π = 2, π = 1 π‘βππ πππππππ€ππ¦ π1,1 π2,2
π = 2 π‘βππ πππππππ€ππ¦ π1,2 π2,2
ππ’πππ‘πππ πΌ
ππ’πππ‘πππ πΌ1
ππ’πππ‘πππ πΌ2
ππ’πππ‘πππ πΌ3
for π β 1 to ππππ‘ππ‘ππππ do begin
for π β 1 to π do
if π < π then π2,π β πππππππ€ππ¦ π1,π, π2,π, π·πππππ πππ β 1
else π2,π β πππππππ€ππ¦ π1,π, π2,π, π·πππππ πππ
ππππππ(π , π2,π)
end
88. Borzsony, S., The Skyline Operator, In proc, IEEE Conf. on Data Engineering, page 421-430, Heidelberg, Germany, Apr. 2001.
Implementation: D&C Algorithm
1. D&C-basic
2. D&C-mpt
3. D&C-mptesk
π1,1 π2,1
π1,2 π2,2
π1,3
π2,3
π1,4 π2,4
π = 1, π = 1 π‘βππ πππππππ€ππ¦ π1,1 π2,1
π = 2, π = 1 π‘βππ πππππππ€ππ¦ π1,1 π2,2
π = 2 π‘βππ πππππππ€ππ¦ π1,2 π2,2
π = 3, π = 1 π‘βππ πππππππ€ππ¦ π1,1 π2,3
ππ’πππ‘πππ πΌ
ππ’πππ‘πππ πΌ1
ππ’πππ‘πππ πΌ2
ππ’πππ‘πππ πΌ3
for π β 1 to ππππ‘ππ‘ππππ do begin
for π β 1 to π do
if π < π then π2,π β πππππππ€ππ¦ π1,π, π2,π, π·πππππ πππ β 1
else π2,π β πππππππ€ππ¦ π1,π, π2,π, π·πππππ πππ
ππππππ(π , π2,π)
end
89. Borzsony, S., The Skyline Operator, In proc, IEEE Conf. on Data Engineering, page 421-430, Heidelberg, Germany, Apr. 2001.
Implementation: D&C Algorithm
1. D&C-basic
2. D&C-mpt
3. D&C-mptesk
π1,1 π2,1
π1,2 π2,2
π1,3
π2,3
π1,4 π2,4
π = 1, π = 1 π‘βππ πππππππ€ππ¦ π1,1 π2,1
π = 2, π = 1 π‘βππ πππππππ€ππ¦ π1,1 π2,2
π = 2 π‘βππ πππππππ€ππ¦ π1,2 π2,2
π = 3, π = 1 π‘βππ πππππππ€ππ¦ π1,1 π2,3
π = 2 π‘βππ πππππππ€ππ¦ π1,2 π2,3
ππ’πππ‘πππ πΌ
ππ’πππ‘πππ πΌ1
ππ’πππ‘πππ πΌ2
ππ’πππ‘πππ πΌ3
for π β 1 to ππππ‘ππ‘ππππ do begin
for π β 1 to π do
if π < π then π2,π β πππππππ€ππ¦ π1,π, π2,π, π·πππππ πππ β 1
else π2,π β πππππππ€ππ¦ π1,π, π2,π, π·πππππ πππ
ππππππ(π , π2,π)
end
90. Borzsony, S., The Skyline Operator, In proc, IEEE Conf. on Data Engineering, page 421-430, Heidelberg, Germany, Apr. 2001.
Implementation: D&C Algorithm
1. D&C-basic
2. D&C-mpt
3. D&C-mptesk
π1,1 π2,1
π1,2 π2,2
π1,3
π2,3
π1,4 π2,4
π = 1, π = 1 π‘βππ πππππππ€ππ¦ π1,1 π2,1
π = 2, π = 1 π‘βππ πππππππ€ππ¦ π1,1 π2,2
π = 2 π‘βππ πππππππ€ππ¦ π1,2 π2,2
π = 3, π = 1 π‘βππ πππππππ€ππ¦ π1,1 π2,3
π = 2 π‘βππ πππππππ€ππ¦ π1,2 π2,3
π = 3 π‘βππ πππππππ€ππ¦ π1,3 π2,3
ππ’πππ‘πππ πΌ
ππ’πππ‘πππ πΌ1
ππ’πππ‘πππ πΌ2
ππ’πππ‘πππ πΌ3
for π β 1 to ππππ‘ππ‘ππππ do begin
for π β 1 to π do
if π < π then π2,π β πππππππ€ππ¦ π1,π, π2,π, π·πππππ πππ β 1
else π2,π β πππππππ€ππ¦ π1,π, π2,π, π·πππππ πππ
ππππππ(π , π2,π)
end
95. Borzsony, S., The Skyline Operator, In proc, IEEE Conf. on Data Engineering, page 421-430, Heidelberg, Germany, Apr. 2001.
Implementation: D&C Algorithm
1. D&C-basic
2. D&C-mpt
3. D&C-mptesk
To Propose Bushy Merge Tree
β’ To minimize different merge steps
β’ In the below figure the tuples of π1 are only involved in
log π merge steps (where π is the number of the
partitions)
96. Borzsony, S., The Skyline Operator, In proc, IEEE Conf. on Data Engineering, page 421-430, Heidelberg, Germany, Apr. 2001.
Implementation: D&C Algorithm
1. D&C-basic
2. D&C-mpt
3. D&C-mptesk
Early Skyline
At the first step of the M-way partitioning;
1. Load as many tuples as fit into the available main-
memory buffers.
2. Applying the basic divide-and-conquer algorithm in
order to immediately eliminate the tuples which are
dominated by others.
3. Partition the remaining tuples into π partitions.
97. Borzsony, S., The Skyline Operator, In proc, IEEE Conf. on Data Engineering, page 421-430, Heidelberg, Germany, Apr. 2001.
Implementation: D&C Algorithm
1. D&C-basic
2. D&C-mpt
3. D&C-mptesk
Early Skyline
β’ incurs additional CPU.
β’ saves I/O, because less tuples need to be written and
reread in the partitioning steps.
β’ is attractive if the Skyline is selective (i.e., if the Skyline
is small).
98. Borzsony, S., The Skyline Operator, In proc, IEEE Conf. on Data Engineering, page 421-430, Heidelberg, Germany, Apr. 2001.
Experiments and Results
Experiments Environment
β’ Processor: 333 MHz
β’ Main memory: 128 MB
β’ Operating system: Solaris 7
β’ Disk drive: 9GB Seagate with 7200 rpm and 512K disk cache
99. Borzsony, S., The Skyline Operator, In proc, IEEE Conf. on Data Engineering, page 421-430, Heidelberg, Germany, Apr. 2001.
Experiments and Results
Implemented C++ Algorithms
β’ Sort: Only for two-dimensional Skylines
β’ BNL-basic: the basic block-nested-loops algorithm
β’ BNL-sol: BNL and the window is organized as a self-organizing list
β’ BNL-solrep: BNL-sol and tuples in the window are replaced
β’ D&C-basic: basic divide-and-conquer algorithm
β’ D&C-mpt: D&C-basic with m-way partitioning
β’ D&C-mptesk: D&C-mpt and βEarly Skyllineβ
100. Borzsony, S., The Skyline Operator, In proc, IEEE Conf. on Data Engineering, page 421-430, Heidelberg, Germany, Apr. 2001.
Experiments and Results
Generated Database Condition
β’ Each benchmark database contains 100,000 tuples (10MB).
β’ The values of doubles of a tuple are generated randomly in [0,1).
101. Borzsony, S., The Skyline Operator, In proc, IEEE Conf. on Data Engineering, page 421-430, Heidelberg, Germany, Apr. 2001.
Experiments and Results
Three Generated Database
β’ indep: all attribute values are generated independently
β’ corr: all attribute values have correlation with each dimension
β’ anti: all attribute values have anti-correlation with each dimension
indep corr anti
102. Borzsony, S., The Skyline Operator, In proc, IEEE Conf. on Data Engineering, page 421-430, Heidelberg, Germany, Apr. 2001.
Experiments and Results
indep corr anti
103. Borzsony, S., The Skyline Operator, In proc, IEEE Conf. on Data Engineering, page 421-430, Heidelberg, Germany, Apr. 2001.
Experiments and Results
Skyline Sizes
104. Borzsony, S., The Skyline Operator, In proc, IEEE Conf. on Data Engineering, page 421-430, Heidelberg, Germany, Apr. 2001.
Experiments and Results
2-d Skylines running times (in seconds) and amount of disk I/O (in
MB)
β’ BNL is the winner. Because of
large enough memory, BNL
terminates after one iteration.
β’ βEarly Skylineβ is the winner
among D&C variants, because
after applying βEarly Skylineβ, the
partitions are very small and the
rest of the algorithm can be
completed very quickly.
105. Borzsony, S., The Skyline Operator, In proc, IEEE Conf. on Data Engineering, page 421-430, Heidelberg, Germany, Apr. 2001.
Experiments and Results
Multi-dimensional Skylines
winner at the corr
BNL is good up to 5-D
D&C-mpt and D&C-mptesk
outperform BNL after 5-D
106. Borzsony, S., The Skyline Operator, In proc, IEEE Conf. on Data Engineering, page 421-430, Heidelberg, Germany, Apr. 2001.
Experiments and Results
Multi-dimensional Skylines
At the anti, BEP is earlier than the corr.
Finally D&C outperforms BNL.
107. Borzsony, S., The Skyline Operator, In proc, IEEE Conf. on Data Engineering, page 421-430, Heidelberg, Germany, Apr. 2001.
Experiments and Results
Conclusion of the Experiments: BNL
β’ The BNL variants are good if the size of the Skyline is small.
β’ Performance of the BNLβs performance depends on the number of
dimension and correlation.
β’ BNL-sol is the winner among the BNL variants, but not great.
β’ Replacement is bad if the Skyline is very large. It incurs additional
overhead without benefits.
108. Borzsony, S., The Skyline Operator, In proc, IEEE Conf. on Data Engineering, page 421-430, Heidelberg, Germany, Apr. 2001.
Experiments and Results
Conclusion of the Experiments: D&C
β’ D&C variantsβ performance less depends on the number of
dimension and correlation than BNL.
β’ D&C-mptesk is winner among the D&C variants.