0% found this document useful (0 votes)
219 views10 pages

Distributed Database For BookStore

This document describes a distributed database implementation for a bookstore with 3 sites. The database contains books, bookstores, and stock relations fragmented across the sites. Books are fragmented by ISBN ranges to different sites. Bookstores are fragmented by store number ranges. The document explains how queries can be run to access data across different sites, such as checking total books available or finding copies of a book by ISBN.

Uploaded by

ABID SIAL
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
219 views10 pages

Distributed Database For BookStore

This document describes a distributed database implementation for a bookstore with 3 sites. The database contains books, bookstores, and stock relations fragmented across the sites. Books are fragmented by ISBN ranges to different sites. Bookstores are fragmented by store number ranges. The document explains how queries can be run to access data across different sites, such as checking total books available or finding copies of a book by ISBN.

Uploaded by

ABID SIAL
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 10

Title: Distributed database implementation for bookstore

Consider a distributed database for a bookstore with 3 sites called site1, site2 and site3.
Consider the following relations:
books ( ISBN, Author, Topic, TotalStock, Price )
BookStore (Storeno, City, State, ZipCode, InventoryValue )
Stock (Storeno, ISBN, Qty )
Total Stock is the total number of books in stock.

Now here in this distributed database for bookstore, we have fragmented the books according to the
ISBN numbers into:

F1:books: ISBN from 1001 to 1010

F2:books: ISBN from 1021 to 1030

F3:books: ISBN from 1031 to 1040

Similarly, Book Stores are divided according to their store number into

S1:BookStore: Storeno from 1 to 10

S2:BookStore: Storeno from 11 to 20

S3:BookStore: Storeno from 21 to 30

books
books

BookStore
BookStore site1 site2

site3 Stock
Stock

books BookStore
Stock

Fig. Distributed Database for book store

Now write SQL queries for the following

Procedure:

Creation of database 1: site1


Creation of database 2: site2
Creation of database 3: site3
Now from Site3, we want to check on the total number of books available at each site.
We are on site1 and we want to access the books on site3, site 2. Now it is possible using distributed
database.

From site 2, we want to check the available copies of particular book with ISBN number in the
bookstore. According to the ISBN number in which fragment it belongs, search in the respective
database.
Get the list of all the books available in the bookstore from any site.

Get the list of all the stores from any site.

You might also like