Reply
Distibuted database exercise
Old 06-27-2007, 08:12 AM Distibuted database exercise
Junior Talker

Posts: 2
Hi,
Iwould like somebody to help me with this exercise :

Consider the following relations:

BOOKS (Book#, Primary_author, Topic, Total_stock, $price)
BOOKSTORE (Store#, City, State, Zip, Inventory_value)
STOCK (Store#, Book#, Qty)

Consider a distributed database for a bookstore chain called National Books with 3 sites called EAST, MIDDLE, and WEST. The relation schemas are given in question 24.20. Consider that BOOKS are fragmented by $price amounts into:

B1:BOOK1:up to $20.
B2:BOOK2:from 20.01 to $50.
B3:BOOK3:from 50.01 to $100.
B4:BOOK4: 100.01 and above.

Similarly, BOOKSTORES are divided by Zipcodes into:

S1:EAST:Zipcodes up to 35000.
S2:MIDDLE:Zipcodes 35001 to 70000.
S3:WEST:Zipcodes 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 < 55;

Assume that fragments of BOOKSTORE are non-replicated and assigned based on region. Assume further that BOOKS are allocated as:

EAST:B1,B4.
MIDDLE:B1,B2.
WEST:B1,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.

Some help?

Thanks a lot

Last edited by chrishirst : 06-27-2007 at 08:22 AM. Reason: removed superfluous images inherited from C&P
spiross is offline
Reply With Quote
View Public Profile
 
When You Register, These Ads Go Away!
     
Old 06-27-2007, 12:14 PM Re: Distibuted database exercise
Learning Newbie's Avatar
Moderator

Latest Blog Post:
What Does This Look Like?
Posts: 4,727
Name: John Alexander
Quote:
Originally Posted by spiross View Post
Iwould like somebody to help me with this exercise :

The relation schemas are given in question 24.20.
So this is a homework project, then?
__________________
4 ways to improve the lives of the "bottom billion"

"HEY YOU KIDS GET OFF MY LAWN!" -John McCain
Learning Newbie is offline
Reply With Quote
View Public Profile
 
Old 06-27-2007, 12:35 PM Re: Distibuted database exercise
Junior Talker

Posts: 2
Quote:
Originally Posted by Learning Newbie View Post
So this is a homework project, then?

It is not a homework project, it is a question from book Elmasri/Navathe
"Fundamentals of Database System" CHAPTER 24.
spiross is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Distibuted database exercise
 

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML

 


Page generated in 0.11828 seconds with 13 queries