Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

It is sometimes possible to evaluate a particular query using only indexes, without accessing the actual data records. Consider a database with two tables which

It is sometimes possible to evaluate a particular query using only indexes, without accessing the actual data records.

Consider a database with two tables which includes information about dogs and people who feed them: People(SSN, Pname, State, Income) Dogs(SSN, Dname, Breed)

Assume three unclustered indexes, where the leaf entries have the form [search-key value, RID].

on People on People on Dogs

For each of the following queries, say whether it can be evaluated with just data from the indexes (i.e. without going to the data records). If the query can be answered, describe how. If the query can't, explain why. (a) SELECT MIN(Income) FROM People;

(b) SELECT State, MAX(Income) FROM People GROUP BY State;

(c) SELECT Pname, COUNT(SSN) FROM People GROUP BY Pname;

(d) SELECT COUNT(*) FROM Dogs WHERE Breed = Poodle

(e) SELECT Pname FROM People, Dogs WHERE People.SSN = Dogs.SSN;

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

Formal SQL Tuning For Oracle Databases Practical Efficiency Efficient Practice

Authors: Leonid Nossov ,Hanno Ernst ,Victor Chupis

1st Edition

3662570564, 978-3662570562

More Books

Students also viewed these Databases questions

Question

Describe a persuasive message.

Answered: 1 week ago

Question

Identify and use the five steps for conducting research.

Answered: 1 week ago

Question

List the goals of a persuasive message.

Answered: 1 week ago