Question: It is sometimes possible to evaluate a particular query using only indexes, without accessing the actual data records. Consider a database with two tables: Pokemon(charName,
It is sometimes possible to evaluate a particular query using only indexes, without accessing the actual data records.
Consider a database with two tables: Pokemon(charName, attack, stamina, pType) Captured(charName, player, difficulty)
Assume three unclustered indexes, where the leaf entries have the form [search-key value, RID].
For the following questions, say which queries can be evaluated with just data from these indexes. - If the query can, describe how. - If the query can't, explain why.
Question 1)
SELECT pType, COUNT(charName) FROM Pokemon GROUP BY pType;
Question 2)
SELECT pType, difficulty FROM Pokemon, Captured WHERE stamina = 90 AND Pokemon.charName = Captured.charName;
Question 3)
SELECT COUNT(*) FROM Pokemon WHERE stamina = 85 AND pType = 'Fire';
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
