Question: 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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!