Click here to Skip to main content
15,881,882 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
1. Consider a distributed database for a bookstore with 4 sites called S1, S2, S3 and S4.
Consider the following relations:
Books ( ISBN, primary
Author, topic, total
Stock, price )
Book
Store
(store No
, city, state, zip, inven
toryValue )
Stock
(store No
, ISBN, Qty )
T
otal
Stock is the total number of books in stock and inventory
Value is the total
inventory value for the store in dollars.
Consider that Books are fragmented by price amounts into:
F1: Books: price up to $20
F2:
Books: price from $20.01 to $50
F3: Books: price from $50.01 to $100
F4: Books: price $100.01 and above
Similarly, Book
Stores are divided by ZIP codes into:
16
S1: Bookstore: Zip up to 25000
S2: Bookstore: Zip 25001 to 50000
S3: Bookstore: Zip 50001 to 75000
S4: Bookstore: Zip 75001 to 99999
Task: Write SQL query for the following
1.
Insert and Display details in each table.
2.
Find the total number of books in stock where price is between $15 and $55.
3.
Update the
book price
of
book No
=1234 from $45 to $55 at site
S3.
4.
Find total number of book at site S2.
Posted

1 solution

We do not do your homework: it is set for a reason. It is there so that you think about what you have been told, and try to understand it. It is also there so that your tutor can identify areas where you are weak, and focus more attention on remedial action.

Try it yourself, you may find it is not as difficult as you think!
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900