Question
Consider the following relations: Professor (profid: integer, name: varchar, salary: integer, age: integer, depid: integer) Department (did: integer, budget: integer, location: varchar, mgr eid: integer)
Consider the following relations: Professor (profid: integer, name: varchar, salary: integer, age: integer, depid: integer) Department (did: integer, budget: integer, location: varchar, mgr eid: integer) Salaries range from $30,000 to $100,000, ages vary from 20 to 80, each department has about 20 employees on average, there are 10 locations, and budgets vary from $100,000 to $1 million. You can assume uniform distributions of values. For each of the following queries, what index would you choose to speed up the query? If your database system does not consider index-only plans (i.e., data records are always retrieved even if enough information is available in the index entry), how would your answer change? Explain briefly. a.Query1: Print name, age, and salary for all professors. (5 marks) b.Query2: Find the dids of departments that are located in Edmonton and have a budget of more than $150,000. (5 marks)
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started