Lecture 8 - Distributed Database Management Systems
Lecture 8 - Distributed Database Management Systems
Management Systems
(DDBMS)
Site 1
Site 2
Site 5
Communication
Network
Site 4 Site 3
Problems with Centralized DB
✗ Performance degradation as number of remote sites grew
✗ High cost to maintain large centralized DBs
✗ Reliability problems with one, central site
✗ The site with the database can become a bottleneck.
✗ Data availability is not efficient
✗ Possible availability problem: if the site with the database
goes down, there can be no data access.
Concept of DDBMS
✘ Hence, to overcome the problem of centralized DBMS, DDBMS is
introduced.
✗ Different hardware.
✘ Local schemas: Each local DBMS has its own set of schemas.
Reference Architecture for DDBMS
✘ Due to diversity, no accepted architecture equivalent
to ANSI/SPARC 3-level architecture.
✘ Data replication:
✘ Data allocation:
✗ Locality of Reference.
✗ Improved Reliability and Availability.
✗ Improved Performance.
✗ Balanced Storage Capacities and Costs.
✗ Minimal Communication Costs.
✗ Horizontal,
✗ Vertical,
✗ Mixed,
✗ Derived.
✘ For example:
S1 = ∏staffNo, position, sex, DOB, salary(Staff)
S2 = ∏staffNo, fName, lName, branchNo(Staff)
✘ Do a horizontal fragmentation
based on:
✗ PROJ1: projects with
budget less than $200,000
✗ PROJ2: projects with
budget greater than or
equal to $200,000
By using RA: Reconstruction:
Proj1
Proj1 = σ BUDGET<200K (Proj) ⋃
Proj2
Proj2 = σ BUDGET>=200K(Proj)
Question 2
✘ Do a vertical fragmentation
based on: column
PROJ1&3 ⨝ PROJ1&4
∪
PROJ2&3 PROJ2&4
PROJ2&3 ⨝ PROJ2&4
QUESTION 4
• Do a horizontal fragmentation based
on:
– PAY1: salary less than $30,000
– PAY2: salary greater than or equal to
$30,000
By using RA: Reconstruction:
Pay1
Pay1 = σ SALARY<30K (PAY) ⋃
Pay2
Pay2 = σ SALARY>30K(PAY)
Question 5
• Identify which table is a CHILD table
to PAY table.
– EMPLOYEE
HAMIZ RADZI
Question 6
• Do a derived fragmentation
of an EMPLOYEE table.
– EMP1: employee with
salary less than $30,000
– EMP2: employee with
salary greater than
$30,000
BY RA:
Reconstruction
✘ Must be possible to define a relational operation that will reconstruct R from
the fragments.
✘ Reconstruction for horizontal fragmentation is Union operation and Join for
vertical .
Correctness of Fragmentation
Disjointness
✘ If data item di appears in fragment Ri, then it should
not appear in any other fragment.
✘ Exception: vertical fragmentation, where primary key
attributes must be repeated to allow reconstruction.
✘ For horizontal fragmentation, data item is a tuple.
✘ For vertical fragmentation, data item is an attribute.
Transparencies in a DDBMS
53
Distribution Transparency
✘ The EMPLOYEE table is divided among three locations (no replication)
✗ Fragmentation transparency-
SELECT * FROM EMPLOYEE WHERE EMP_DOB < ’01-JAN-1940’;
✗ Location transparency-
SELECT * FROM E1 WHERE EMP_DOB < ’01-JAN-1940’ UNION
SELECT * FROM E2 … UNION SELECT * FROM E3…;