SlideShare a Scribd company logo
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
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
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
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.
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
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, … , 𝑥𝑗𝑛 >.
𝐼𝑓 𝑎𝑙𝑙 𝑥𝑖𝑘 𝑎𝑟𝑒 𝑏𝑒𝑡𝑡𝑒𝑟 𝑡ℎ𝑎𝑛 𝑎𝑛𝑑 𝑒𝑞𝑢𝑎𝑙 𝑡𝑜 𝑥𝑗𝑘,
𝑎𝑛𝑑 𝑎𝑡 𝑙𝑒𝑎𝑠𝑡 𝑜𝑛𝑒 𝑥𝑖𝑙 𝑖𝑠 𝑏𝑒𝑡𝑡𝑒𝑟 𝑡ℎ𝑎𝑛 𝑥𝑗𝑙,
ℎ𝑖 ≻ ℎ𝑗
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
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
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
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
 Tuple 𝑝 = (𝑝1, … , 𝑝 𝑘, 𝑝 𝑘+1, … , 𝑝𝑙, 𝑝𝑙+1, … , 𝑝 𝑚, 𝑝 𝑚+1, … , 𝑝 𝑛)dominates
tuple q = (𝑞1, … , 𝑞 𝑘, 𝑞 𝑘+1, … , 𝑞𝑙, 𝑞𝑙+1, … , 𝑞 𝑚, 𝑞 𝑚+1, … , 𝑞 𝑛)for a Skyline
query
SKYLINE OF 𝑑1MIN, …, 𝑑 𝑘MIN, 𝑑 𝑘+1MAX, …, 𝑑𝑙MAX, 𝑑𝑙+1DIFF, …, 𝑑 𝑚DIFF
if the following three conditions hold:
𝑝𝑖 ≤ 𝑞𝑖 𝑓𝑜𝑟 𝑎𝑙𝑙 𝑖 = 1, … , 𝑘
𝑝𝑖 ≥ 𝑞𝑖 𝑓𝑜𝑟 𝑎𝑙𝑙 𝑖 = 𝑘 + 1 , … , 𝑙
𝑝𝑖 = 𝑞𝑖 𝑓𝑜𝑟 𝑎𝑙𝑙 𝑖 = (𝑙 + 1), … , 𝑚
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 𝑟.
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
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
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
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.
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).
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
Borzsony, S., The Skyline Operator, In proc, IEEE Conf. on Data Engineering, page 421-430, Heidelberg, Germany, Apr. 2001.
 Definition the Skyline at 2-dimensional
𝐿𝑒𝑡 𝐴, 𝐵 𝑏𝑒 𝑣𝑒𝑐𝑡𝑜𝑟𝑠 𝑖𝑛 𝑅2,
𝑎𝑛𝑑 𝐴𝑖 =< 𝑥𝑖, 𝑦𝑖 >, 𝐵𝑗 =< 𝑥𝑗, 𝑦𝑗 > 𝑓𝑜𝑟 𝑎𝑙𝑙 𝑖, 𝑗.
𝐴 ∝ 𝐵 𝑤ℎ𝑒𝑛 𝑥𝑖 < 𝑥𝑗 𝑎𝑛𝑑 𝑦𝑖 ≤ 𝑦𝑗
𝑜𝑟 𝑥𝑖 ≤ 𝑥𝑗 𝑎𝑛𝑑 𝑦𝑖 < 𝑦𝑗
𝑜𝑟 𝑥𝑖 < 𝑥𝑗 𝑎𝑛𝑑 𝑦𝑖 < 𝑦𝑗.
Implementation: Two Dimensional
Borzsony, S., The Skyline Operator, In proc, IEEE Conf. on Data Engineering, page 421-430, Heidelberg, Germany, Apr. 2001.
i
j
k
dominate
no dominate
 To prove 2-dimensional Skyline Algorithm
𝑝𝑟𝑒𝑚𝑖𝑠𝑒 1: 𝑖 < 𝑘, ℎ𝑖 ∝ ℎ 𝑘.
𝑝𝑟𝑒𝑚𝑖𝑠𝑒 2: ℎ𝑖 ≻ ℎ𝑗.
𝑝𝑟𝑒𝑚𝑖𝑠𝑒 3: 𝑎 < 𝑏, 𝑓𝑜𝑟 𝑎𝑙𝑙 ℎ 𝑎, ℎ 𝑏, 𝑥 𝑎 < 𝑥 𝑏.
𝑝𝑟𝑜𝑝𝑜𝑠𝑖𝑡𝑖𝑜𝑛:
∀
𝑘 < 𝑗, ℎ 𝑘 ≻ ℎ𝑗.
Implementation: Two Dimensional
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
𝐿𝑒𝑡 𝑒𝑎𝑐ℎ 𝑣𝑒𝑐𝑡𝑜𝑟𝑠 𝑐𝑜𝑛𝑠𝑖𝑠𝑡 𝑜𝑓 𝑒𝑙𝑒𝑚𝑒𝑛𝑡𝑠 < 𝑥, 𝑦 >.
𝑆𝑖𝑚𝑖𝑙𝑎𝑟𝑙𝑦 𝑃𝑟𝑒𝑚𝑖𝑠𝑒 2, 𝑓𝑜𝑟 𝑎𝑙𝑙 ℎ𝑖, ℎ𝑗 → 𝑦𝑖 > 𝑦𝑗
∵ 2 − 𝐷 𝑆𝑘𝑦𝑙𝑖𝑛𝑒 𝑑𝑒𝑓𝑖𝑛𝑒𝑡𝑖𝑜𝑛 𝑎𝑛𝑑 𝑃𝑟𝑒𝑚𝑖𝑠𝑒 3 .
𝐿𝑒𝑡 𝑢𝑠 𝑐𝑎𝑙𝑙 𝑖𝑡 𝑖𝑠 𝑝𝑟𝑒𝑚𝑖𝑠𝑒 4.
Implementation: Two Dimensional
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
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)
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
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
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
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
…
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
…
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
…
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
…
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
…
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
…
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
…
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
…
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
…
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
…
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
…
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
…
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
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
…
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
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
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
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
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
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
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
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
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
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
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.
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
𝑚𝑒𝑑𝑖𝑎𝑛 𝑝
𝑚𝑒𝑑𝑖𝑎𝑛 𝑔
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
𝑚𝑒𝑑𝑖𝑎𝑛 𝑝
𝑚𝑒𝑑𝑖𝑎𝑛 𝑔
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
𝑚𝑒𝑑𝑖𝑎𝑛 𝑝
𝑚𝑒𝑑𝑖𝑎𝑛 𝑔
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
𝑚𝑒𝑑𝑖𝑎𝑛 𝑝
𝑚𝑒𝑑𝑖𝑎𝑛 𝑔
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.
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
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
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
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
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
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
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
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
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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
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
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
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
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
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
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
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
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
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
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
𝑗 = 4, 𝑖 = 1 𝑡ℎ𝑒𝑛 𝑀𝑒𝑟𝑔𝑒𝑀𝑤𝑎𝑦 𝑆1,1 𝑆2,4
𝑖 = 2 𝑡ℎ𝑒𝑛 𝑀𝑒𝑟𝑔𝑒𝑀𝑤𝑎𝑦 𝑆1,2 𝑆2,3
𝑖 = 3 𝑡ℎ𝑒𝑛 𝑀𝑒𝑟𝑔𝑒𝑀𝑤𝑎𝑦 𝑆1,3 𝑆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
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
𝑗 = 4, 𝑖 = 1 𝑡ℎ𝑒𝑛 𝑀𝑒𝑟𝑔𝑒𝑀𝑤𝑎𝑦 𝑆1,1 𝑆2,4
𝑖 = 2 𝑡ℎ𝑒𝑛 𝑀𝑒𝑟𝑔𝑒𝑀𝑤𝑎𝑦 𝑆1,2 𝑆2,4
𝑖 = 3 𝑡ℎ𝑒𝑛 𝑀𝑒𝑟𝑔𝑒𝑀𝑤𝑎𝑦 𝑆1,3 𝑆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
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
𝑗 = 4, 𝑖 = 1 𝑡ℎ𝑒𝑛 𝑀𝑒𝑟𝑔𝑒𝑀𝑤𝑎𝑦 𝑆1,1 𝑆2,4
𝑖 = 2 𝑡ℎ𝑒𝑛 𝑀𝑒𝑟𝑔𝑒𝑀𝑤𝑎𝑦 𝑆1,2 𝑆2,4
𝑖 = 3 𝑡ℎ𝑒𝑛 𝑀𝑒𝑟𝑔𝑒𝑀𝑤𝑎𝑦 𝑆1,3 𝑆2,4
𝑖 = 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
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
𝑗 = 4, 𝑖 = 1 𝑡ℎ𝑒𝑛 𝑀𝑒𝑟𝑔𝑒𝑀𝑤𝑎𝑦 𝑆1,1 𝑆2,4
𝑖 = 2 𝑡ℎ𝑒𝑛 𝑀𝑒𝑟𝑔𝑒𝑀𝑤𝑎𝑦 𝑆1,2 𝑆2,4
𝑖 = 3 𝑡ℎ𝑒𝑛 𝑀𝑒𝑟𝑔𝑒𝑀𝑤𝑎𝑦 𝑆1,3 𝑆2,4
𝑖 = 3 𝑡ℎ𝑒𝑛 𝑀𝑒𝑟𝑔𝑒𝑀𝑤𝑎𝑦 𝑆1,4 𝑆2,4
𝑞𝑢𝑎𝑛𝑡𝑖𝑙𝑒 𝛼
𝑞𝑢𝑎𝑛𝑡𝑖𝑙𝑒 𝛼1
𝑞𝑢𝑎𝑛𝑡𝑖𝑙𝑒 𝛼2
𝑞𝑢𝑎𝑛𝑡𝑖𝑙𝑒 𝛼3
for 𝑗 ≔ 1 to 𝑃𝑎𝑟𝑡𝑖𝑡𝑖𝑜𝑛𝑠 do begin
for 𝑖 ≔ 1 to 𝑗 do
if 𝑖 < 𝑗 then 𝑆2,𝑗 ≔ 𝑀𝑒𝑟𝑔𝑒𝑀𝑤𝑎𝑦 𝑆1,𝑖, 𝑆2,𝑗, 𝐷𝑖𝑚𝑒𝑛𝑠𝑖𝑜𝑛 − 1
else 𝑆2,𝑗 ≔ 𝑀𝑒𝑟𝑔𝑒𝑀𝑤𝑎𝑦 𝑆1,𝑖, 𝑆2,𝑗, 𝐷𝑖𝑚𝑒𝑛𝑠𝑖𝑜𝑛
𝑎𝑝𝑝𝑒𝑛𝑑(𝑅, 𝑆2,𝑗)
end
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)
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.
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).
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
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”
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).
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
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
Borzsony, S., The Skyline Operator, In proc, IEEE Conf. on Data Engineering, page 421-430, Heidelberg, Germany, Apr. 2001.
Experiments and Results
Skyline Sizes
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.
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
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.
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.
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.
Thank you for listening

More Related Content

What's hot

12 mf3im15
12 mf3im1512 mf3im15
12 mf3im15
Sumit Kumar
 
(slides 3) Visual Computing: Geometry, Graphics, and Vision
(slides 3)  Visual Computing: Geometry, Graphics, and Vision(slides 3)  Visual Computing: Geometry, Graphics, and Vision
(slides 3) Visual Computing: Geometry, Graphics, and Vision
Frank Nielsen
 
S6 l04 analytical and numerical methods of structural analysis
S6 l04 analytical and numerical methods of structural analysisS6 l04 analytical and numerical methods of structural analysis
S6 l04 analytical and numerical methods of structural analysis
Shaikh Mohsin
 
Finding Maximum Edge Biclique in Bipartite Networks by Integer Programming
Finding Maximum Edge Biclique in Bipartite Networks by Integer ProgrammingFinding Maximum Edge Biclique in Bipartite Networks by Integer Programming
Finding Maximum Edge Biclique in Bipartite Networks by Integer Programming
Melih Sözdinler
 
System architecture
System architectureSystem architecture
System architecture
Sanjay Raj
 
DESIGN OF SIMULATION DIFFERENT 8-BIT MULTIPLIERS USING VERILOG CODE BY SAIKIR...
DESIGN OF SIMULATION DIFFERENT 8-BIT MULTIPLIERS USING VERILOG CODE BY SAIKIR...DESIGN OF SIMULATION DIFFERENT 8-BIT MULTIPLIERS USING VERILOG CODE BY SAIKIR...
DESIGN OF SIMULATION DIFFERENT 8-BIT MULTIPLIERS USING VERILOG CODE BY SAIKIR...
Saikiran perfect
 
Mathematical Analysis of Half Volume DRA with Performance Evaluation for High...
Mathematical Analysis of Half Volume DRA with Performance Evaluation for High...Mathematical Analysis of Half Volume DRA with Performance Evaluation for High...
Mathematical Analysis of Half Volume DRA with Performance Evaluation for High...
rahulmonikasharma
 

What's hot (8)

12 mf3im15
12 mf3im1512 mf3im15
12 mf3im15
 
(slides 3) Visual Computing: Geometry, Graphics, and Vision
(slides 3)  Visual Computing: Geometry, Graphics, and Vision(slides 3)  Visual Computing: Geometry, Graphics, and Vision
(slides 3) Visual Computing: Geometry, Graphics, and Vision
 
post119s1-file3
post119s1-file3post119s1-file3
post119s1-file3
 
S6 l04 analytical and numerical methods of structural analysis
S6 l04 analytical and numerical methods of structural analysisS6 l04 analytical and numerical methods of structural analysis
S6 l04 analytical and numerical methods of structural analysis
 
Finding Maximum Edge Biclique in Bipartite Networks by Integer Programming
Finding Maximum Edge Biclique in Bipartite Networks by Integer ProgrammingFinding Maximum Edge Biclique in Bipartite Networks by Integer Programming
Finding Maximum Edge Biclique in Bipartite Networks by Integer Programming
 
System architecture
System architectureSystem architecture
System architecture
 
DESIGN OF SIMULATION DIFFERENT 8-BIT MULTIPLIERS USING VERILOG CODE BY SAIKIR...
DESIGN OF SIMULATION DIFFERENT 8-BIT MULTIPLIERS USING VERILOG CODE BY SAIKIR...DESIGN OF SIMULATION DIFFERENT 8-BIT MULTIPLIERS USING VERILOG CODE BY SAIKIR...
DESIGN OF SIMULATION DIFFERENT 8-BIT MULTIPLIERS USING VERILOG CODE BY SAIKIR...
 
Mathematical Analysis of Half Volume DRA with Performance Evaluation for High...
Mathematical Analysis of Half Volume DRA with Performance Evaluation for High...Mathematical Analysis of Half Volume DRA with Performance Evaluation for High...
Mathematical Analysis of Half Volume DRA with Performance Evaluation for High...
 

Viewers also liked

Region filling and object removal by exemplar based image inpainting
Region filling and object removal by exemplar based image inpaintingRegion filling and object removal by exemplar based image inpainting
Region filling and object removal by exemplar based image inpainting
Woonghee Lee
 
인공 신경망 구현에 관한 간단한 설명
인공 신경망 구현에 관한 간단한 설명인공 신경망 구현에 관한 간단한 설명
인공 신경망 구현에 관한 간단한 설명
Woonghee Lee
 
Real Escape in Korea proposal completed version.
Real Escape in Korea proposal completed version.Real Escape in Korea proposal completed version.
Real Escape in Korea proposal completed version.
Woonghee Lee
 
문자 단위의 Neural Machine Translation
문자 단위의 Neural Machine Translation문자 단위의 Neural Machine Translation
문자 단위의 Neural Machine Translation
NAVER LABS
 
Convolution codes and turbo codes
Convolution codes and turbo codesConvolution codes and turbo codes
Convolution codes and turbo codesManish Srivastava
 
[224] backend 개발자의 neural machine translation 개발기 김상경
[224] backend 개발자의 neural machine translation 개발기 김상경[224] backend 개발자의 neural machine translation 개발기 김상경
[224] backend 개발자의 neural machine translation 개발기 김상경
NAVER D2
 
[216]딥러닝예제로보는개발자를위한통계 최재걸
[216]딥러닝예제로보는개발자를위한통계 최재걸[216]딥러닝예제로보는개발자를위한통계 최재걸
[216]딥러닝예제로보는개발자를위한통계 최재걸
NAVER D2
 
Qr code ppt
Qr code pptQr code ppt
Qr code ppt
mrudula14
 
[2A4]DeepLearningAtNAVER
[2A4]DeepLearningAtNAVER[2A4]DeepLearningAtNAVER
[2A4]DeepLearningAtNAVER
NAVER D2
 
Deview deep learning-김정희
Deview deep learning-김정희Deview deep learning-김정희
Deview deep learning-김정희NAVER D2
 

Viewers also liked (11)

Region filling and object removal by exemplar based image inpainting
Region filling and object removal by exemplar based image inpaintingRegion filling and object removal by exemplar based image inpainting
Region filling and object removal by exemplar based image inpainting
 
인공 신경망 구현에 관한 간단한 설명
인공 신경망 구현에 관한 간단한 설명인공 신경망 구현에 관한 간단한 설명
인공 신경망 구현에 관한 간단한 설명
 
Real Escape in Korea proposal completed version.
Real Escape in Korea proposal completed version.Real Escape in Korea proposal completed version.
Real Escape in Korea proposal completed version.
 
문자 단위의 Neural Machine Translation
문자 단위의 Neural Machine Translation문자 단위의 Neural Machine Translation
문자 단위의 Neural Machine Translation
 
Convolution codes and turbo codes
Convolution codes and turbo codesConvolution codes and turbo codes
Convolution codes and turbo codes
 
[224] backend 개발자의 neural machine translation 개발기 김상경
[224] backend 개발자의 neural machine translation 개발기 김상경[224] backend 개발자의 neural machine translation 개발기 김상경
[224] backend 개발자의 neural machine translation 개발기 김상경
 
[216]딥러닝예제로보는개발자를위한통계 최재걸
[216]딥러닝예제로보는개발자를위한통계 최재걸[216]딥러닝예제로보는개발자를위한통계 최재걸
[216]딥러닝예제로보는개발자를위한통계 최재걸
 
Qr code ppt
Qr code pptQr code ppt
Qr code ppt
 
[2A4]DeepLearningAtNAVER
[2A4]DeepLearningAtNAVER[2A4]DeepLearningAtNAVER
[2A4]DeepLearningAtNAVER
 
Deview deep learning-김정희
Deview deep learning-김정희Deview deep learning-김정희
Deview deep learning-김정희
 
Turbo codes.ppt
Turbo codes.pptTurbo codes.ppt
Turbo codes.ppt
 

Similar to The skyline operator lee, woonghee

Research Sruti
Research SrutiResearch Sruti
Research Sruti
srutin
 
Design of high speed adders for efficient digital design blocks
Design of high speed adders for efficient digital design blocksDesign of high speed adders for efficient digital design blocks
Design of high speed adders for efficient digital design blocksBharath Chary
 
Compressing Graphs and Indexes with Recursive Graph Bisection
Compressing Graphs and Indexes with Recursive Graph Bisection Compressing Graphs and Indexes with Recursive Graph Bisection
Compressing Graphs and Indexes with Recursive Graph Bisection
aftab alam
 
PointNet
PointNetPointNet
E132833
E132833E132833
E132833
irjes
 
Curve Fitting - Linear Algebra
Curve Fitting - Linear AlgebraCurve Fitting - Linear Algebra
Curve Fitting - Linear Algebra
Gowtham Cr
 
Analysis and Design of Mid-Rise Building_2023.docx
Analysis and Design of Mid-Rise Building_2023.docxAnalysis and Design of Mid-Rise Building_2023.docx
Analysis and Design of Mid-Rise Building_2023.docx
Adnan Lazem
 
High –Speed Implementation of Design and Analysis by Using Parallel Prefix Ad...
High –Speed Implementation of Design and Analysis by Using Parallel Prefix Ad...High –Speed Implementation of Design and Analysis by Using Parallel Prefix Ad...
High –Speed Implementation of Design and Analysis by Using Parallel Prefix Ad...
IOSRJECE
 
Ds36715716
Ds36715716Ds36715716
Ds36715716
IJERA Editor
 
Architecture Design for Deep Neural Networks I
Architecture Design for Deep Neural Networks IArchitecture Design for Deep Neural Networks I
Architecture Design for Deep Neural Networks I
Wanjin Yu
 
Petrel - Auto Merge 2D Seismic Interpretation.pdf
Petrel - Auto Merge 2D Seismic Interpretation.pdfPetrel - Auto Merge 2D Seismic Interpretation.pdf
Petrel - Auto Merge 2D Seismic Interpretation.pdf
MiguelGuzman99772
 
Energy efficient reverse skyline query processing over wireless sensor networks
Energy efficient reverse skyline query processing over wireless sensor networksEnergy efficient reverse skyline query processing over wireless sensor networks
Energy efficient reverse skyline query processing over wireless sensor networks
Finalyear Projects
 
Inspirational applications of deep learning
Inspirational applications of deep learningInspirational applications of deep learning
Inspirational applications of deep learning
ssh1
 
1st Place in EY Data Science Challenge
1st Place in EY Data Science Challenge 1st Place in EY Data Science Challenge
1st Place in EY Data Science Challenge
Hyunju Shim
 
Winner of EY NextWave Data Science Challenge 2019
Winner of EY NextWave Data Science Challenge 2019Winner of EY NextWave Data Science Challenge 2019
Winner of EY NextWave Data Science Challenge 2019
ByungEunJeon
 
Finite Element Analysis
Finite Element Analysis Finite Element Analysis
Finite Element Analysis
Yousef Abujubba
 
duoliu-resume-Oct7
duoliu-resume-Oct7duoliu-resume-Oct7
duoliu-resume-Oct7Duo Liu
 
Convolutional Deep Belief Networks for Scalable Unsupervised Learning of Hier...
Convolutional Deep Belief Networks for Scalable Unsupervised Learning of Hier...Convolutional Deep Belief Networks for Scalable Unsupervised Learning of Hier...
Convolutional Deep Belief Networks for Scalable Unsupervised Learning of Hier...
Mad Scientists
 
IEEE 2014 JAVA DATA MINING PROJECTS Mining weakly labeled web facial images f...
IEEE 2014 JAVA DATA MINING PROJECTS Mining weakly labeled web facial images f...IEEE 2014 JAVA DATA MINING PROJECTS Mining weakly labeled web facial images f...
IEEE 2014 JAVA DATA MINING PROJECTS Mining weakly labeled web facial images f...
IEEEFINALYEARSTUDENTPROJECTS
 

Similar to The skyline operator lee, woonghee (20)

Research Sruti
Research SrutiResearch Sruti
Research Sruti
 
Design of high speed adders for efficient digital design blocks
Design of high speed adders for efficient digital design blocksDesign of high speed adders for efficient digital design blocks
Design of high speed adders for efficient digital design blocks
 
Compressing Graphs and Indexes with Recursive Graph Bisection
Compressing Graphs and Indexes with Recursive Graph Bisection Compressing Graphs and Indexes with Recursive Graph Bisection
Compressing Graphs and Indexes with Recursive Graph Bisection
 
PointNet
PointNetPointNet
PointNet
 
E132833
E132833E132833
E132833
 
Curve Fitting - Linear Algebra
Curve Fitting - Linear AlgebraCurve Fitting - Linear Algebra
Curve Fitting - Linear Algebra
 
Analysis and Design of Mid-Rise Building_2023.docx
Analysis and Design of Mid-Rise Building_2023.docxAnalysis and Design of Mid-Rise Building_2023.docx
Analysis and Design of Mid-Rise Building_2023.docx
 
High –Speed Implementation of Design and Analysis by Using Parallel Prefix Ad...
High –Speed Implementation of Design and Analysis by Using Parallel Prefix Ad...High –Speed Implementation of Design and Analysis by Using Parallel Prefix Ad...
High –Speed Implementation of Design and Analysis by Using Parallel Prefix Ad...
 
Ds36715716
Ds36715716Ds36715716
Ds36715716
 
Architecture Design for Deep Neural Networks I
Architecture Design for Deep Neural Networks IArchitecture Design for Deep Neural Networks I
Architecture Design for Deep Neural Networks I
 
Petrel - Auto Merge 2D Seismic Interpretation.pdf
Petrel - Auto Merge 2D Seismic Interpretation.pdfPetrel - Auto Merge 2D Seismic Interpretation.pdf
Petrel - Auto Merge 2D Seismic Interpretation.pdf
 
Energy efficient reverse skyline query processing over wireless sensor networks
Energy efficient reverse skyline query processing over wireless sensor networksEnergy efficient reverse skyline query processing over wireless sensor networks
Energy efficient reverse skyline query processing over wireless sensor networks
 
Inspirational applications of deep learning
Inspirational applications of deep learningInspirational applications of deep learning
Inspirational applications of deep learning
 
1st Place in EY Data Science Challenge
1st Place in EY Data Science Challenge 1st Place in EY Data Science Challenge
1st Place in EY Data Science Challenge
 
Winner of EY NextWave Data Science Challenge 2019
Winner of EY NextWave Data Science Challenge 2019Winner of EY NextWave Data Science Challenge 2019
Winner of EY NextWave Data Science Challenge 2019
 
Finite Element Analysis
Finite Element Analysis Finite Element Analysis
Finite Element Analysis
 
duoliu-resume-Oct7
duoliu-resume-Oct7duoliu-resume-Oct7
duoliu-resume-Oct7
 
Convolutional Deep Belief Networks for Scalable Unsupervised Learning of Hier...
Convolutional Deep Belief Networks for Scalable Unsupervised Learning of Hier...Convolutional Deep Belief Networks for Scalable Unsupervised Learning of Hier...
Convolutional Deep Belief Networks for Scalable Unsupervised Learning of Hier...
 
res1
res1res1
res1
 
IEEE 2014 JAVA DATA MINING PROJECTS Mining weakly labeled web facial images f...
IEEE 2014 JAVA DATA MINING PROJECTS Mining weakly labeled web facial images f...IEEE 2014 JAVA DATA MINING PROJECTS Mining weakly labeled web facial images f...
IEEE 2014 JAVA DATA MINING PROJECTS Mining weakly labeled web facial images f...
 

Recently uploaded

Ch03-Managing the Object-Oriented Information Systems Project a.pdf
Ch03-Managing the Object-Oriented Information Systems Project a.pdfCh03-Managing the Object-Oriented Information Systems Project a.pdf
Ch03-Managing the Object-Oriented Information Systems Project a.pdf
haila53
 
哪里卖(usq毕业证书)南昆士兰大学毕业证研究生文凭证书托福证书原版一模一样
哪里卖(usq毕业证书)南昆士兰大学毕业证研究生文凭证书托福证书原版一模一样哪里卖(usq毕业证书)南昆士兰大学毕业证研究生文凭证书托福证书原版一模一样
哪里卖(usq毕业证书)南昆士兰大学毕业证研究生文凭证书托福证书原版一模一样
axoqas
 
Malana- Gimlet Market Analysis (Portfolio 2)
Malana- Gimlet Market Analysis (Portfolio 2)Malana- Gimlet Market Analysis (Portfolio 2)
Malana- Gimlet Market Analysis (Portfolio 2)
TravisMalana
 
Nanandann Nilekani's ppt On India's .pdf
Nanandann Nilekani's ppt On India's .pdfNanandann Nilekani's ppt On India's .pdf
Nanandann Nilekani's ppt On India's .pdf
eddie19851
 
Algorithmic optimizations for Dynamic Levelwise PageRank (from STICD) : SHORT...
Algorithmic optimizations for Dynamic Levelwise PageRank (from STICD) : SHORT...Algorithmic optimizations for Dynamic Levelwise PageRank (from STICD) : SHORT...
Algorithmic optimizations for Dynamic Levelwise PageRank (from STICD) : SHORT...
Subhajit Sahu
 
做(mqu毕业证书)麦考瑞大学毕业证硕士文凭证书学费发票原版一模一样
做(mqu毕业证书)麦考瑞大学毕业证硕士文凭证书学费发票原版一模一样做(mqu毕业证书)麦考瑞大学毕业证硕士文凭证书学费发票原版一模一样
做(mqu毕业证书)麦考瑞大学毕业证硕士文凭证书学费发票原版一模一样
axoqas
 
Adjusting OpenMP PageRank : SHORT REPORT / NOTES
Adjusting OpenMP PageRank : SHORT REPORT / NOTESAdjusting OpenMP PageRank : SHORT REPORT / NOTES
Adjusting OpenMP PageRank : SHORT REPORT / NOTES
Subhajit Sahu
 
Learn SQL from basic queries to Advance queries
Learn SQL from basic queries to Advance queriesLearn SQL from basic queries to Advance queries
Learn SQL from basic queries to Advance queries
manishkhaire30
 
一比一原版(CBU毕业证)卡普顿大学毕业证如何办理
一比一原版(CBU毕业证)卡普顿大学毕业证如何办理一比一原版(CBU毕业证)卡普顿大学毕业证如何办理
一比一原版(CBU毕业证)卡普顿大学毕业证如何办理
ahzuo
 
Chatty Kathy - UNC Bootcamp Final Project Presentation - Final Version - 5.23...
Chatty Kathy - UNC Bootcamp Final Project Presentation - Final Version - 5.23...Chatty Kathy - UNC Bootcamp Final Project Presentation - Final Version - 5.23...
Chatty Kathy - UNC Bootcamp Final Project Presentation - Final Version - 5.23...
John Andrews
 
原版制作(Deakin毕业证书)迪肯大学毕业证学位证一模一样
原版制作(Deakin毕业证书)迪肯大学毕业证学位证一模一样原版制作(Deakin毕业证书)迪肯大学毕业证学位证一模一样
原版制作(Deakin毕业证书)迪肯大学毕业证学位证一模一样
u86oixdj
 
Analysis insight about a Flyball dog competition team's performance
Analysis insight about a Flyball dog competition team's performanceAnalysis insight about a Flyball dog competition team's performance
Analysis insight about a Flyball dog competition team's performance
roli9797
 
STATATHON: Unleashing the Power of Statistics in a 48-Hour Knowledge Extravag...
STATATHON: Unleashing the Power of Statistics in a 48-Hour Knowledge Extravag...STATATHON: Unleashing the Power of Statistics in a 48-Hour Knowledge Extravag...
STATATHON: Unleashing the Power of Statistics in a 48-Hour Knowledge Extravag...
sameer shah
 
一比一原版(爱大毕业证书)爱丁堡大学毕业证如何办理
一比一原版(爱大毕业证书)爱丁堡大学毕业证如何办理一比一原版(爱大毕业证书)爱丁堡大学毕业证如何办理
一比一原版(爱大毕业证书)爱丁堡大学毕业证如何办理
g4dpvqap0
 
Data_and_Analytics_Essentials_Architect_an_Analytics_Platform.pptx
Data_and_Analytics_Essentials_Architect_an_Analytics_Platform.pptxData_and_Analytics_Essentials_Architect_an_Analytics_Platform.pptx
Data_and_Analytics_Essentials_Architect_an_Analytics_Platform.pptx
AnirbanRoy608946
 
原版制作(swinburne毕业证书)斯威本科技大学毕业证毕业完成信一模一样
原版制作(swinburne毕业证书)斯威本科技大学毕业证毕业完成信一模一样原版制作(swinburne毕业证书)斯威本科技大学毕业证毕业完成信一模一样
原版制作(swinburne毕业证书)斯威本科技大学毕业证毕业完成信一模一样
u86oixdj
 
一比一原版(UniSA毕业证书)南澳大学毕业证如何办理
一比一原版(UniSA毕业证书)南澳大学毕业证如何办理一比一原版(UniSA毕业证书)南澳大学毕业证如何办理
一比一原版(UniSA毕业证书)南澳大学毕业证如何办理
slg6lamcq
 
一比一原版(UofS毕业证书)萨省大学毕业证如何办理
一比一原版(UofS毕业证书)萨省大学毕业证如何办理一比一原版(UofS毕业证书)萨省大学毕业证如何办理
一比一原版(UofS毕业证书)萨省大学毕业证如何办理
v3tuleee
 
一比一原版(UIUC毕业证)伊利诺伊大学|厄巴纳-香槟分校毕业证如何办理
一比一原版(UIUC毕业证)伊利诺伊大学|厄巴纳-香槟分校毕业证如何办理一比一原版(UIUC毕业证)伊利诺伊大学|厄巴纳-香槟分校毕业证如何办理
一比一原版(UIUC毕业证)伊利诺伊大学|厄巴纳-香槟分校毕业证如何办理
ahzuo
 
06-04-2024 - NYC Tech Week - Discussion on Vector Databases, Unstructured Dat...
06-04-2024 - NYC Tech Week - Discussion on Vector Databases, Unstructured Dat...06-04-2024 - NYC Tech Week - Discussion on Vector Databases, Unstructured Dat...
06-04-2024 - NYC Tech Week - Discussion on Vector Databases, Unstructured Dat...
Timothy Spann
 

Recently uploaded (20)

Ch03-Managing the Object-Oriented Information Systems Project a.pdf
Ch03-Managing the Object-Oriented Information Systems Project a.pdfCh03-Managing the Object-Oriented Information Systems Project a.pdf
Ch03-Managing the Object-Oriented Information Systems Project a.pdf
 
哪里卖(usq毕业证书)南昆士兰大学毕业证研究生文凭证书托福证书原版一模一样
哪里卖(usq毕业证书)南昆士兰大学毕业证研究生文凭证书托福证书原版一模一样哪里卖(usq毕业证书)南昆士兰大学毕业证研究生文凭证书托福证书原版一模一样
哪里卖(usq毕业证书)南昆士兰大学毕业证研究生文凭证书托福证书原版一模一样
 
Malana- Gimlet Market Analysis (Portfolio 2)
Malana- Gimlet Market Analysis (Portfolio 2)Malana- Gimlet Market Analysis (Portfolio 2)
Malana- Gimlet Market Analysis (Portfolio 2)
 
Nanandann Nilekani's ppt On India's .pdf
Nanandann Nilekani's ppt On India's .pdfNanandann Nilekani's ppt On India's .pdf
Nanandann Nilekani's ppt On India's .pdf
 
Algorithmic optimizations for Dynamic Levelwise PageRank (from STICD) : SHORT...
Algorithmic optimizations for Dynamic Levelwise PageRank (from STICD) : SHORT...Algorithmic optimizations for Dynamic Levelwise PageRank (from STICD) : SHORT...
Algorithmic optimizations for Dynamic Levelwise PageRank (from STICD) : SHORT...
 
做(mqu毕业证书)麦考瑞大学毕业证硕士文凭证书学费发票原版一模一样
做(mqu毕业证书)麦考瑞大学毕业证硕士文凭证书学费发票原版一模一样做(mqu毕业证书)麦考瑞大学毕业证硕士文凭证书学费发票原版一模一样
做(mqu毕业证书)麦考瑞大学毕业证硕士文凭证书学费发票原版一模一样
 
Adjusting OpenMP PageRank : SHORT REPORT / NOTES
Adjusting OpenMP PageRank : SHORT REPORT / NOTESAdjusting OpenMP PageRank : SHORT REPORT / NOTES
Adjusting OpenMP PageRank : SHORT REPORT / NOTES
 
Learn SQL from basic queries to Advance queries
Learn SQL from basic queries to Advance queriesLearn SQL from basic queries to Advance queries
Learn SQL from basic queries to Advance queries
 
一比一原版(CBU毕业证)卡普顿大学毕业证如何办理
一比一原版(CBU毕业证)卡普顿大学毕业证如何办理一比一原版(CBU毕业证)卡普顿大学毕业证如何办理
一比一原版(CBU毕业证)卡普顿大学毕业证如何办理
 
Chatty Kathy - UNC Bootcamp Final Project Presentation - Final Version - 5.23...
Chatty Kathy - UNC Bootcamp Final Project Presentation - Final Version - 5.23...Chatty Kathy - UNC Bootcamp Final Project Presentation - Final Version - 5.23...
Chatty Kathy - UNC Bootcamp Final Project Presentation - Final Version - 5.23...
 
原版制作(Deakin毕业证书)迪肯大学毕业证学位证一模一样
原版制作(Deakin毕业证书)迪肯大学毕业证学位证一模一样原版制作(Deakin毕业证书)迪肯大学毕业证学位证一模一样
原版制作(Deakin毕业证书)迪肯大学毕业证学位证一模一样
 
Analysis insight about a Flyball dog competition team's performance
Analysis insight about a Flyball dog competition team's performanceAnalysis insight about a Flyball dog competition team's performance
Analysis insight about a Flyball dog competition team's performance
 
STATATHON: Unleashing the Power of Statistics in a 48-Hour Knowledge Extravag...
STATATHON: Unleashing the Power of Statistics in a 48-Hour Knowledge Extravag...STATATHON: Unleashing the Power of Statistics in a 48-Hour Knowledge Extravag...
STATATHON: Unleashing the Power of Statistics in a 48-Hour Knowledge Extravag...
 
一比一原版(爱大毕业证书)爱丁堡大学毕业证如何办理
一比一原版(爱大毕业证书)爱丁堡大学毕业证如何办理一比一原版(爱大毕业证书)爱丁堡大学毕业证如何办理
一比一原版(爱大毕业证书)爱丁堡大学毕业证如何办理
 
Data_and_Analytics_Essentials_Architect_an_Analytics_Platform.pptx
Data_and_Analytics_Essentials_Architect_an_Analytics_Platform.pptxData_and_Analytics_Essentials_Architect_an_Analytics_Platform.pptx
Data_and_Analytics_Essentials_Architect_an_Analytics_Platform.pptx
 
原版制作(swinburne毕业证书)斯威本科技大学毕业证毕业完成信一模一样
原版制作(swinburne毕业证书)斯威本科技大学毕业证毕业完成信一模一样原版制作(swinburne毕业证书)斯威本科技大学毕业证毕业完成信一模一样
原版制作(swinburne毕业证书)斯威本科技大学毕业证毕业完成信一模一样
 
一比一原版(UniSA毕业证书)南澳大学毕业证如何办理
一比一原版(UniSA毕业证书)南澳大学毕业证如何办理一比一原版(UniSA毕业证书)南澳大学毕业证如何办理
一比一原版(UniSA毕业证书)南澳大学毕业证如何办理
 
一比一原版(UofS毕业证书)萨省大学毕业证如何办理
一比一原版(UofS毕业证书)萨省大学毕业证如何办理一比一原版(UofS毕业证书)萨省大学毕业证如何办理
一比一原版(UofS毕业证书)萨省大学毕业证如何办理
 
一比一原版(UIUC毕业证)伊利诺伊大学|厄巴纳-香槟分校毕业证如何办理
一比一原版(UIUC毕业证)伊利诺伊大学|厄巴纳-香槟分校毕业证如何办理一比一原版(UIUC毕业证)伊利诺伊大学|厄巴纳-香槟分校毕业证如何办理
一比一原版(UIUC毕业证)伊利诺伊大学|厄巴纳-香槟分校毕业证如何办理
 
06-04-2024 - NYC Tech Week - Discussion on Vector Databases, Unstructured Dat...
06-04-2024 - NYC Tech Week - Discussion on Vector Databases, Unstructured Dat...06-04-2024 - NYC Tech Week - Discussion on Vector Databases, Unstructured Dat...
06-04-2024 - NYC Tech Week - Discussion on Vector Databases, Unstructured Dat...
 

The skyline operator lee, woonghee

  • 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
  • 10. 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  Tuple 𝑝 = (𝑝1, … , 𝑝 𝑘, 𝑝 𝑘+1, … , 𝑝𝑙, 𝑝𝑙+1, … , 𝑝 𝑚, 𝑝 𝑚+1, … , 𝑝 𝑛)dominates tuple q = (𝑞1, … , 𝑞 𝑘, 𝑞 𝑘+1, … , 𝑞𝑙, 𝑞𝑙+1, … , 𝑞 𝑚, 𝑞 𝑚+1, … , 𝑞 𝑛)for a Skyline query SKYLINE OF 𝑑1MIN, …, 𝑑 𝑘MIN, 𝑑 𝑘+1MAX, …, 𝑑𝑙MAX, 𝑑𝑙+1DIFF, …, 𝑑 𝑚DIFF if the following three conditions hold: 𝑝𝑖 ≤ 𝑞𝑖 𝑓𝑜𝑟 𝑎𝑙𝑙 𝑖 = 1, … , 𝑘 𝑝𝑖 ≥ 𝑞𝑖 𝑓𝑜𝑟 𝑎𝑙𝑙 𝑖 = 𝑘 + 1 , … , 𝑙 𝑝𝑖 = 𝑞𝑖 𝑓𝑜𝑟 𝑎𝑙𝑙 𝑖 = (𝑙 + 1), … , 𝑚
  • 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
  • 18. Borzsony, S., The Skyline Operator, In proc, IEEE Conf. on Data Engineering, page 421-430, Heidelberg, Germany, Apr. 2001.  Definition the Skyline at 2-dimensional 𝐿𝑒𝑡 𝐴, 𝐵 𝑏𝑒 𝑣𝑒𝑐𝑡𝑜𝑟𝑠 𝑖𝑛 𝑅2, 𝑎𝑛𝑑 𝐴𝑖 =< 𝑥𝑖, 𝑦𝑖 >, 𝐵𝑗 =< 𝑥𝑗, 𝑦𝑗 > 𝑓𝑜𝑟 𝑎𝑙𝑙 𝑖, 𝑗. 𝐴 ∝ 𝐵 𝑤ℎ𝑒𝑛 𝑥𝑖 < 𝑥𝑗 𝑎𝑛𝑑 𝑦𝑖 ≤ 𝑦𝑗 𝑜𝑟 𝑥𝑖 ≤ 𝑥𝑗 𝑎𝑛𝑑 𝑦𝑖 < 𝑦𝑗 𝑜𝑟 𝑥𝑖 < 𝑥𝑗 𝑎𝑛𝑑 𝑦𝑖 < 𝑦𝑗. Implementation: Two Dimensional
  • 19. Borzsony, S., The Skyline Operator, In proc, IEEE Conf. on Data Engineering, page 421-430, Heidelberg, Germany, Apr. 2001. i j k dominate no dominate  To prove 2-dimensional Skyline Algorithm 𝑝𝑟𝑒𝑚𝑖𝑠𝑒 1: 𝑖 < 𝑘, ℎ𝑖 ∝ ℎ 𝑘. 𝑝𝑟𝑒𝑚𝑖𝑠𝑒 2: ℎ𝑖 ≻ ℎ𝑗. 𝑝𝑟𝑒𝑚𝑖𝑠𝑒 3: 𝑎 < 𝑏, 𝑓𝑜𝑟 𝑎𝑙𝑙 ℎ 𝑎, ℎ 𝑏, 𝑥 𝑎 < 𝑥 𝑏. 𝑝𝑟𝑜𝑝𝑜𝑠𝑖𝑡𝑖𝑜𝑛: ∀ 𝑘 < 𝑗, ℎ 𝑘 ≻ ℎ𝑗. Implementation: Two Dimensional
  • 20. 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 𝐿𝑒𝑡 𝑒𝑎𝑐ℎ 𝑣𝑒𝑐𝑡𝑜𝑟𝑠 𝑐𝑜𝑛𝑠𝑖𝑠𝑡 𝑜𝑓 𝑒𝑙𝑒𝑚𝑒𝑛𝑡𝑠 < 𝑥, 𝑦 >. 𝑆𝑖𝑚𝑖𝑙𝑎𝑟𝑙𝑦 𝑃𝑟𝑒𝑚𝑖𝑠𝑒 2, 𝑓𝑜𝑟 𝑎𝑙𝑙 ℎ𝑖, ℎ𝑗 → 𝑦𝑖 > 𝑦𝑗 ∵ 2 − 𝐷 𝑆𝑘𝑦𝑙𝑖𝑛𝑒 𝑑𝑒𝑓𝑖𝑛𝑒𝑡𝑖𝑜𝑛 𝑎𝑛𝑑 𝑃𝑟𝑒𝑚𝑖𝑠𝑒 3 . 𝐿𝑒𝑡 𝑢𝑠 𝑐𝑎𝑙𝑙 𝑖𝑡 𝑖𝑠 𝑝𝑟𝑒𝑚𝑖𝑠𝑒 4. Implementation: Two Dimensional
  • 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
  • 91. 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 𝑗 = 4, 𝑖 = 1 𝑡ℎ𝑒𝑛 𝑀𝑒𝑟𝑔𝑒𝑀𝑤𝑎𝑦 𝑆1,1 𝑆2,4 𝑖 = 2 𝑡ℎ𝑒𝑛 𝑀𝑒𝑟𝑔𝑒𝑀𝑤𝑎𝑦 𝑆1,2 𝑆2,3 𝑖 = 3 𝑡ℎ𝑒𝑛 𝑀𝑒𝑟𝑔𝑒𝑀𝑤𝑎𝑦 𝑆1,3 𝑆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
  • 92. 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 𝑗 = 4, 𝑖 = 1 𝑡ℎ𝑒𝑛 𝑀𝑒𝑟𝑔𝑒𝑀𝑤𝑎𝑦 𝑆1,1 𝑆2,4 𝑖 = 2 𝑡ℎ𝑒𝑛 𝑀𝑒𝑟𝑔𝑒𝑀𝑤𝑎𝑦 𝑆1,2 𝑆2,4 𝑖 = 3 𝑡ℎ𝑒𝑛 𝑀𝑒𝑟𝑔𝑒𝑀𝑤𝑎𝑦 𝑆1,3 𝑆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
  • 93. 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 𝑗 = 4, 𝑖 = 1 𝑡ℎ𝑒𝑛 𝑀𝑒𝑟𝑔𝑒𝑀𝑤𝑎𝑦 𝑆1,1 𝑆2,4 𝑖 = 2 𝑡ℎ𝑒𝑛 𝑀𝑒𝑟𝑔𝑒𝑀𝑤𝑎𝑦 𝑆1,2 𝑆2,4 𝑖 = 3 𝑡ℎ𝑒𝑛 𝑀𝑒𝑟𝑔𝑒𝑀𝑤𝑎𝑦 𝑆1,3 𝑆2,4 𝑖 = 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
  • 94. 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 𝑗 = 4, 𝑖 = 1 𝑡ℎ𝑒𝑛 𝑀𝑒𝑟𝑔𝑒𝑀𝑤𝑎𝑦 𝑆1,1 𝑆2,4 𝑖 = 2 𝑡ℎ𝑒𝑛 𝑀𝑒𝑟𝑔𝑒𝑀𝑤𝑎𝑦 𝑆1,2 𝑆2,4 𝑖 = 3 𝑡ℎ𝑒𝑛 𝑀𝑒𝑟𝑔𝑒𝑀𝑤𝑎𝑦 𝑆1,3 𝑆2,4 𝑖 = 3 𝑡ℎ𝑒𝑛 𝑀𝑒𝑟𝑔𝑒𝑀𝑤𝑎𝑦 𝑆1,4 𝑆2,4 𝑞𝑢𝑎𝑛𝑡𝑖𝑙𝑒 𝛼 𝑞𝑢𝑎𝑛𝑡𝑖𝑙𝑒 𝛼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.
  • 109. Thank you for listening