Describe an intuitively ecient query evaluation plan for the following query, where the relations involved have the following schemas: Rel1(A,B), Rel2(B,C).
SELECT T.A
FROM Rel1 T
WHERE EXISTS (
( SELECT R.B
FROM Rel1 R
WHERE R.A = T.A)
EXCEPT
( SELECT O.B
FROM Rel2 O
WHERE O.C = 123)
)
Solution:
(a) Select Rel2 on C and project on B. Denote the result by Rel3.
(b) Sort Rel3 and Rel1 on B.
(c) In a merge-style algorithm remove tuples from Rel1 that join with Rel3 on attribute B.
Let Rel4 denote the result.
(d) Project Rel4 on the attribute A.
You might also like to view...
Here are several different initializations of a structure variable. State what happens in each initialization.
``` struct WeatherData { int temperature; int windChill; int windSpeed; }; ``` a) WeatherData prediction ={ }; b) WeatherData prediction ={40}; c) WeatherData prediction ={40, -10, }; d) x WeatherData prediction ={40, -10, 20 };
If you want to animate an airplane moving across a static background, how many layers are required?
What will be an ideal response?
Right-clicking a button on the taskbar produces a ________ displaying destinations and tasks
A) path B) contextual tab C) Jump List D) shortcut menu
An object model consists of a(n) ________ collection of objects, consisting of properties, methods, and events that can be manipulated using VBA
Fill in the blank(s) with correct word