Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Consider the following schema of a shoe store database: Store(sid, location) ShoeType(id, style, size, color) Inventory(type, sid, quantity) Table Store has the data of each

Consider the following schema of a shoe store database:

Store(sid, location)

ShoeType(id, style, size, color)

Inventory(type, sid, quantity)

Table Store has the data of each shoe store in the database which contains a unique id and the location. The ShoeType table has the data of each possible type of shoe in the database. This table keeps a unique value as the id, the style, size and the color of the shoe. The Inventory table listed the number of shoe types in each store.

Inventory.type is a foreign key to ShoeType.id and Inventory.sid is a foreign key to Store.sid. We are given the following information about the database: Store contains 500 records with 10 records per page. ShoeType contains 1000 records with 40 records per page. Inventory contains 50,000 records with 50 records per page.

There are 100 values for Inventory.type.

There are 50 value for Store.location

There are 10 values for ShoeType.size (5,6,,14)

There are 1000 values for Inventory.quantity

Consider the following query:

SELECT S.sid, S.location, T.size

FROM Store S, ShoeType T, Inventory I

WHERE S.sid=I.sid AND I.type = T.id AND T.size>7 AND I.quantity = 20;

Assuming uniform distribution of values and column independence, estimate the number of tuples returned by the query. (Hint: Estimate the selectivity of T.size>7 AND I.quantity = 20)

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_2

Step: 3

blur-text-image_3

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

Database Processing

Authors: David M. Kroenke

12th Edition International Edition

1292023422, 978-1292023427

Students also viewed these Databases questions

Question

=+How might these stem from country and regional cultures?

Answered: 1 week ago