Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Assume the following tables and attributes: CUST: cid - int (4 bytes) name - char(20) (20 bytes) age - int (4 bytes) - range 21

  1. Assume the following tables and attributes:

CUST: cid - int (4 bytes)

name - char(20) (20 bytes)

age - int (4 bytes) - range 21 to 60

address - char(50) (50 bytes)

state - char(2) (2 bytes)

ITEM: cid - int (4 bytes)

itemid - int (4 bytes)

price - int (4 bytes) - range $1 to $100

description - char(50) (50 bytes)

  • CUST is located on site 1; ITEM is located on site 2.
  • There is a one-to-many relationship between CUST and ITEM where cid is the foreign key of CUST (on cid) in the ITEM table.
  • CUST has hashed indexes on cid.
  • There is NO index on the ITEM table.
  • There are 100 CUST records and 1000 ITEM records.
  • TTR is the network transfer cost per byte.
  • TCPU is the cost of a CPU instruction (including disk I/O)
  • TMSG is the cost of initiating and receiving a message.
  • There are only two distinct states in the CUST table records (MD and VA).

Given the query: SELECT name, state, description

FROM CUST, ITEM

WHERE CUST.cid = ITEM.cid and

CUST.age > 50 and

ITEM.price > 30 and

ITEM.price <= 50

What single modification to the database would enable an even lower cost query plan? (I am not looking for a semi-join.)

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

More Books

Students also viewed these Databases questions

Question

5. How would you describe your typical day at work?

Answered: 1 week ago

Question

Understand how customers respond to effective service recovery.

Answered: 1 week ago