Consider that BOOKS are fragmented by $PRICE amounts into: B1: BOOK!: up to $20. Bz: BOOK2: from $20.01 to $50. B3: BOOK3: from $50.01 to $100. B4: BOOK4: $100.01 and above. Similarly, BOOKSTORES are...



Consider that BOOKS are fragmented by $PRICE amounts into:


B1: BOOK!: up to $20.


Bz: BOOK2: from $20.01 to $50.


B3: BOOK3: from $50.01 to $100.


B4: BOOK4: $100.01 and above.


Similarly, BOOKSTORES are divided by Zi pcodes into:


SI: EAST: Zi pcodes up to 35000.


s, MIDDLE: Zipcodes 35001 to 70000.


S3: WEST: Zi pcodes 70001 to 99999.


Assume that STOCK is a derived fragment based on BOOKSTORE only.


a. Consider the query:


SELECT Book#, Total_stock


FROM Books


WHERE $price > 15 and $price


Assume that fragments of BOOKSTORE are non-replicated and assigned based on


region. Assume further that BOOKS are allocated as:


EAST: 81, B4


MIDDLE: B1, 82


WEST: 81, B2, B3, B4


Assuming the query was submitted in EAST, what remote subqueries does it


generate? (write in SQL).


b. If the bookprice of BOOK#= 1234 is updated from $45 to $55 at site MIDDLE,


what updates does that generate? Write in English and then in SQl.


c. Given an example query issued at WEST that will generate a subquery for


MIDDLE.


d. Write a query involving selection and projection on the above relations and


show two possible query trees that denote different ways of execution.



May 26, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here