Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please note the is all the information provided Assume the following tables and attributes: CUST: cid - int (4 bytes) name - char(20) (20 bytes)

Please note the is all the information provided

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

  1. Estimate the total cost of the query by moving the appropriate parts of the CUST table from site 1 to 2 and performing the join at site 2. To estimate the total cost, sum the cost of the estimates of each intermediate step. Assume that you are done when you have completed the join. (This is NOT 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

Databases In Networked Information Systems 6th International Workshop Dnis 2010 Aizu Wakamatsu Japan March 2010 Proceedings Lncs 5999

Authors: Shinji Kikuchi ,Shelly Sachdeva ,Subhash Bhalla

2010th Edition

3642120377, 978-3642120374

More Books

Students also viewed these Databases questions