You are on page 1of 9

Assignment 20%

COMP3107 – Distributed Database Design

Semester 1, 2023-2024

Assignment: Description
This part is showing the assignment instructions.

INSTRUCTIONS:
1. Activity must be completed in the form of a written document, the document
should not accede 20 pages.
2. Each group is required to participate in the activity and to submit a hardcopy of
the written report. Presentation is done during class, on the submission date,
presentation is done and assessed individually.
3. Mode: Group (3-4 students).
4. Date of presentation and submission: 21-23 November 2023 (during lab
sessions)
** If you have any difficulties in submitting the assignment according to the
date given, please come and discuss with me.

Course outcome (s):


At the end of the course, students will be able to:
A1-CLO1 Knowledge and Understanding:
Discuss the introductory distributed database concepts and its structures.
A2-COL2 Describe terms/techniques related to distributed database design, integration and
semantic data control.
C-COL3 Implement a range of techniques for professionally managing distributed data
using distributed database management systems.

Learning Outcome (s):


PO 3 Solve distributed database problems using appropriate tools, techniques and
strategies.
PO 7 Apply skills and principles of learning for continuous career advancement and
higher education.
QUESTION 1 - Introduction
1. What are the components of a distributed database system? Explain with the help
of a diagram.
2. What is the difference between homogeneous and heterogeneous distributed
database system?

3. What is location transparency?


4. What is Fragmentation? Discuss various types of Fragmentations with the help of
suitable examples.
5. Write short note on any three of the following

a. Remote and distributed transactions.


b. Replication and consideration while designing the distributed data base system
c. Network Transparency

QUESTION 2 – OVERVIEW

After much deliberation, I have decided to choose “Laptops, Notebooks” product


type for this assignment. The category for the product type is as below.

Website Category

Normal auction amazon (US website) Home> Buy> Computers &


(https://www.amazon.com//) Networking> Laptops,
Notebooks
amazon Express Home > Computers &
(https://www.amazon.com/Express/s?k=Express&page=2) Networking > Laptop PCs

The table above has clearly depicts that the product type is sold at both
normal auction amazon and amazon Express. For this product type, the
items auctioned or sold have its own specific details that differentiate them
from other product types. They are as below.

1. Brand
2. Processor Speed
3. Memory
4. Hard Drive Capacity
5. Operating System
6. Processor Type
7. Screen Size
8. Family
9. Primary Drive
10. Processor Model
The two auction sellers which I have chosen are “Ahmad” and “Abu Ahmad”.
Their details are as below.

Seller’s ID Member for Location Feedback Positive


Score Feedback

Ahmad 5 years 1 month Muscat, Oman 1435 98.6%

Abu Ahmad 5 years 8 months Sohar, Oman 1036 99.8%


QUESTION 3
The diagrams in the following section will give a basic idea about the correctness
of the fragmentations.

The diagram below illustrates the vertical fragments of Product. It shows that the
fragmentation is correct and complete.

1. Write the SQL Statement in SQL server to implement the above


fragmentation.
____________________

The diagram below illustrates the horizontal fragments of ShoppingCart. It shows


that the fragmentation is correct and complete.

ShoppingCart1

ShoppingCart1 u ShoppingCart2

2. Write the SQL Statement in SQL server to implement the above


fragmentation to display the ShoppingCart
The diagram below illustrates the horizontal fragments of PurchaseHistory. It
shows that the fragmentation is correct and complete.
PurchaseHistory1 PurchaseHistory2

PurchaseHistory1 uPurchaseHistory2

3. Write the SQL Statement in SQL server to implement the above


fragmentation to display the PurchaseHisto.

The table below explains the correctness of the fragments.

Fragments Explanation
Product 1, Product Completeness: All data are maintained and are found in one or more
2, fragments.
Product 3

Reconstruction: When all fragments are “join” (œ) back together,


dependency constraints on the data are preserved and the original
table could be obtained.

Disjointness: Data are not duplicated in all fragments (except for


primary key (i.e.: ItemNumber)).
ShoppingCart1, Completeness: All data are maintained and are found in one or more
ShoppingCart2 fragments.
PurchaseHistory1,
PurchaseHistory2
Reconstruction: When the “union” (u) operation is applied on both
fragments, the original table could be obtained and the dependency
constraints on the data are preserved.

Disjointness: Data are not duplicated in all fragments. Hence, the data
will be consistent in all fragments during update and query operations.
QUESTION 4 – DISTRIBUTED QUERY PROCESSING
Implement the query below and explain how the processing of display the amazon
express price display ?

SELECT c.Name, p.Title, sc.Quantity,

p.amazonExpressPrice, s.Name

FROM ShoppingCart sc, Product p,

Customer c, Seller s

WHERE sc.CustomerID =

c.CustomerID AND

sc.ItemNumber =

p.ItemNumber AND

sc.OrderStatus = 'active'

AND c.Country =

'Oman' AND

p.SellerID =

s.SellerID

1. Show the operator tree without optimization.


2. Show the optimized operator tree.
3. Please refer to the optimized operation tree (after localization and reduction)
Show the distributed query plan .
4. Assume that the cost of a block read and write is 400000MB, the transfer
time is 0.112 milliseconds, and the number of seeks is 7955 with time to
transfer one block is 0.11 milliseconds. Calculate the cost of each of the
sites listed above.
QUESTION 5 – DISTRIBUTED QUERY PROCESSING

1. How could we fix a replication issue when trying to update a record that is
deleted from the subscription database mistakenly?

2. Explain in details how transactional replication works if you order products


from amazon ?
ASSIGNMENT

Received Date :
Submission Date :
Weightage : 20 %
Semester : 21-23 November 2023 Lab
:

nstruction to students:
• This is Group assignment.
• Complete this cover sheet and attach it to your assignment (first page).

Student declaration:
I declare that:
• This assignment is my own work
• I understand what is meant by plagiarism
• My lecturer has the right to deduct my marks in the case of:
- Late submission
- Any plagiarism found in my assignment.
Name Student ID

1.

2.

3.

4.

Total

MARKS:
8

You might also like