Clustered B+ tree index
Consider these relations:
Emp(eid: integer, ename: varchar, sal: integer, age: integer, did: integer)
Dept(did: integer, budget: integer, floor: integer, mgr eid: integer)
Salaries range from $5K to $50K, ages vary from 16 to 65, each department has about
five employees on average, and budgets vary from $10K to $1 million.
For each of the following queries, which of the listed index choices would you choose to speed up the
query? Note: index only plan can be used.
Query: Find employees who are younger than 18 with salary more than 8K.
(a) b and c.
(b) Clustered B+ tree index on < age, sal> fields of Emp.
(c) Unclustered B+ index on < age, sal> fields of Emp.
(d) Clustered B+ tree index on <sal, age> fields of Emp.
Query: Find the dids of departments that are on the 10th floor and have a budget of less
than $15,000.
(a) Clustered B+ tree index on <floor, budget> fields of Dept.
(b) Clustered hash index on the <budget, floor > fields of Dept.
(c) Unclustered hash index on the floor field of Dept.
(d) Clustered B+ tree index on the budget field of Dept.
Trending now
This is a popular solution!
Step by step
Solved in 2 steps with 1 images