Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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.

b. Query2: Find the dids of departments that are located in Edmonton and have a budget of more than $150,000.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

SQL Antipatterns Avoiding The Pitfalls Of Database Programming

Authors: Bill Karwin

1st Edition

1680508989, 978-1680508987

More Books

Students also viewed these Databases questions

Question

What are the objectives of Human resource planning ?

Answered: 1 week ago

Question

Explain the process of Human Resource Planning.

Answered: 1 week ago