You are on page 1of 3

Case Study (PHF, DHF)

A multinational engineering company has decided to distribute its project management


information at the regional level in Pakistan. The current centralized relational schema is
as follows:

Employee (NIN, fname, lname, address, DOB, sex, salary, taxCode, deptNo)
Department (deptNo, deptName, managerNIN, businessAreaNo, regionNo)
Project (projNo, projName, contractPrice, projectManagerNIN, deptNo)
WorksOn (NIN, projNo, hoursWorked)
Business (businessAreaNo, businessAreaName)
Region (regionNo, regionName)

Where
Employee contains employee details and national insurance number NIN is the key.

Department contains details and deptNo is the key. managerNIN identifies the employee
who is the manager of the department. There is only one manager for each department.

Project contains details of the projects in the company and the key is projNo. The project
manager is identified by the projectManagerNIN, and the department responsible for the
project by deptNo.

WorksOn contains details of the hours worked by employees on each project and
(NIN,projNo) forms the key.

Business contains names of the business areas and the key is businessAreaNo.

Region contains names of the regions and the key is regionNo.

Departments are grouped regionally as follows:


Region 1: Punjab Region 2: Sindh Region 3: Balochistan
Information is required by business area, which covers: Software engineering,
Mechanical Engineering, and Electrical Engineering. There is no Software Engineering in
Sindh and all Electrical Engineering departments are in Balochistan. Projects are staffed
by local department offices.
As well as distributing the data regionally, there is an additional requirement to access the
employee data either by personal information (by Personnel) or by work related
information (by Payroll).
Produce a distributed database design for this system, and include:
a) A suitable fragmentation schema for the system
b) In the case of primary horizontal fragmentation, a minimal set of predicates
c) The reconstruction of global relations from fragments
State any assumptions necessary to support your design
Question # 2:
Given relation EMP as

EMP (eNo, ename, title)

p1: title < “programmer” and p2: title > “programmer”

Let p1 and p2 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 fulfill the
correctness rules of fragments.
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 predicates and deduce the corresponding implications, and then perform
a horizontal fragment of EMP based on these minterm predicates. Finally, show
that the result has completeness, reconstruction and disjointness.

Question # 3:
Given relations PAY and EMP as

PAY (title , sal)


EMP (eNo, ename, title)

p1: sal < 30000 and p2: sal >= 3000

Let p1 and p2 by two simple predicates. Perform a horizontal fragmentation of PAY with
respect to these predicates to obtain PAY1, and PAY2. Using the fragmentation of PAY,
perform further derived horizontal fragmentation for EMP. Show completeness,
reconstruction, and disjointness of the fragmentation of EMP.

Question # 4:
Consider relations EMP and PAY

PAY (title , sal)


EMP (eNo, ename, title)

EMP and PAY are horizontally fragmented as follows:

EMP1 = σ title = “Elect.Eng.” (EMP)


EMP2 = σ title = “Syst.Anal.” (EMP)
EMP3 = σ title = “Mech.Eng.” (EMP)
EMP4 = σ title = “Programmer.” (EMP)
PAY1 = σ sal >= 30000 (PAY)
PAY2 = σ sal < 30000 (PAY)
Draw the join graph. Is the graph simple or partitioned? If it is partitioned, modify the
fragmentation of either EMP or PAY so that the join graph of EMP ⋉ title PAY is simple.

You might also like