Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

The Database Forum


You are currently viewing our The Database Forum as a guest. Please register to participate.
Login



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

Posts: 2
Trades: 0
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 09:22 AM.. Reason: removed superfluous images inherited from C&P
spiross is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 06-27-2007, 01:14 PM Re: Distibuted database exercise
Learning Newbie's Avatar
Defies a Status

Latest Blog Post:
Astounding Republican Paranoia
Posts: 5,662
Name: John Alexander
Trades: 0
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?
__________________

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE
Learning Newbie is offline
Reply With Quote
View Public Profile
 
Old 06-27-2007, 01:35 PM Re: Distibuted database exercise
Junior Talker

Posts: 2
Trades: 0
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 Search this Thread
Search this Thread:

Advanced Search

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

BB 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.23492 seconds with 12 queries