Skylines & Dominance
Finding the good objects without inventing weights. Dominance and the skyline, BNL and Sort-Filter-Skyline with the sorting precondition that makes SFS correct, the k-skyband, and the sharp distinction recent exams keep testing — skyline points a weighted sum can never make win.
01 · Foundation
Dominance and the skyline
The complaint against top-k is that you must supply weights, and users rarely know theirs. Skyline queries answer the same question with no parameters at all.
The primitive is dominance. Tuple dominates tuple , written , when
— nowhere worse, and strictly better at least once. Note the convention flip: in skyline literature lower values are better, the opposite of the score-space convention in chapter 9. It is only a convention, but mixing the two mid-exercise is a reliable way to get the wrong answer.
The skyline of a relation is its set of non-dominated tuples. The same object appears in three literatures under three names: maximal vectors in computational geometry, Pareto-optimal solutions in multi-objective optimization, and the skyline in databases — the name coming from the 2D picture, where the non-dominated points trace the contour of the dataset like a city skyline.
The property that makes it the right notion:
Potential optimality
A tuple is in the skyline if and only if it is the top-1 result for at least one monotone scoring function.
So the skyline is exactly the set of potentially optimal tuples — everything that could win under some preference, and nothing that could not.
Read the biconditional carefully, because January 2026 turned it into a multiple-choice question and only one of four phrasings was correct. Three things must all be right: the function must be monotone (not arbitrary — an arbitrary function can make any point win; and not merely linear, which is a strict sub-case); the tuple must be strictly better than every other tuple; and ties with itself are obviously exempt. A formulation using rather than is satisfied by any constant function and therefore says nothing.
This also means a skyline is not a top-k result in disguise: there is no scoring function that, on all possible instances, returns the skyline points in the first positions.
02 · SQL
Skylines in SQL
There is a proposed syntax, not part of the standard, and a literal translation that shows why a dedicated operator is worth having.
SELECT ... FROM ... WHERE ... GROUP BY ... HAVING ...
SKYLINE OF [DISTINCT] d1 [MIN | MAX | DIFF], ..., dm [MIN | MAX | DIFF]
ORDER BY ...Each dimension is marked MIN (lower is better), MAX (higher is better), or DIFF (compare only
within equal values — a grouping dimension). For hotels in Paris:
SELECT * FROM Hotels WHERE city = 'Paris'
SKYLINE OF price MIN, distance MIN;which translates directly into standard SQL as a doubly-nested “nothing dominates me” test:
SELECT * FROM Hotels h
WHERE h.city = 'Paris' AND NOT EXISTS (
SELECT * FROM Hotels h1
WHERE h1.city = h.city
AND h1.distance <= h.distance AND h1.price <= h.price
AND (h1.distance < h.distance OR h1.price < h.price));Correct, and very slow — the subquery re-scans the table for every candidate row. Hence the algorithms.
03 · Algorithms
BNL and Sort-Filter-Skyline
Both maintain a window of currently-undominated points. The difference is whether the input was sorted first — and that difference is where exams set their traps.
BNL — Block Nested Loop
For every point : if is not dominated by any point in the window , remove from the points dominates, then add . Return .
, and no result can be emitted until the very end, because a later point may still evict a window member.
SFS — Sort-Filter-Skyline
First sort the dataset by a monotone function of its attributes. Then for every point : if is not dominated by any point in , add it. No removal step is needed.
Still worst case, but it never compares two non-skyline points and it can output window members immediately.
The reason SFS can drop the removal step is a one-line invariant: if the input is sorted by a monotone function, a later tuple can never dominate an earlier one. A dominating tuple is nowhere-worse and strictly-better somewhere, so any monotone function scores it strictly better, so sorting puts it first.
SFS needs a topological order, not just any sort
The invariant fails the moment the sort key cannot separate a dominating pair. The July 2024 paper
is built entirely on this: the same dataset sorted by x gives the correct skyline
{D, E, H}, but sorted by z it yields {C, E, D, H} — with C wrongly
included, because C and E tie on z (both 5) while E actually dominates C. Placing C
first violates the topological-order requirement.
The sting in the tail: the x-sorted version also violates the principle (F
precedes H, which dominates it) and still produces the right answer — because F happens to be
dominated by the earlier D as well.
Correct output does not prove the precondition held.
The dataset, sorted
Hotels with (Cost, Complaints), lower better, sorted by Cost + Complaints:
Novotel (.15, .1), Crillon (.25, .1), Ibis (.08, .3), Sheraton (.2, .2), Hilton (.175, .3).
Window W starts empty.
Novotel
W is empty, so nothing dominates it. Add. W = {Novotel}.
Crillon
Test against Novotel: Novotel (.15, .1) versus Crillon (.25, .1) — Novotel is better on cost, equal on complaints. Novotel ≺ Crillon. Discard Crillon.
Ibis
Test against Novotel: .15 < .08 is false — Novotel is worse on cost, so it does not dominate.
Nothing in W dominates Ibis. Add. W = {Novotel, Ibis}.
Sheraton
Test against Novotel (.15, .1) versus (.2, .2): better on both. Novotel ≺ Sheraton. Discard.
Hilton
Test against Novotel (.15, .1) versus (.175, .3): better on both. Discard. Final skyline
{Novotel, Ibis}.
What to write down
Exams ask you to “indicate all dominance tests made by the algorithm” — so list them as
a ≺ b / a ⊀ b pairs in the order performed, and note that each new point is tested only
against the current window, not against the whole dataset. That is the count graders check.
04 · Extension
The k-skyband
The skyline is the set of tuples dominated by nobody. Relax “nobody” to “fewer than k” and you get the structure that contains every possible top-k answer.
The k-skyband is the set of tuples dominated by fewer than tuples. Two immediate consequences:
- The skyline is the 1-skyband — dominated by fewer than 1, i.e. by none.
- Every top-k result set is contained in the k-skyband. If a tuple is dominated by or more others, each of those scores strictly better under any monotone function, so it cannot reach rank .
Worked on the January 2025 hotel dataset: the skyline is {a, h, b, e, i}, and the 2-skyband adds d (dominated only by a), c (only by e) and g (only by i). The single excluded tuple is f, dominated by five others.
The k-skyband is not the first k skyline layers
It is tempting to compute it by peeling: take the skyline, remove it, take the skyline of what remains, and so on. That gives the skyline layers, which are a different set. The definition counts how many tuples dominate each point — so a point dominated by one tuple is in the 2-skyband regardless of which layer the peeling procedure would assign it to.
05 · Theory
Skyline versus convex hull
Every skyline point wins under some monotone function. It does not follow that it wins under some linear one — and the gap between those two statements is where recent exams live.
Restrict the scoring functions to weighted sums, with non-negative weights. Geometrically, minimising such a function means sweeping a family of parallel lines toward the data and seeing which point they touch first. Only points on the convex hull of the dataset can be touched first; a skyline point sitting behind the hull’s boundary is always beaten by one of the hull points bracketing it, for every choice of weights.
The three nested sets
Linear functions can only make a hull point win. Arbitrary monotone functions can make any skyline point win. Nothing can make a dominated point win.
January 2025 asks precisely this: of the skyline {a, h, b, e, i}, which hotels can be top-1 under a linear function? Only a, e and i — those on the hull. And then it tightens the screw: restrict further to , and i drops out too, because
which holds for every admissible weight pair — so e always beats i. The argument must hold for all weights, not for one sample choice.
June 2026 runs the same idea in reverse. The director wants LUMEN to win on (Potential, Feasibility) and no weighted sum works, because LUMEN (8, 8) lies behind the segment joining AURIX (10, 7) and VERDE (7, 9). The bonus question asks for any monotone function that does the job — and non-linear ones exist:
Deep dive Two non-linear rescues for an interior skyline point
MIN. Score by . LUMEN scores 8; AURIX scores ; VERDE scores . LUMEN wins outright. MIN is monotone but emphatically not linear — its iso-score curves are L-shaped, hugging the corner where the hull’s straight edges cannot reach.
Distance to the ideal point. Take — the negated Euclidean distance to the perfect proposal . It is monotonically increasing while the coordinates stay in , and gives LUMEN against AURIX and VERDE . Circular iso-score curves, again reaching into the concavity.
Both work for the same reason: the hull limitation is a statement about straight iso-score contours. Curve them toward the ideal corner and interior skyline points become reachable.
A third recent variation, January 2026, asks what happens to the skyline when columns are removed. The intuition — fewer dimensions make domination easier, so the skyline should shrink — is usually right and not guaranteed. Dropping SL and DH costs MG its place (PZ now dominates it), but dropping SG as well brings MG back, because on the two remaining columns MG and PZ tie exactly, and ties are not dominance. So even though came from by removing a column: the skyline may grow, shrink or stay the same.
Skyline questions have shifted from mechanics to theory
Skyline exercises appear in 4 of the 14 papers as the dominant activity (2024-07-17, 2025-01-15, 2026-01-22, 2026-06-12) and in several more alongside a top-k algorithm. The trend is clear: the two 2026 papers are almost entirely theory — what “potentially optimal” means, which points a linear function can reach, whether removing columns shrinks the skyline — while the SFS mechanics that dominated 2024 now carry fewer marks. Prepare the arguments, not just the algorithm.
Point P is in the skyline of a 2D dataset but not on its convex hull. What can be said about P?
06 · Comparison
Ranking versus skyline
The two approaches to multi-criteria “best”, with their trade-offs stated plainly.
| Ranking (top-k) | Skyline | |
|---|---|---|
| Simplicity (no parameters) | ✗ | ✓ |
| Overall view of good results | ✗ | ✓ |
| Control of result cardinality | ✓ | ✗ |
| Trade-off among attributes | ✓ | ✗ |
Skylines are effective when nothing is known about the user’s preferences, and they need no parameters. Their weaknesses are the mirror image: too many objects are returned for large, anti-correlated datasets — where being good on one attribute tends to mean being bad on another, so almost nothing is dominated; computation is essentially quadratic; and they are agnostic to known preferences, unable to use the information that price matters more than distance even when the user has said so.
Top-k is the opposite on every line: exact cardinality control and full expression of trade-offs, at the cost of demanding weights the user may be unable to supply, and hiding the shape of the alternative space behind a single number.
In practice they compose. The k-skyband is the bridge: compute it once with no parameters, and every top-k query the user later poses — whatever weights they choose — draws its answer from inside it.
Load-bearing ideas
- Dominance: nowhere worse, strictly better at least once. Lower is better by convention here — the opposite of chapter 9’s score space.
- The skyline is exactly the potentially optimal set — a tuple is in it iff it is the unique top-1 for some monotone function. Not “some function” (too weak), not “some linear function” (too strong), and strict, not .
- BNL maintains a window with removals; SFS pre-sorts by a monotone function so later tuples can never dominate earlier ones, dropping the removal step and allowing progressive output. Both are .
- SFS’s precondition is a topological order of dominance. Sorting by a single attribute with ties can break it — and a correct answer does not prove the precondition held.
- k-skyband = dominated by fewer than tuples; skyline = 1-skyband; every top-k result lives inside the k-skyband. It is not the first peeled layers.
- Convex hull ⊆ skyline. Weighted sums can only make hull points win; interior skyline points need a non-linear monotone function such as MIN or negated distance to the ideal point.
- Removing columns makes domination easier but gives no guarantee — ties are not dominance, so the skyline can grow, shrink or stay the same.
- Exam radar. Re-derive before the exam: the SFS dominance-test list against the window only; the k-skyband by counting dominators; and the hull argument — including how to show a point can never win, for all admissible weights rather than one sample pair.