SlideShare a Scribd company logo
1 of 76
1
Chapter 24
Distributed DBMSs - Concepts and
Design
Pearson Education © 2009
2
Chapter 24 - Objectives
Concepts.
Advantages and disadvantages of distributed
databases.
Functions and architecture for a DDBMS.
Distributed database design.
Levels of transparency.
Comparison criteria for DDBMSs.
Pearson Education © 2009
3
Concepts
Distributed Database
A logically interrelated collection of shared
data (and a description of this data), physically
distributed over a computer network.
Distributed DBMS
Software system that permits the management
of the distributed database and makes the
distribution transparent to users.
Pearson Education © 2009
4
Concepts
Collection of logically-related shared data.
Data split into fragments.
Fragments may be replicated.
Fragments/replicas allocated to sites.
Sites linked by a communications network.
Data at each site is under control of a DBMS.
DBMSs handle local applications autonomously.
Each DBMS participates in at least one global
application.
Pearson Education © 2009
5
Distributed DBMS
Pearson Education © 2009
6
Distributed Processing
A centralized database that can be accessed over
a computer network.
Pearson Education © 2009
7
Parallel DBMS
A DBMS running across multiple processors and
disks designed to execute operations in parallel,
whenever possible, to improve performance.
Based on premise that single processor systems
can no longer meet requirements for cost-effective
scalability, reliability, and performance.
Parallel DBMSs link multiple, smaller machines to
achieve same throughput as single, larger
machine, with greater scalability and reliability.
Pearson Education © 2009
8
Parallel DBMS
Main architectures for parallel DBMSs are:
– Shared memory,
– Shared disk,
– Shared nothing.
Pearson Education © 2009
9
Parallel DBMS
(a) shared memory
(b) shared disk
(c) shared nothing
Pearson Education © 2009
Pearson Education © 2009
Shared Memory
Processors and disks have access to a common
memory, typically via a bus or through an
interconnection network.
Extremely efficient communication between
processors — data in shared memory can be
accessed by any processor without having to
move it using software.
Downside – architecture is not scalable beyond 32
or 64 processors since the bus or the
interconnection network becomes a bottleneck
Shared Disk
All processors can directly access all disks via an
interconnection network, but the processors have
private memories.
– The memory bus is not a bottleneck
– Architecture provides a degree of fault-
tolerance — if a processor fails, the other
processors can take over its tasks since the
database is resident on disks that are accessible
from all processors.
Shared Disk
Examples: IBM Sysplex and DEC clusters (now
part of Compaq) running Rdb (now Oracle Rdb)
were early commercial users
Downside: bottleneck now occurs at
interconnection to the disk subsystem.
Shared-disk systems can scale to a somewhat
larger number of processors, but communication
between processors is slower.
Shared Nothing
Examples: Teradata, Tandem, Oracle-n CUBE
Data accessed from local disks (and local memory
accesses) do not pass through interconnection
network, thereby minimizing the interference of
resource sharing.
Shared-nothing multiprocessors can be scaled up
to thousands of processors without interference.
Main drawback: cost of communication and non-
local disk access; sending data involves software
interaction at both ends.
14
Advantages of DDBMSs
Reflects organizational structure
Improved shareability and local autonomy
Improved availability
Improved reliability
Improved performance
Economics
Modular growth
Pearson Education © 2009
15
Disadvantages of DDBMSs
Complexity
Cost
Security
Integrity control more difficult
Lack of standards
Lack of experience
Database design more complex
Pearson Education © 2009
16
Types of DDBMS
Homogeneous DDBMS
Heterogeneous DDBMS
Pearson Education © 2009
17
Homogeneous DDBMS
All sites use same DBMS product.
Much easier to design and manage.
Approach provides incremental growth and
allows increased performance.
Pearson Education © 2009
18
Heterogeneous DDBMS
Sites may run different DBMS products, with
possibly different underlying data models.
Occurs when sites have implemented their own
databases and integration is considered later.
Translations required to allow for:
– Different hardware.
– Different DBMS products.
– Different hardware and different DBMS
products.
Typical solution is to use gateways.
Pearson Education © 2009
19
Open Database Access and Interoperability
Open Group formed a Working Group to
provide specifications that will create a database
infrastructure environment where there is:
– Common SQL API that allows client applications to
be written that do not need to know vendor of DBMS
they are accessing.
– Common database protocol that enables DBMS from
one vendor to communicate directly with DBMS from
another vendor without the need for a gateway.
– A common network protocol that allows
communications between different DBMSs.
Pearson Education © 2009
20
Open Database Access and Interoperability
Most ambitious goal is to find a way to enable
transaction to span DBMSs from different
vendors without use of a gateway.
Group has now evolved into DBIOP Consortium
and are working in version 3 of DRDA
(Distributed Relational Database Architecture)
standard.
Pearson Education © 2009
21
Multidatabase System (MDBS)
DDBMS in which each site maintains complete
autonomy.
DBMS that resides transparently on top of
existing database and file systems and presents
a single database to its users.
Allows users to access and share data without
requiring physical database integration.
Unfederated MDBS (no local users) and
federated MDBS.
Pearson Education © 2009
22
Overview of Networking
Network - Interconnected collection of
autonomous computers, capable of exchanging
information.
Local Area Network (LAN) intended for connecting
computers at same site.
Wide Area Network (WAN) used when computers
or LANs need to be connected over long distances.
WAN relatively slow and less reliable than LANs.
DDBMS using LAN provides much faster response
time than one using WAN.
Pearson Education © 2009
23
Overview of Networking
Pearson Education © 2009
24
Functions of a DDBMS
Expect DDBMS to have at least the functionality
of a DBMS.
Also to have following functionality:
– Extended communication services.
– Extended Data Dictionary.
– Distributed query processing.
– Extended concurrency control.
– Extended recovery services.
Pearson Education © 2009
25
Reference Architecture for DDBMS
Due to diversity, no accepted architecture
equivalent to ANSI/SPARC 3-level architecture.
A reference architecture consists of:
– Set of global external schemas.
– Global conceptual schema (GCS).
– Fragmentation schema and allocation schema.
– Set of schemas for each local DBMS conforming to 3-
level ANSI/SPARC.
Some levels may be missing, depending on levels
of transparency supported.
Pearson Education © 2009
26
Reference Architecture for DDBMS
Pearson Education © 2009
27
Reference Architecture for MDBS
In DDBMS, GCS is union of all local conceptual
schemas.
In FMDBS, GCS is subset of local conceptual
schemas (LCS), consisting of data that each local
system agrees to share.
GCS of tightly coupled system involves
integration of either parts of LCSs or local
external schemas.
FMDBS with no GCS is called loosely coupled.
Pearson Education © 2009
28
Reference Architecture for Tightly-Coupled
FMDBS
Pearson Education © 2009
29
Components of a DDBMS
Pearson Education © 2009
30
Distributed Database Design
Three key issues:
– Fragmentation,
– Allocation,
– Replication.
Pearson Education © 2009
31
Distributed Database Design
Fragmentation
Relation may be divided into a number of sub-
relations, which are then distributed.
Allocation
Each fragment is stored at site with “optimal”
distribution.
Replication
Copy of fragment may be maintained at
several sites.
Pearson Education © 2009
32
Fragmentation
Definition and allocation of fragments carried out
strategically to achieve:
– Locality of Reference.
– Improved Reliability and Availability.
– Improved Performance.
– Balanced Storage Capacities and Costs.
– Minimal Communication Costs.
Involves analyzing most important applications,
based on quantitative/qualitative information.
Pearson Education © 2009
33
Fragmentation
Quantitative information may include:
– frequency with which an application is run;
– site from which an application is run;
– performance criteria for transactions and
applications.
Qualitative information may include
transactions that are executed by application,
type of access (read or write), and predicates of
read operations.
Pearson Education © 2009
34
Data Allocation
Four alternative strategies regarding placement
of data:
– Centralized,
– Partitioned (or Fragmented),
– Complete Replication,
– Selective Replication.
Pearson Education © 2009
35
Data Allocation
Centralized: Consists of single database and DBMS
stored at one site with users distributed across
the network.
Partitioned: Database partitioned into disjoint
fragments, each fragment assigned to one site.
Complete Replication: Consists of maintaining
complete copy of database at each site.
Selective Replication: Combination of partitioning,
replication, and centralization.
Pearson Education © 2009
36
Comparison of Strategies for Data Distribution
Pearson Education © 2009
37
Why Fragment?
Usage
– Applications work with views rather than
entire relations.
Efficiency
– Data is stored close to where it is most
frequently used.
– Data that is not needed by local applications is
not stored.
Pearson Education © 2009
38
Why Fragment?
Parallelism
– With fragments as unit of distribution,
transaction can be divided into several
subqueries that operate on fragments.
Security
– Data not required by local applications is not
stored and so not available to unauthorized
users.
Pearson Education © 2009
39
Why Fragment?
Disadvantages
– Performance,
– Integrity.
Pearson Education © 2009
40
Correctness of Fragmentation
Three correctness rules:
– Completeness,
– Reconstruction,
– Disjointness.
Pearson Education © 2009
41
Correctness of Fragmentation
Completeness
If relation R is decomposed into fragments R1,
R2, ... Rn, each data item that can be found in R
must appear in at least one fragment.
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 .
Pearson Education © 2009
42
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.
Pearson Education © 2009
43
Types of Fragmentation
Four types of fragmentation:
– Horizontal,
– Vertical,
– Mixed,
– Derived.
Other possibility is no fragmentation:
– If relation is small and not updated frequently,Pearson Education © 2009
44
Horizontal and Vertical Fragmentation
Pearson Education © 2009
45
Mixed Fragmentation
Pearson Education © 2009
46
Horizontal Fragmentation
Consists of a subset of the tuples of a relation.
Defined using Selection operation of relational
algebra:
σp(R)
For example:
P1 = σ type=‘House’(PropertyForRent)
P2 = σ type=‘Flat’(PropertyForRent)
Pearson Education © 2009
47
Horizontal Fragmentation
This strategy is determined by looking at
predicates used by transactions.
Involves finding set of minimal (complete and
relevant) predicates.
Set of predicates is complete, if and only if, any
two tuples in same fragment are referenced with
same probability by any application.
Predicate is relevant if there is at least one
application that accesses fragments differently.
Pearson Education © 2009
48
Vertical Fragmentation
Consists of a subset of attributes of a relation.
Defined using Projection operation of relational
algebra:
∏a1,... ,an(R)
For example:
S1 = ∏staffNo, position, sex, DOB, salary(Staff)
S2 = ∏staffNo, fName,lName,branchNo(Staff)
Determined by establishing affinity of one
attribute to another.
Pearson Education © 2009
49
Mixed Fragmentation
Consists of a horizontal fragment that is vertically
fragmented, or a vertical fragment that is
horizontally fragmented.
Defined using Selection and Projection operations
of relational algebra:
σ p(∏a1,... ,an(R)) or
∏a1,... ,an(σp(R))
Pearson Education © 2009
50
Example - Mixed Fragmentation
S1 = ∏staffNo,position, sex,DOB,salary(Staff)
S2 = ∏staffNo,fName, lName, branchNo(Staff)
S21 = σ branchNo=‘B003’(S2)
S22 = σ branchNo=‘B005’(S2)
S23 = σ branchNo=‘B007’(S2)
Pearson Education © 2009
51
Derived Horizontal Fragmentation
A horizontal fragment that is based on horizontal
fragmentation of a parent relation.
Ensures that fragments that are frequently joined
together are at same site.
Defined using Semijoin operation of relational
algebra:
Ri = R F Si, 1 ≤ i ≤ w
Pearson Education © 2009
52
Example - Derived Horizontal Fragmentation
S3 = σ branchNo=‘B003’(Staff)
S4 = σ branchNo=‘B005’(Staff)
S5 = σ branchNo=‘B007’(Staff)
Could use derived fragmentation for Property:
Pi = PropertyForRent branchNo Si, 3 ≤ i ≤ 5
Pearson Education © 2009
53
Derived Horizontal Fragmentation
If relation contains more than one foreign key,
need to select one as parent.
Choice can be based on fragmentation used
most frequently or fragmentation with better
join characteristics.
Pearson Education © 2009
54
Distributed Database Design Methodology
1. Use normal methodology to produce a design for the
global relations.
2. Examine topology of system to determine where
databases will be located.
3. Analyze most important transactions and identify
appropriateness of horizontal/vertical fragmentation.
4. Decide which relations are not to be fragmented.
5. Examine relations on 1 side of relationships and
determine a suitable fragmentation schema. Relations
on many side may be suitable for derived
fragmentation.
Pearson Education © 2009
55
Transparencies in a DDBMS
Distribution Transparency
– Fragmentation Transparency
– Location Transparency
– Replication Transparency
– Local Mapping Transparency
– Naming Transparency
Pearson Education © 2009
56
Transparencies in a DDBMS
Transaction Transparency
– Concurrency Transparency
– Failure Transparency
Performance Transparency
– DBMS Transparency
DBMS TransparencyPearson Education © 2009
57
Distribution Transparency
Distribution transparency allows user to perceive
database as single, logical entity.
If DDBMS exhibits distribution transparency,
user does not need to know:
– data is fragmented (fragmentation transparency),
– location of data items (location transparency),
– otherwise call this local mapping transparency.
With replication transparency, user is unaware of
replication of fragments .
Pearson Education © 2009
58
Naming Transparency
Each item in a DDB must have a unique name.
DDBMS must ensure that no two sites create a
database object with same name.
One solution is to create central name server.
However, this results in:
– loss of some local autonomy;
– central site may become a bottleneck;
– low availability; if the central site fails,
remaining sites cannot create any new objects.
Pearson Education © 2009
59
Naming Transparency
Alternative solution - prefix object with identifier of
site that created it.
For example, Branch created at site S1 might be
named S1.BRANCH.
Also need to identify each fragment and its copies.
Thus, copy 2 of fragment 3 of Branch created at site
S1 might be referred to as S1.BRANCH.F3.C2.
However, this results in loss of distribution
transparency.
Pearson Education © 2009
60
Naming Transparency
An approach that resolves these problems uses
aliases for each database object.
Thus, S1.BRANCH.F3.C2 might be known as
LocalBranch by user at site S1.
DDBMS has task of mapping an alias to
appropriate database object.
Pearson Education © 2009
61
Transaction Transparency
Ensures that all distributed transactions maintain
distributed database’s integrity and consistency.
Distributed transaction accesses data stored at
more than one location.
Each transaction is divided into number of
subtransactions, one for each site that has to be
accessed.
DDBMS must ensure the indivisibility of both the
global transaction and each of the subtransactions.
Pearson Education © 2009
62
Example - Distributed Transaction
T prints out names of all staff, using schema
defined above as S1, S2, S21, S22, and S23. Define three
subtransactions TS3, TS5, and TS7 to represent
agents at sites 3, 5, and 7.
Pearson Education © 2009
63
Concurrency Transparency
All transactions must execute independently and
be logically consistent with results obtained if
transactions executed one at a time, in some
arbitrary serial order.
Same fundamental principles as for centralized
DBMS.
DDBMS must ensure both global and local
transactions do not interfere with each other.
Similarly, DDBMS must ensure consistency of all
subtransactions of global transaction.
Pearson Education © 2009
64
Classification of Transactions
In IBM’s Distributed Relational Database
Architecture (DRDA), four types of transactions:
– Remote request
– Remote unit of work
– Distributed unit of work
– Distributed request.
Pearson Education © 2009
65
Classification of Transactions
Pearson Education © 2009
66
Concurrency Transparency
Replication makes concurrency more complex.
If a copy of a replicated data item is updated,
update must be propagated to all copies.
Could propagate changes as part of original
transaction, making it an atomic operation.
However, if one site holding copy is not
reachable, then transaction is delayed until site is
reachable.
Pearson Education © 2009
67
Concurrency Transparency
Could limit update propagation to only those
sites currently available. Remaining sites
updated when they become available again.
Could allow updates to copies to happen
asynchronously, sometime after the original
update. Delay in regaining consistency may
range from a few seconds to several hours.
Pearson Education © 2009
68
Failure Transparency
DDBMS must ensure atomicity and durability of
global transaction.
Means ensuring that subtransactions of global
transaction either all commit or all abort.
Thus, DDBMS must synchronize global
transaction to ensure that all subtransactions
have completed successfully before recording a
final COMMIT for global transaction.
Must do this in presence of site and network
failures.
Pearson Education © 2009
69
Performance Transparency
DDBMS must perform as if it were a centralized
DBMS.
– DDBMS should not suffer any performance
degradation due to distributed architecture.
– DDBMS should determine most cost-effective
strategy to execute a request.
Pearson Education © 2009
70
Performance Transparency
Distributed Query Processor (DQP) maps data
request into ordered sequence of operations on
local databases.
Must consider fragmentation, replication, and
allocation schemas.
DQP has to decide:
– which fragment to access;
– which copy of a fragment to use;
– which location to use.
Pearson Education © 2009
71
Performance Transparency
DQP produces execution strategy optimized with
respect to some cost function.
Typically, costs associated with a distributed
request include:
– I/O cost;
– CPU cost;
– communication cost.
Pearson Education © 2009
72
Performance Transparency - Example
Property(propNo, city) 10000 records in London
Client(clientNo,maxPrice) 100000 records in Glasgow
Viewing(propNo, clientNo) 1000000 records in London
SELECT p.propNo
FROM Property p INNER JOIN
(Client c INNER JOIN Viewing v ON c.clientNo = v.clientNo)
ON p.propNo = v.propNo
WHERE p.city=‘Aberdeen’AND c.maxPrice > 200000;
Pearson Education © 2009
73
Performance Transparency - Example
Assume:
Each tuple in each relation is 100 characters
long.
10 renters with maximum price greater than
£200,000.
100 000 viewings for properties in Aberdeen.
Computation time negligible compared to
communication time.
Pearson Education © 2009
74
Performance Transparency - Example
Pearson Education © 2009
75
Date’s 12 Rules for a DDBMS
0. Fundamental Principle
To the user, a distributed system should look exactly
like a nondistributed system.
1. Local Autonomy
2. No Reliance on a Central Site
3. Continuous Operation
4. Location Independence
5. Fragmentation Independence
6. Replication Independence
Pearson Education © 2009
76
Date’s 12 Rules for a DDBMS
7. Distributed Query Processing
8. Distributed Transaction Processing
9. Hardware Independence
10. Operating System Independence
11. Network Independence
12. Database Independence
Last four rules are ideals.
Pearson Education © 2009

More Related Content

What's hot

Lecture 10 distributed database management system
Lecture 10   distributed database management systemLecture 10   distributed database management system
Lecture 10 distributed database management systememailharmeet
 
15. Transactions in DBMS
15. Transactions in DBMS15. Transactions in DBMS
15. Transactions in DBMSkoolkampus
 
Distributed Database Management System
Distributed Database Management SystemDistributed Database Management System
Distributed Database Management SystemAAKANKSHA JAIN
 
Architecture of dbms(lecture 3)
Architecture of dbms(lecture 3)Architecture of dbms(lecture 3)
Architecture of dbms(lecture 3)Ravinder Kamboj
 
Chapter 11 - File System Implementation
Chapter 11 - File System ImplementationChapter 11 - File System Implementation
Chapter 11 - File System ImplementationWayne Jones Jnr
 
Distributed database management system
Distributed database management  systemDistributed database management  system
Distributed database management systemPooja Dixit
 
Database architecture
Database architectureDatabase architecture
Database architectureVENNILAV6
 
Database Management System
Database Management SystemDatabase Management System
Database Management SystemNishant Munjal
 
Introduction to distributed database
Introduction to distributed databaseIntroduction to distributed database
Introduction to distributed databaseSonia Panesar
 
Distributed operating system
Distributed operating systemDistributed operating system
Distributed operating systemudaya khanal
 
Query processing-and-optimization
Query processing-and-optimizationQuery processing-and-optimization
Query processing-and-optimizationWBUTTUTORIALS
 
3 Level Architecture
3 Level Architecture3 Level Architecture
3 Level ArchitectureAdeel Rasheed
 
Data warehouse architecture
Data warehouse architecture Data warehouse architecture
Data warehouse architecture janani thirupathi
 
Database management system
Database management systemDatabase management system
Database management systemAmit Sarkar
 
Difference between Homogeneous and Heterogeneous
Difference between Homogeneous  and    HeterogeneousDifference between Homogeneous  and    Heterogeneous
Difference between Homogeneous and HeterogeneousFaraz Qaisrani
 

What's hot (20)

Lecture 10 distributed database management system
Lecture 10   distributed database management systemLecture 10   distributed database management system
Lecture 10 distributed database management system
 
15. Transactions in DBMS
15. Transactions in DBMS15. Transactions in DBMS
15. Transactions in DBMS
 
Distributed Database Management System
Distributed Database Management SystemDistributed Database Management System
Distributed Database Management System
 
Architecture of dbms(lecture 3)
Architecture of dbms(lecture 3)Architecture of dbms(lecture 3)
Architecture of dbms(lecture 3)
 
Chapter 11 - File System Implementation
Chapter 11 - File System ImplementationChapter 11 - File System Implementation
Chapter 11 - File System Implementation
 
Distributed database management system
Distributed database management  systemDistributed database management  system
Distributed database management system
 
DBMS - RAID
DBMS - RAIDDBMS - RAID
DBMS - RAID
 
Database architecture
Database architectureDatabase architecture
Database architecture
 
Distributed DBMS - Unit 3 - Distributed DBMS Architecture
Distributed DBMS - Unit 3 - Distributed DBMS ArchitectureDistributed DBMS - Unit 3 - Distributed DBMS Architecture
Distributed DBMS - Unit 3 - Distributed DBMS Architecture
 
Database Management System
Database Management SystemDatabase Management System
Database Management System
 
Introduction to distributed database
Introduction to distributed databaseIntroduction to distributed database
Introduction to distributed database
 
Distributed operating system
Distributed operating systemDistributed operating system
Distributed operating system
 
DDBMS
DDBMSDDBMS
DDBMS
 
OLAP
OLAPOLAP
OLAP
 
Query processing-and-optimization
Query processing-and-optimizationQuery processing-and-optimization
Query processing-and-optimization
 
3 Level Architecture
3 Level Architecture3 Level Architecture
3 Level Architecture
 
03 hive query language (hql)
03 hive query language (hql)03 hive query language (hql)
03 hive query language (hql)
 
Data warehouse architecture
Data warehouse architecture Data warehouse architecture
Data warehouse architecture
 
Database management system
Database management systemDatabase management system
Database management system
 
Difference between Homogeneous and Heterogeneous
Difference between Homogeneous  and    HeterogeneousDifference between Homogeneous  and    Heterogeneous
Difference between Homogeneous and Heterogeneous
 

Similar to Lecture 11 - distributed database

Distributed databases and dbm ss
Distributed databases and dbm ssDistributed databases and dbm ss
Distributed databases and dbm ssMohd Arif
 
Chapter-6 Distribute Database system (3).ppt
Chapter-6 Distribute Database system (3).pptChapter-6 Distribute Database system (3).ppt
Chapter-6 Distribute Database system (3).pptlatigudata
 
Distributed database management system
Distributed database management systemDistributed database management system
Distributed database management systemVinay D. Patel
 
Database 2 ddbms,homogeneous & heterognus adv & disadvan
Database 2 ddbms,homogeneous & heterognus adv & disadvanDatabase 2 ddbms,homogeneous & heterognus adv & disadvan
Database 2 ddbms,homogeneous & heterognus adv & disadvanIftikhar Ahmad
 
A database management system
A database management systemA database management system
A database management systemghulam120
 
Client server computing in mobile environments
Client server computing in mobile environmentsClient server computing in mobile environments
Client server computing in mobile environmentsPraveen Joshi
 
Provable multicopy dynamic data possession
Provable multicopy dynamic data possessionProvable multicopy dynamic data possession
Provable multicopy dynamic data possessionnexgentech15
 
PROVABLE MULTICOPY DYNAMIC DATA POSSESSION IN CLOUD COMPUTING SYSTEMS
PROVABLE MULTICOPY DYNAMIC DATA POSSESSION IN CLOUD COMPUTING SYSTEMSPROVABLE MULTICOPY DYNAMIC DATA POSSESSION IN CLOUD COMPUTING SYSTEMS
PROVABLE MULTICOPY DYNAMIC DATA POSSESSION IN CLOUD COMPUTING SYSTEMSNexgen Technology
 
Provable multicopy dynamic data possession
Provable multicopy dynamic data possessionProvable multicopy dynamic data possession
Provable multicopy dynamic data possessionnexgentechnology
 
PROVABLE MULTICOPY DYNAMIC DATA POSSESSION IN CLOUD COMPUTING SYSTEMS
PROVABLE MULTICOPY DYNAMIC DATA POSSESSION IN CLOUD COMPUTING SYSTEMSPROVABLE MULTICOPY DYNAMIC DATA POSSESSION IN CLOUD COMPUTING SYSTEMS
PROVABLE MULTICOPY DYNAMIC DATA POSSESSION IN CLOUD COMPUTING SYSTEMSNexgen Technology
 
Distributed Shared Memory – A Survey and Implementation Using Openshmem
Distributed Shared Memory – A Survey and Implementation Using OpenshmemDistributed Shared Memory – A Survey and Implementation Using Openshmem
Distributed Shared Memory – A Survey and Implementation Using OpenshmemIJERA Editor
 
Distributed Shared Memory – A Survey and Implementation Using Openshmem
Distributed Shared Memory – A Survey and Implementation Using OpenshmemDistributed Shared Memory – A Survey and Implementation Using Openshmem
Distributed Shared Memory – A Survey and Implementation Using OpenshmemIJERA Editor
 

Similar to Lecture 11 - distributed database (20)

Distributed databases and dbm ss
Distributed databases and dbm ssDistributed databases and dbm ss
Distributed databases and dbm ss
 
Chapter-6 Distribute Database system (3).ppt
Chapter-6 Distribute Database system (3).pptChapter-6 Distribute Database system (3).ppt
Chapter-6 Distribute Database system (3).ppt
 
2 ddb architecture
2 ddb architecture2 ddb architecture
2 ddb architecture
 
T7
T7T7
T7
 
1 ddbms jan 2011_u
1 ddbms jan 2011_u1 ddbms jan 2011_u
1 ddbms jan 2011_u
 
Distributed databases
Distributed  databasesDistributed  databases
Distributed databases
 
Distributed database management system
Distributed database management systemDistributed database management system
Distributed database management system
 
Chapter One.ppt
Chapter One.pptChapter One.ppt
Chapter One.ppt
 
Database 2 ddbms,homogeneous & heterognus adv & disadvan
Database 2 ddbms,homogeneous & heterognus adv & disadvanDatabase 2 ddbms,homogeneous & heterognus adv & disadvan
Database 2 ddbms,homogeneous & heterognus adv & disadvan
 
A database management system
A database management systemA database management system
A database management system
 
Distributed Systems.pptx
Distributed Systems.pptxDistributed Systems.pptx
Distributed Systems.pptx
 
Client server computing in mobile environments
Client server computing in mobile environmentsClient server computing in mobile environments
Client server computing in mobile environments
 
Provable multicopy dynamic data possession
Provable multicopy dynamic data possessionProvable multicopy dynamic data possession
Provable multicopy dynamic data possession
 
PROVABLE MULTICOPY DYNAMIC DATA POSSESSION IN CLOUD COMPUTING SYSTEMS
PROVABLE MULTICOPY DYNAMIC DATA POSSESSION IN CLOUD COMPUTING SYSTEMSPROVABLE MULTICOPY DYNAMIC DATA POSSESSION IN CLOUD COMPUTING SYSTEMS
PROVABLE MULTICOPY DYNAMIC DATA POSSESSION IN CLOUD COMPUTING SYSTEMS
 
Provable multicopy dynamic data possession
Provable multicopy dynamic data possessionProvable multicopy dynamic data possession
Provable multicopy dynamic data possession
 
PROVABLE MULTICOPY DYNAMIC DATA POSSESSION IN CLOUD COMPUTING SYSTEMS
PROVABLE MULTICOPY DYNAMIC DATA POSSESSION IN CLOUD COMPUTING SYSTEMSPROVABLE MULTICOPY DYNAMIC DATA POSSESSION IN CLOUD COMPUTING SYSTEMS
PROVABLE MULTICOPY DYNAMIC DATA POSSESSION IN CLOUD COMPUTING SYSTEMS
 
Database
DatabaseDatabase
Database
 
Distributed Shared Memory – A Survey and Implementation Using Openshmem
Distributed Shared Memory – A Survey and Implementation Using OpenshmemDistributed Shared Memory – A Survey and Implementation Using Openshmem
Distributed Shared Memory – A Survey and Implementation Using Openshmem
 
Distributed Shared Memory – A Survey and Implementation Using Openshmem
Distributed Shared Memory – A Survey and Implementation Using OpenshmemDistributed Shared Memory – A Survey and Implementation Using Openshmem
Distributed Shared Memory – A Survey and Implementation Using Openshmem
 
Cluster cmputing
Cluster cmputingCluster cmputing
Cluster cmputing
 

Recently uploaded

HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...Nguyen Thanh Tu Collection
 
How to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPHow to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPCeline George
 
Atmosphere science 7 quarter 4 .........
Atmosphere science 7 quarter 4 .........Atmosphere science 7 quarter 4 .........
Atmosphere science 7 quarter 4 .........LeaCamillePacle
 
Romantic Opera MUSIC FOR GRADE NINE pptx
Romantic Opera MUSIC FOR GRADE NINE pptxRomantic Opera MUSIC FOR GRADE NINE pptx
Romantic Opera MUSIC FOR GRADE NINE pptxsqpmdrvczh
 
Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Celine George
 
Quarter 4 Peace-education.pptx Catch Up Friday
Quarter 4 Peace-education.pptx Catch Up FridayQuarter 4 Peace-education.pptx Catch Up Friday
Quarter 4 Peace-education.pptx Catch Up FridayMakMakNepo
 
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...JhezDiaz1
 
Earth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatEarth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatYousafMalik24
 
Gas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptxGas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptxDr.Ibrahim Hassaan
 
AmericanHighSchoolsprezentacijaoskolama.
AmericanHighSchoolsprezentacijaoskolama.AmericanHighSchoolsprezentacijaoskolama.
AmericanHighSchoolsprezentacijaoskolama.arsicmarija21
 
Hierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of managementHierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of managementmkooblal
 
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdfAMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdfphamnguyenenglishnb
 
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdfLike-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdfMr Bounab Samir
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentInMediaRes1
 

Recently uploaded (20)

HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
 
How to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPHow to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERP
 
Atmosphere science 7 quarter 4 .........
Atmosphere science 7 quarter 4 .........Atmosphere science 7 quarter 4 .........
Atmosphere science 7 quarter 4 .........
 
Romantic Opera MUSIC FOR GRADE NINE pptx
Romantic Opera MUSIC FOR GRADE NINE pptxRomantic Opera MUSIC FOR GRADE NINE pptx
Romantic Opera MUSIC FOR GRADE NINE pptx
 
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
 
Rapple "Scholarly Communications and the Sustainable Development Goals"
Rapple "Scholarly Communications and the Sustainable Development Goals"Rapple "Scholarly Communications and the Sustainable Development Goals"
Rapple "Scholarly Communications and the Sustainable Development Goals"
 
Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17
 
9953330565 Low Rate Call Girls In Rohini Delhi NCR
9953330565 Low Rate Call Girls In Rohini  Delhi NCR9953330565 Low Rate Call Girls In Rohini  Delhi NCR
9953330565 Low Rate Call Girls In Rohini Delhi NCR
 
Quarter 4 Peace-education.pptx Catch Up Friday
Quarter 4 Peace-education.pptx Catch Up FridayQuarter 4 Peace-education.pptx Catch Up Friday
Quarter 4 Peace-education.pptx Catch Up Friday
 
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
 
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
 
Earth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatEarth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice great
 
Gas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptxGas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptx
 
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdfTataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
 
AmericanHighSchoolsprezentacijaoskolama.
AmericanHighSchoolsprezentacijaoskolama.AmericanHighSchoolsprezentacijaoskolama.
AmericanHighSchoolsprezentacijaoskolama.
 
Hierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of managementHierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of management
 
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdfAMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
 
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdfLike-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media Component
 
Raw materials used in Herbal Cosmetics.pptx
Raw materials used in Herbal Cosmetics.pptxRaw materials used in Herbal Cosmetics.pptx
Raw materials used in Herbal Cosmetics.pptx
 

Lecture 11 - distributed database

  • 1. 1 Chapter 24 Distributed DBMSs - Concepts and Design Pearson Education © 2009
  • 2. 2 Chapter 24 - Objectives Concepts. Advantages and disadvantages of distributed databases. Functions and architecture for a DDBMS. Distributed database design. Levels of transparency. Comparison criteria for DDBMSs. Pearson Education © 2009
  • 3. 3 Concepts Distributed Database A logically interrelated collection of shared data (and a description of this data), physically distributed over a computer network. Distributed DBMS Software system that permits the management of the distributed database and makes the distribution transparent to users. Pearson Education © 2009
  • 4. 4 Concepts Collection of logically-related shared data. Data split into fragments. Fragments may be replicated. Fragments/replicas allocated to sites. Sites linked by a communications network. Data at each site is under control of a DBMS. DBMSs handle local applications autonomously. Each DBMS participates in at least one global application. Pearson Education © 2009
  • 6. 6 Distributed Processing A centralized database that can be accessed over a computer network. Pearson Education © 2009
  • 7. 7 Parallel DBMS A DBMS running across multiple processors and disks designed to execute operations in parallel, whenever possible, to improve performance. Based on premise that single processor systems can no longer meet requirements for cost-effective scalability, reliability, and performance. Parallel DBMSs link multiple, smaller machines to achieve same throughput as single, larger machine, with greater scalability and reliability. Pearson Education © 2009
  • 8. 8 Parallel DBMS Main architectures for parallel DBMSs are: – Shared memory, – Shared disk, – Shared nothing. Pearson Education © 2009
  • 9. 9 Parallel DBMS (a) shared memory (b) shared disk (c) shared nothing Pearson Education © 2009 Pearson Education © 2009
  • 10. Shared Memory Processors and disks have access to a common memory, typically via a bus or through an interconnection network. Extremely efficient communication between processors — data in shared memory can be accessed by any processor without having to move it using software. Downside – architecture is not scalable beyond 32 or 64 processors since the bus or the interconnection network becomes a bottleneck
  • 11. Shared Disk All processors can directly access all disks via an interconnection network, but the processors have private memories. – The memory bus is not a bottleneck – Architecture provides a degree of fault- tolerance — if a processor fails, the other processors can take over its tasks since the database is resident on disks that are accessible from all processors.
  • 12. Shared Disk Examples: IBM Sysplex and DEC clusters (now part of Compaq) running Rdb (now Oracle Rdb) were early commercial users Downside: bottleneck now occurs at interconnection to the disk subsystem. Shared-disk systems can scale to a somewhat larger number of processors, but communication between processors is slower.
  • 13. Shared Nothing Examples: Teradata, Tandem, Oracle-n CUBE Data accessed from local disks (and local memory accesses) do not pass through interconnection network, thereby minimizing the interference of resource sharing. Shared-nothing multiprocessors can be scaled up to thousands of processors without interference. Main drawback: cost of communication and non- local disk access; sending data involves software interaction at both ends.
  • 14. 14 Advantages of DDBMSs Reflects organizational structure Improved shareability and local autonomy Improved availability Improved reliability Improved performance Economics Modular growth Pearson Education © 2009
  • 15. 15 Disadvantages of DDBMSs Complexity Cost Security Integrity control more difficult Lack of standards Lack of experience Database design more complex Pearson Education © 2009
  • 16. 16 Types of DDBMS Homogeneous DDBMS Heterogeneous DDBMS Pearson Education © 2009
  • 17. 17 Homogeneous DDBMS All sites use same DBMS product. Much easier to design and manage. Approach provides incremental growth and allows increased performance. Pearson Education © 2009
  • 18. 18 Heterogeneous DDBMS Sites may run different DBMS products, with possibly different underlying data models. Occurs when sites have implemented their own databases and integration is considered later. Translations required to allow for: – Different hardware. – Different DBMS products. – Different hardware and different DBMS products. Typical solution is to use gateways. Pearson Education © 2009
  • 19. 19 Open Database Access and Interoperability Open Group formed a Working Group to provide specifications that will create a database infrastructure environment where there is: – Common SQL API that allows client applications to be written that do not need to know vendor of DBMS they are accessing. – Common database protocol that enables DBMS from one vendor to communicate directly with DBMS from another vendor without the need for a gateway. – A common network protocol that allows communications between different DBMSs. Pearson Education © 2009
  • 20. 20 Open Database Access and Interoperability Most ambitious goal is to find a way to enable transaction to span DBMSs from different vendors without use of a gateway. Group has now evolved into DBIOP Consortium and are working in version 3 of DRDA (Distributed Relational Database Architecture) standard. Pearson Education © 2009
  • 21. 21 Multidatabase System (MDBS) DDBMS in which each site maintains complete autonomy. DBMS that resides transparently on top of existing database and file systems and presents a single database to its users. Allows users to access and share data without requiring physical database integration. Unfederated MDBS (no local users) and federated MDBS. Pearson Education © 2009
  • 22. 22 Overview of Networking Network - Interconnected collection of autonomous computers, capable of exchanging information. Local Area Network (LAN) intended for connecting computers at same site. Wide Area Network (WAN) used when computers or LANs need to be connected over long distances. WAN relatively slow and less reliable than LANs. DDBMS using LAN provides much faster response time than one using WAN. Pearson Education © 2009
  • 24. 24 Functions of a DDBMS Expect DDBMS to have at least the functionality of a DBMS. Also to have following functionality: – Extended communication services. – Extended Data Dictionary. – Distributed query processing. – Extended concurrency control. – Extended recovery services. Pearson Education © 2009
  • 25. 25 Reference Architecture for DDBMS Due to diversity, no accepted architecture equivalent to ANSI/SPARC 3-level architecture. A reference architecture consists of: – Set of global external schemas. – Global conceptual schema (GCS). – Fragmentation schema and allocation schema. – Set of schemas for each local DBMS conforming to 3- level ANSI/SPARC. Some levels may be missing, depending on levels of transparency supported. Pearson Education © 2009
  • 26. 26 Reference Architecture for DDBMS Pearson Education © 2009
  • 27. 27 Reference Architecture for MDBS In DDBMS, GCS is union of all local conceptual schemas. In FMDBS, GCS is subset of local conceptual schemas (LCS), consisting of data that each local system agrees to share. GCS of tightly coupled system involves integration of either parts of LCSs or local external schemas. FMDBS with no GCS is called loosely coupled. Pearson Education © 2009
  • 28. 28 Reference Architecture for Tightly-Coupled FMDBS Pearson Education © 2009
  • 29. 29 Components of a DDBMS Pearson Education © 2009
  • 30. 30 Distributed Database Design Three key issues: – Fragmentation, – Allocation, – Replication. Pearson Education © 2009
  • 31. 31 Distributed Database Design Fragmentation Relation may be divided into a number of sub- relations, which are then distributed. Allocation Each fragment is stored at site with “optimal” distribution. Replication Copy of fragment may be maintained at several sites. Pearson Education © 2009
  • 32. 32 Fragmentation Definition and allocation of fragments carried out strategically to achieve: – Locality of Reference. – Improved Reliability and Availability. – Improved Performance. – Balanced Storage Capacities and Costs. – Minimal Communication Costs. Involves analyzing most important applications, based on quantitative/qualitative information. Pearson Education © 2009
  • 33. 33 Fragmentation Quantitative information may include: – frequency with which an application is run; – site from which an application is run; – performance criteria for transactions and applications. Qualitative information may include transactions that are executed by application, type of access (read or write), and predicates of read operations. Pearson Education © 2009
  • 34. 34 Data Allocation Four alternative strategies regarding placement of data: – Centralized, – Partitioned (or Fragmented), – Complete Replication, – Selective Replication. Pearson Education © 2009
  • 35. 35 Data Allocation Centralized: Consists of single database and DBMS stored at one site with users distributed across the network. Partitioned: Database partitioned into disjoint fragments, each fragment assigned to one site. Complete Replication: Consists of maintaining complete copy of database at each site. Selective Replication: Combination of partitioning, replication, and centralization. Pearson Education © 2009
  • 36. 36 Comparison of Strategies for Data Distribution Pearson Education © 2009
  • 37. 37 Why Fragment? Usage – Applications work with views rather than entire relations. Efficiency – Data is stored close to where it is most frequently used. – Data that is not needed by local applications is not stored. Pearson Education © 2009
  • 38. 38 Why Fragment? Parallelism – With fragments as unit of distribution, transaction can be divided into several subqueries that operate on fragments. Security – Data not required by local applications is not stored and so not available to unauthorized users. Pearson Education © 2009
  • 39. 39 Why Fragment? Disadvantages – Performance, – Integrity. Pearson Education © 2009
  • 40. 40 Correctness of Fragmentation Three correctness rules: – Completeness, – Reconstruction, – Disjointness. Pearson Education © 2009
  • 41. 41 Correctness of Fragmentation Completeness If relation R is decomposed into fragments R1, R2, ... Rn, each data item that can be found in R must appear in at least one fragment. 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 . Pearson Education © 2009
  • 42. 42 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. Pearson Education © 2009
  • 43. 43 Types of Fragmentation Four types of fragmentation: – Horizontal, – Vertical, – Mixed, – Derived. Other possibility is no fragmentation: – If relation is small and not updated frequently,Pearson Education © 2009
  • 44. 44 Horizontal and Vertical Fragmentation Pearson Education © 2009
  • 46. 46 Horizontal Fragmentation Consists of a subset of the tuples of a relation. Defined using Selection operation of relational algebra: σp(R) For example: P1 = σ type=‘House’(PropertyForRent) P2 = σ type=‘Flat’(PropertyForRent) Pearson Education © 2009
  • 47. 47 Horizontal Fragmentation This strategy is determined by looking at predicates used by transactions. Involves finding set of minimal (complete and relevant) predicates. Set of predicates is complete, if and only if, any two tuples in same fragment are referenced with same probability by any application. Predicate is relevant if there is at least one application that accesses fragments differently. Pearson Education © 2009
  • 48. 48 Vertical Fragmentation Consists of a subset of attributes of a relation. Defined using Projection operation of relational algebra: ∏a1,... ,an(R) For example: S1 = ∏staffNo, position, sex, DOB, salary(Staff) S2 = ∏staffNo, fName,lName,branchNo(Staff) Determined by establishing affinity of one attribute to another. Pearson Education © 2009
  • 49. 49 Mixed Fragmentation Consists of a horizontal fragment that is vertically fragmented, or a vertical fragment that is horizontally fragmented. Defined using Selection and Projection operations of relational algebra: σ p(∏a1,... ,an(R)) or ∏a1,... ,an(σp(R)) Pearson Education © 2009
  • 50. 50 Example - Mixed Fragmentation S1 = ∏staffNo,position, sex,DOB,salary(Staff) S2 = ∏staffNo,fName, lName, branchNo(Staff) S21 = σ branchNo=‘B003’(S2) S22 = σ branchNo=‘B005’(S2) S23 = σ branchNo=‘B007’(S2) Pearson Education © 2009
  • 51. 51 Derived Horizontal Fragmentation A horizontal fragment that is based on horizontal fragmentation of a parent relation. Ensures that fragments that are frequently joined together are at same site. Defined using Semijoin operation of relational algebra: Ri = R F Si, 1 ≤ i ≤ w Pearson Education © 2009
  • 52. 52 Example - Derived Horizontal Fragmentation S3 = σ branchNo=‘B003’(Staff) S4 = σ branchNo=‘B005’(Staff) S5 = σ branchNo=‘B007’(Staff) Could use derived fragmentation for Property: Pi = PropertyForRent branchNo Si, 3 ≤ i ≤ 5 Pearson Education © 2009
  • 53. 53 Derived Horizontal Fragmentation If relation contains more than one foreign key, need to select one as parent. Choice can be based on fragmentation used most frequently or fragmentation with better join characteristics. Pearson Education © 2009
  • 54. 54 Distributed Database Design Methodology 1. Use normal methodology to produce a design for the global relations. 2. Examine topology of system to determine where databases will be located. 3. Analyze most important transactions and identify appropriateness of horizontal/vertical fragmentation. 4. Decide which relations are not to be fragmented. 5. Examine relations on 1 side of relationships and determine a suitable fragmentation schema. Relations on many side may be suitable for derived fragmentation. Pearson Education © 2009
  • 55. 55 Transparencies in a DDBMS Distribution Transparency – Fragmentation Transparency – Location Transparency – Replication Transparency – Local Mapping Transparency – Naming Transparency Pearson Education © 2009
  • 56. 56 Transparencies in a DDBMS Transaction Transparency – Concurrency Transparency – Failure Transparency Performance Transparency – DBMS Transparency DBMS TransparencyPearson Education © 2009
  • 57. 57 Distribution Transparency Distribution transparency allows user to perceive database as single, logical entity. If DDBMS exhibits distribution transparency, user does not need to know: – data is fragmented (fragmentation transparency), – location of data items (location transparency), – otherwise call this local mapping transparency. With replication transparency, user is unaware of replication of fragments . Pearson Education © 2009
  • 58. 58 Naming Transparency Each item in a DDB must have a unique name. DDBMS must ensure that no two sites create a database object with same name. One solution is to create central name server. However, this results in: – loss of some local autonomy; – central site may become a bottleneck; – low availability; if the central site fails, remaining sites cannot create any new objects. Pearson Education © 2009
  • 59. 59 Naming Transparency Alternative solution - prefix object with identifier of site that created it. For example, Branch created at site S1 might be named S1.BRANCH. Also need to identify each fragment and its copies. Thus, copy 2 of fragment 3 of Branch created at site S1 might be referred to as S1.BRANCH.F3.C2. However, this results in loss of distribution transparency. Pearson Education © 2009
  • 60. 60 Naming Transparency An approach that resolves these problems uses aliases for each database object. Thus, S1.BRANCH.F3.C2 might be known as LocalBranch by user at site S1. DDBMS has task of mapping an alias to appropriate database object. Pearson Education © 2009
  • 61. 61 Transaction Transparency Ensures that all distributed transactions maintain distributed database’s integrity and consistency. Distributed transaction accesses data stored at more than one location. Each transaction is divided into number of subtransactions, one for each site that has to be accessed. DDBMS must ensure the indivisibility of both the global transaction and each of the subtransactions. Pearson Education © 2009
  • 62. 62 Example - Distributed Transaction T prints out names of all staff, using schema defined above as S1, S2, S21, S22, and S23. Define three subtransactions TS3, TS5, and TS7 to represent agents at sites 3, 5, and 7. Pearson Education © 2009
  • 63. 63 Concurrency Transparency All transactions must execute independently and be logically consistent with results obtained if transactions executed one at a time, in some arbitrary serial order. Same fundamental principles as for centralized DBMS. DDBMS must ensure both global and local transactions do not interfere with each other. Similarly, DDBMS must ensure consistency of all subtransactions of global transaction. Pearson Education © 2009
  • 64. 64 Classification of Transactions In IBM’s Distributed Relational Database Architecture (DRDA), four types of transactions: – Remote request – Remote unit of work – Distributed unit of work – Distributed request. Pearson Education © 2009
  • 66. 66 Concurrency Transparency Replication makes concurrency more complex. If a copy of a replicated data item is updated, update must be propagated to all copies. Could propagate changes as part of original transaction, making it an atomic operation. However, if one site holding copy is not reachable, then transaction is delayed until site is reachable. Pearson Education © 2009
  • 67. 67 Concurrency Transparency Could limit update propagation to only those sites currently available. Remaining sites updated when they become available again. Could allow updates to copies to happen asynchronously, sometime after the original update. Delay in regaining consistency may range from a few seconds to several hours. Pearson Education © 2009
  • 68. 68 Failure Transparency DDBMS must ensure atomicity and durability of global transaction. Means ensuring that subtransactions of global transaction either all commit or all abort. Thus, DDBMS must synchronize global transaction to ensure that all subtransactions have completed successfully before recording a final COMMIT for global transaction. Must do this in presence of site and network failures. Pearson Education © 2009
  • 69. 69 Performance Transparency DDBMS must perform as if it were a centralized DBMS. – DDBMS should not suffer any performance degradation due to distributed architecture. – DDBMS should determine most cost-effective strategy to execute a request. Pearson Education © 2009
  • 70. 70 Performance Transparency Distributed Query Processor (DQP) maps data request into ordered sequence of operations on local databases. Must consider fragmentation, replication, and allocation schemas. DQP has to decide: – which fragment to access; – which copy of a fragment to use; – which location to use. Pearson Education © 2009
  • 71. 71 Performance Transparency DQP produces execution strategy optimized with respect to some cost function. Typically, costs associated with a distributed request include: – I/O cost; – CPU cost; – communication cost. Pearson Education © 2009
  • 72. 72 Performance Transparency - Example Property(propNo, city) 10000 records in London Client(clientNo,maxPrice) 100000 records in Glasgow Viewing(propNo, clientNo) 1000000 records in London SELECT p.propNo FROM Property p INNER JOIN (Client c INNER JOIN Viewing v ON c.clientNo = v.clientNo) ON p.propNo = v.propNo WHERE p.city=‘Aberdeen’AND c.maxPrice > 200000; Pearson Education © 2009
  • 73. 73 Performance Transparency - Example Assume: Each tuple in each relation is 100 characters long. 10 renters with maximum price greater than £200,000. 100 000 viewings for properties in Aberdeen. Computation time negligible compared to communication time. Pearson Education © 2009
  • 74. 74 Performance Transparency - Example Pearson Education © 2009
  • 75. 75 Date’s 12 Rules for a DDBMS 0. Fundamental Principle To the user, a distributed system should look exactly like a nondistributed system. 1. Local Autonomy 2. No Reliance on a Central Site 3. Continuous Operation 4. Location Independence 5. Fragmentation Independence 6. Replication Independence Pearson Education © 2009
  • 76. 76 Date’s 12 Rules for a DDBMS 7. Distributed Query Processing 8. Distributed Transaction Processing 9. Hardware Independence 10. Operating System Independence 11. Network Independence 12. Database Independence Last four rules are ideals. Pearson Education © 2009