0% found this document useful (0 votes)
12 views

CS4430-Tutorial-01 (1)

Uploaded by

chartrex96
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views

CS4430-Tutorial-01 (1)

Uploaded by

chartrex96
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

NATIONAL UNIVERSITY OF LESOTHO

DEPARTMENT OF MATHEMATICS AND COMPUTER SCIENCE


CS4430 - DISTRIBUTED DATABASE SYSTEMS

Tutorial 01 - Distributed Database Design

04 April 2022

1. Given relation EMP as described in class, let p1 : TITLE < "Programmer" and p2 : TITLE >
Programmer be two simple predicates. Assume that character strings have an order among
them, based on the alphabetical order.

(a) Perform a horizontal fragmentation of relation EMP with respect to {p1 , p2 }.

(b) Explain why the resulting fragmentation (EMP1 , EMP2 ) does not fulll the correctness
rules of fragmentation.

(c) Modify the predicates p1 and p2 so that they partition EMP obeying the correctness
rules of fragmentation. To do this, modify the predicates, compose all minterm pred-
icates and deduce the corresponding implications, and then perform a horizontal frag-
mentation of EMP based on these minterm predicates.

(d) Finally, show that the result has completeness, reconstruction, and disjointness proper-
ties.

2. Consider relation ASG discussed in class. Suppose there are two applications that access
ASG. The rst is issued at ve sites and attempts to nd the duration of assignment of
employees given their numbers. Assume that managers, consultants, engineers, and pro-
grammers are located at four dierent sites. The second application is issued at two sites
where the employees with an assignment duration of less than 20 months are managed at one
site, whereas those with longer duration are managed at a second site. Derive the primary
horizontal fragmentation of ASG using the foregoing information.

3. Consider relations EMP and PAY that we discussed in class. EMP and PAY are horizontally
fragmented as follows:

EMP1 = svTITLE=Elect. Eng.(EMP)


EMP2 = svTITLE=Syst. Anal.(EMP)

EMP3 = svTITLE=Mech. Eng.(EMP)

EMP4 = svTITLE=Programmer(EMP)

PAY1 = svSAL30000(PAY)

PAY2 = svSAL<30000(PAY)

(a) Draw the join graph of EMP n TITLE PAY. Is the graph simple or partitioned?

(b) If it is partitioned, modify the fragmentation of either EMP or PAY so that the join
graph of EMP TITLE PAY is simple.

1
4. Given relation PAY as discussed in class, let p1 : SAL < 30000 and p2 : SAL  30000 be
two simple predicates.

(a) Perform a horizontal fragmentation of PAY with respect to these predicates to obtain
PAY1 and PAY2 .

(b) Using the fragmentation of PAY, perform further derived horizontal fragmentation for
EMP.

(c) Show completeness, reconstruction, and disjointness of the fragmentation of EMP.

5. Assume the following view denition:

CREATE VIEW EMPVIEW(ENO, ENAME, PNO, RESP)

AS SELECT EMP.ENO, EMP.ENAME, ASG.PNO, ASG.RESP

FROM EMP JOIN ASG

WHERE DUR=24

is accessed by application q1 , located at sites 1 and 2, with frequencies 10 and 20, respectively.

Let us further assume that there is another query q2 dened as

SELECT ENO, DUR

FROM ASG

which is run at sites 2 and 3 with frequencies 20 and 10, respectively.

(a) Based on the above information, construct the use(qi , Aj ) matrix for the attributes of
both relations EMP and ASG.

(b) Also construct the anity matrix containing all attributes of EMP and ASG.

(c) Finally, transform the anity matrix so that it could be used to split the relation into
two vertical fragments using heuristics or BEA.

6. Pick one of the heuristic algorithms used to solve the DAP, and write a program for it.

It is the work of true education to train the youth to be thinkers, and not mere reectors of other men's thought -
Education, p17.

You might also like