Question: ( b ) Consider the SQL query shown in Table 1 . ( i ) Draw a near - optimal query tree for the SQL

(b) Consider the SQL query shown in Table 1.(i) Draw a near-optimal query tree for the SQL query. (ii) Identify the root and leaf nodes in the tree that you drew for part (i).(iii) Write down a justification for the position of the root node and each of the
internal nodes in the tree that you drew for part (i) in terms of the heuristic
steps that optimisers apply to reduce the cost of optimisation. Explain why
the position of the nodes should make the query efficient. SELECT factory.name
FROM factory, order
WHERE order.factory_ID=factory.ID
AND order.quantity >20
AND order.priority=urgent; Table 1: An SQL query about orders placed with a factory.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!